/* ============================================================
   LANE STUDIO — Photographic Bowling Alley Aesthetic
   Premium warm tones, wood textures, lane lighting
   ============================================================ */

:root {
    /* Core palette — warm bowling alley wood & lane lighting */
    --lane-wood: #3a2819;
    --lane-wood-light: #5c3d28;
    --lane-wood-dark: #241810;
    --lane-surface: #c8a67a;
    --lane-surface-light: #ddc09a;
    --lane-gutter: #2a2a2a;
    --pin-white: #f5f0e8;
    --pin-red: #c0392b;
    --pin-red-glow: #e74c3c;
    --scoreboard-bg: #1a1209;
    --scoreboard-text: #f4e8c1;
    --neon-blue: #4fc3f7;
    --neon-pink: #ff6b9d;
    --neon-green: #66bb6a;
    --neon-amber: #ffb74d;
    --neon-purple: #ab47bc;

    /* Functional */
    --bg-deep: #1c140d;
    --bg-card: rgba(42, 30, 20, 0.85);
    --bg-card-hover: rgba(58, 40, 25, 0.9);
    --border-warm: rgba(200, 166, 122, 0.15);
    --border-warm-hover: rgba(200, 166, 122, 0.3);
    --text-primary: #f5f0e8;
    --text-secondary: #c8a67a;
    --text-muted: rgba(200, 166, 122, 0.5);
    --shadow-warm: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(200, 166, 122, 0.15);

    /* Typography */
    --font-display: 'Bebas Neue', 'Oswald', sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    /* Photographic wood grain background */
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(92, 61, 40, 0.25) 0%, transparent 60%),
        repeating-linear-gradient(
            90deg,
            rgba(200, 166, 122, 0.02) 0px,
            rgba(200, 166, 122, 0.02) 1px,
            transparent 1px,
            transparent 60px
        ),
        linear-gradient(180deg, #1c140d 0%, #241810 50%, #1a1209 100%);
    background-attachment: fixed;
}

.hidden { display: none !important; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--lane-wood-dark); }
::-webkit-scrollbar-thumb {
    background: var(--lane-wood-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--lane-surface); }

/* ============================================================
   API KEY MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 7, 4, 0.92);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.4s var(--ease-smooth);
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 460px;
    width: 90%;
    box-shadow: var(--shadow-warm), var(--shadow-glow);
    animation: slideUp 0.5s var(--ease-smooth);
}

.modal-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--pin-red), var(--pin-red-glow));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 0 30px rgba(192, 57, 43, 0.4);
}

.modal-logo h1 {
    font-family: var(--font-display);
    font-size: 42px;
    letter-spacing: 6px;
    color: var(--text-primary);
    line-height: 1;
}

.modal-subtitle {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 6px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.api-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.api-input-wrap input {
    flex: 1;
    padding: 14px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-warm);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.api-input-wrap input:focus {
    outline: none;
    border-color: var(--lane-surface);
    box-shadow: 0 0 0 3px rgba(200, 166, 122, 0.1);
}

.api-input-wrap input::placeholder { color: var(--text-muted); }

.btn-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-warm);
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: rgba(200, 166, 122, 0.1);
    border-color: var(--border-warm-hover);
}

.api-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--pin-red), #d35400);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(192, 57, 43, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-warm);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-ghost:hover {
    background: rgba(200, 166, 122, 0.1);
    border-color: var(--border-warm-hover);
    color: var(--text-primary);
}

.btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--pin-red), #b71c1c);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 20px rgba(192, 57, 43, 0.35);
    position: relative;
    overflow: hidden;
}
.btn-generate::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.btn-generate:hover::before { transform: translateX(100%); }
.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(192, 57, 43, 0.5);
}
.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    background: rgba(28, 20, 13, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-warm);
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-sm {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--pin-red), var(--pin-red-glow));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.header-title {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 5px;
    color: var(--text-primary);
}

.header-nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.nav-btn:hover {
    color: var(--text-secondary);
    background: rgba(200, 166, 122, 0.08);
}
.nav-btn.active {
    color: var(--text-primary);
    background: rgba(200, 166, 122, 0.12);
}
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--pin-red);
    border-radius: 2px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--pin-red);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.header-right { display: flex; align-items: center; }

/* ============================================================
   CREATE VIEW
   ============================================================ */
