:root {
    --bg: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #0f3460;
    --text: #eaeaea;
    --text-secondary: #a0a0b0;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --green: #00c853;
    --red: #ff5252;
    --border: #2a2a4a;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 2em;
    color: var(--accent);
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* Settings grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }

.field label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

input, textarea, select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 8px 12px;
    font-size: 0.95em;
    font-family: inherit;
    width: 100%;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

select option {
    background: var(--bg-card);
    color: var(--text);
}

textarea {
    resize: vertical;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85em;
    line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Buttons */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95em;
    font-family: inherit;
    transition: background 0.2s, opacity 0.2s;
}

.btn-sm { padding: 4px 12px; font-size: 0.85em; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #1a4a7a; }

.btn-action {
    background: var(--accent);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 1.1em;
    margin-top: 15px;
}
.btn-action:hover { background: var(--accent-hover); }
.btn-action:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-warning {
    background: #e67e22;
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 1.1em;
    margin-top: 10px;
}
.btn-warning:hover { background: #f39c12; }

/* Timing warnings */
#timing-warnings {
    margin-top: 10px;
    padding: 12px;
    background: rgba(230, 126, 34, 0.15);
    border: 1px solid #e67e22;
    border-radius: var(--radius);
    font-size: 0.9em;
}

#timing-warnings .timing-warn-item {
    margin-bottom: 6px;
    color: #e67e22;
}
#timing-warnings .timing-warn-item:last-child { margin-bottom: 0; }

/* Drop zone */
#drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

#drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

.drop-icon { font-size: 3em; margin-bottom: 10px; }
#drop-zone p { margin-bottom: 8px; }
#drop-zone span { display: block; color: var(--text-secondary); margin: 8px 0; }

/* File list */
#file-list { margin-top: 15px; }

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 6px;
}

.file-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .remove { cursor: pointer; color: var(--red); font-size: 1.2em; padding: 0 6px; }
.file-item .remove:hover { color: #ff8a80; }

/* Results */
.result-item {
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 10px;
}

.result-item.success { border-left: 4px solid var(--green); }
.result-item.error   { border-left: 4px solid var(--red); }

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-logs {
    font-family: 'SF Mono', monospace;
    font-size: 0.8em;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 10px;
    border-radius: var(--radius);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
}

details { margin-top: 8px; }
details summary { cursor: pointer; color: var(--text-secondary); font-size: 0.9em; }
details summary:hover { color: var(--text); }

.download-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}
.download-link:hover { text-decoration: underline; }

/* Status */
#status-bar {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.status-ok { color: var(--green) !important; }
.status-error { color: var(--red) !important; }

/* User page extras */
.ai-disclaimer {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: var(--radius);
    padding: 10px 14px;
    color: #ffb74d;
    font-size: 0.9em;
    margin-bottom: 10px;
}
.hint {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 12px;
}
.coming-soon {
    opacity: 0.5;
    font-style: italic;
}
