:root {
    --bg: #000000;
    --surface: #2f2f2f;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #e709f0;
    --accent-glow: rgba(231, 9, 240, 0.4);
    --border: rgba(255, 255, 255, 0.19);
    --input-bg: #1a1a1a;
    --radius: 0.6rem;
}

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

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem 2rem;
}

/* Header / Branding */
.brand-logo {
    display: block;
    width: 120px;
    margin-bottom: 1.5rem;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* Form fields */
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
.field input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}
.field small { color: var(--text-muted); display: block; margin-top: 0.25rem; }
.field.checkbox label { display: flex; align-items: center; gap: 0.5rem; }
.field.checkbox input[type="checkbox"] { accent-color: var(--accent); }

/* Buttons */
button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: box-shadow 0.3s ease;
}
button:hover {
    animation: pulse 2s ease-in-out infinite;
}
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 4px 0 var(--accent-glow); }
    50% { box-shadow: 0 0 12px 3px var(--accent-glow); }
}

/* Error & empty states */
.error { background: #991b1b; padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.empty { color: var(--text-muted); text-align: center; margin: 3rem 0; }

/* Links */
.back { color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 1.5rem; }
.back:hover { text-decoration: underline; }
.theme-tag { color: var(--text-muted); margin-bottom: 1rem; }

/* Status banner */
.status-banner {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.status-success { background: #14532d; color: #bbf7d0; }
.status-partial { background: #713f12; color: #fde68a; }
.status-error { background: #991b1b; color: #fecaca; }
.status-empty { background: #1e293b; color: #94a3b8; }

/* Per-video breakdown */
.video-breakdown {
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}
.video-breakdown summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.video-breakdown ul {
    list-style: none;
    margin-top: 0.75rem;
}
.video-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.video-status:last-child { border-bottom: none; }
.video-status-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 0.75rem;
}
.video-status-badge {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}
.badge-ok { background: #14532d; color: #bbf7d0; }
.badge-skip { background: #713f12; color: #fde68a; }
.badge-error { background: #991b1b; color: #fecaca; }

/* Clip cards */
.clip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.clip-card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.meta { margin-bottom: 0.75rem; }
.meta a { color: var(--accent); text-decoration: none; }
.meta a:hover { text-decoration: underline; }
.meta .duration { color: var(--text-muted); margin-left: 1rem; }

/* Video embed */
.embed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}
.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Scores */
.scores { display: flex; gap: 1rem; margin-bottom: 0.75rem; }
.score {
    background: rgba(231, 9, 240, 0.15);
    color: var(--text);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.detail { margin-bottom: 0.4rem; }
.detail strong { color: var(--text-muted); }

/* Progress area */
.progress-area {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.progress-area.visible {
    display: flex;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}