.view {
    display: none;
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s var(--ease-smooth);
}
.view.active { display: block; }

.create-container { max-width: 800px; margin: 0 auto; }

.create-hero {
    text-align: center;
    margin-bottom: 32px;
}

.create-hero h2 {
    font-family: var(--font-display);
    font-size: 38px;
    letter-spacing: 4px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.create-hero p {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 540px;
    margin: 0 auto;
}

.create-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow-warm);
}

.form-section {
    margin-bottom: 24px;
}

.form-section label,
.form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.required { color: var(--pin-red); }

textarea, input[type="text"], select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-warm);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    transition: all 0.3s;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--lane-surface);
    box-shadow: 0 0 0 3px rgba(200, 166, 122, 0.1);
}

textarea::placeholder, input::placeholder { color: var(--text-muted); }

select {
    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='%23c8a67a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background: var(--lane-wood-dark);
    color: var(--text-primary);
}

/* Theme examples */
.theme-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.example-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.example-chip {
    padding: 6px 14px;
    background: rgba(200, 166, 122, 0.08);
    border: 1px solid rgba(200, 166, 122, 0.15);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}
.example-chip:hover {
    background: rgba(200, 166, 122, 0.15);
    border-color: rgba(200, 166, 122, 0.3);
    color: var(--text-primary);
}

/* Checkbox */
.checkbox-group { margin-bottom: 8px; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-warm-hover);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkmark {
    background: var(--pin-red);
    border-color: var(--pin-red);
}
.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.fast-mode span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fast-mode small {
    color: var(--text-muted);
    font-size: 11px;
}
.fast-mode i { color: var(--neon-amber); }

.sub-fields {
    padding: 16px 0 8px 0;
    animation: slideDown 0.3s var(--ease-smooth);
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.form-row-inner {
    display: flex;
    gap: 16px;
}

.form-field { flex: 1; }

.form-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-warm);
}

.flex-1 { flex: 1; }

/* Prompt Preview */
.prompt-preview {
    margin-top: 24px;
}

.preview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.preview-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
.preview-toggle i {
    transition: transform 0.3s;
}
.preview-toggle.open i {
    transform: rotate(180deg);
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

.prompt-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-warm);
    border-radius: 10px;
    padding: 16px 20px;
}

.prompt-card h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#previewStrike h4 { color: var(--neon-amber); }
#previewSpare h4 { color: var(--neon-green); }
#previewGutter h4 { color: var(--neon-pink); }

.prompt-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================================
   QUEUE VIEW
   ============================================================ */
.queue-container { max-width: 960px; margin: 0 auto; }

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

.queue-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.queue-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat strong {
    color: var(--text-primary);
    font-size: 16px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-empty, .gallery-empty {
    text-align: center;
    padding: 80px 32px;
    color: var(--text-muted);
}
.queue-empty i, .gallery-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}
.queue-empty p, .gallery-empty p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.queue-empty small, .gallery-empty small {
    font-size: 13px;
}

/* Queue Item */
.queue-item {
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    animation: slideIn 0.4s var(--ease-smooth);
}

.queue-item.generating {
    border-color: rgba(255, 183, 77, 0.3);
    box-shadow: 0 0 20px rgba(255, 183, 77, 0.08);
}
.queue-item.complete {
    border-color: rgba(102, 187, 106, 0.3);
}
.queue-item.error {
    border-color: rgba(231, 76, 60, 0.3);
}

