:root {
    --primary-color: #007aff;
    --primary-hover: #005ecb;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #1c1c1e;
    --subtle-text-color: #6d6d72;
    --border-color: #e5e5e5;
    --success-color: #34c759;
    --error-color: #ff3b30;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
}

.container {
    max-width: 1200px; /* Wider container for side-by-side layout */
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    font-size: 1rem;
    color: var(--subtle-text-color);
    margin-top: 0.25rem;
}

.main-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.card {
    background: var(--card-background);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.file-section {
    flex: 1;
}

.options-section {
    flex: 1;
    position: sticky; /* Makes the options stick on scroll */
    top: 2rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* File Input */
.file-label {
    display: block;
    border: 2px dashed var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.file-label:hover,
.file-label.dragover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}
input[type="file"] {
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

#file-list-container {
    margin-top: 1.5rem;
}

#file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

#file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--subtle-text-color);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.5rem;
}

/* Operations */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.checkbox-group label {
    font-weight: 500;
    margin-left: 0.75rem;
    cursor: pointer;
}
input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
}

.param-group {
    padding-left: 2rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    border-left: 2px solid var(--border-color);
}
.param-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--subtle-text-color);
    display: block;
    margin-bottom: 0.5rem;
}
select, input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
}
#custom-code-input {
    margin-top: 0.5rem;
}

/* Main Button */
#process-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
#process-btn:hover {
    background-color: var(--primary-hover);
}
#process-btn:active {
    transform: scale(0.98);
}

#process-btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

#process-btn:disabled:hover {
    background-color: #ccc;
}


/* Results */
.results-section {
    margin-top: 1.5rem;
}
.results-log {
    border: 1px solid var(--border-color);
    background-color: #f8f9fa;
    min-height: 100px;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.hidden {
    display: none;
}