.queue-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.queue-type-icon.strike {
    background: rgba(255, 183, 77, 0.15);
    color: var(--neon-amber);
}
.queue-type-icon.spare {
    background: rgba(102, 187, 106, 0.15);
    color: var(--neon-green);
}
.queue-type-icon.gutter {
    background: rgba(255, 107, 157, 0.15);
    color: var(--neon-pink);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.queue-item-theme {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-status {
    text-align: right;
    min-width: 160px;
}

.status-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.status-label.waiting { color: var(--text-muted); }
.status-label.generating { color: var(--neon-amber); }
.status-label.polling { color: var(--neon-blue); }
.status-label.complete { color: var(--neon-green); }
.status-label.error { color: var(--pin-red-glow); }

/* Progress Bar */
.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s var(--ease-smooth);
    position: relative;
}

.progress-bar.waiting {
    width: 0%;
    background: var(--text-muted);
}

.progress-bar.generating {
    background: linear-gradient(90deg, var(--neon-amber), #ff9800);
    animation: progressPulse 2s ease-in-out infinite;
}

.progress-bar.polling {
    background: linear-gradient(90deg, var(--neon-blue), #29b6f6);
    animation: progressPulse 1.5s ease-in-out infinite;
}

.progress-bar.complete {
    width: 100% !important;
    background: var(--neon-green);
}

.progress-bar.error {
    background: var(--pin-red-glow);
}

.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.queue-error-detail {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #e88a82;
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
}

/* ============================================================
   GALLERY VIEW
   ============================================================ */
.gallery-container { max-width: 1200px; margin: 0 auto; }

.gallery-header {
    margin-bottom: 24px;
}

.gallery-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Theme Group */
.theme-group {
    animation: fadeIn 0.4s var(--ease-smooth);
}

.theme-group-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-warm);
}

.theme-group-title {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.theme-group-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.theme-group-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 183, 77, 0.1);
    border: 1px solid rgba(255, 183, 77, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: var(--neon-amber);
}

.theme-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* Video Card */
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.video-card:hover {
    border-color: var(--border-warm-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-warm), var(--shadow-glow);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--lane-wood-dark);
    overflow: hidden;
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.video-card:hover .video-thumb-overlay { opacity: 0; }

.play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.video-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.video-type-badge.strike {
    background: rgba(255, 183, 77, 0.9);
    color: #1a1209;
}
.video-type-badge.spare {
    background: rgba(102, 187, 106, 0.9);
    color: #1a1209;
}
.video-type-badge.gutter {
    background: rgba(255, 107, 157, 0.9);
    color: #1a1209;
}

.video-card-info {
    padding: 14px 18px;
}

.video-card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.video-card-duration {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s var(--ease-smooth);
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    z-index: 1;
    animation: slideUp 0.4s var(--ease-smooth);
}

.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-content video {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-info {
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lightbox-info h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.lightbox-info p {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    box-shadow: var(--shadow-warm);
    min-width: 300px;
    max-width: 420px;
    animation: slideInRight 0.4s var(--ease-smooth);
    backdrop-filter: blur(12px);
}

.toast.success { border-left: 3px solid var(--neon-green); }
.toast.error { border-left: 3px solid var(--pin-red-glow); }
.toast.info { border-left: 3px solid var(--neon-blue); }
.toast.warning { border-left: 3px solid var(--neon-amber); }

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--neon-green); }
.toast.error .toast-icon { color: var(--pin-red-glow); }
.toast.info .toast-icon { color: var(--neon-blue); }
.toast.warning .toast-icon { color: var(--neon-amber); }

.toast-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
}
.toast-close:hover { color: var(--text-primary); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.fa-spin-slow {
    animation: spin 2s linear infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 8px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-btn { padding: 8px 14px; font-size: 13px; }

    .view { padding: 20px 16px; }

    .create-form-card { padding: 24px 20px; }

    .form-actions-row {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .btn-generate { width: 100%; justify-content: center; }

    .form-row, .form-row-inner {
        flex-direction: column;
    }

    .theme-group-grid {
        grid-template-columns: 1fr;
    }

    .queue-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .queue-item {
        flex-wrap: wrap;
    }

    .queue-item-status {
        width: 100%;
        text-align: left;
        min-width: unset;
    }

    .lightbox-content {
        width: 95%;
    }

    .lightbox-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .header-title { font-size: 20px; letter-spacing: 3px; }
    .create-hero h2 { font-size: 28px; }
    .modal-logo h1 { font-size: 34px; }
    .modal-card { padding: 32px 24px; }
}
