/* ============================================================
   MarketFront Tool — FUTURISTIC THEME
   Neon gradients • Animated glows • Cyber-premium aesthetic
   ============================================================ */

/* Font fallback system — works even if Google Fonts fail */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&family=Orbitron:wght@500;600;700;800;900&display=swap');

/* Ensure fonts apply even without Google Fonts */
* { font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

:root {
    --bg-void: #06060e;
    --bg-card: #0c0c1a;
    --bg-elevated: #111128;
    --bg-surface: #16163a;
    --bg-hover: #1c1c48;

    --neon-cyan: #00f0ff;
    --neon-purple: #a855f7;
    --neon-pink: #f472b6;
    --neon-blue: #3b82f6;
    --neon-green: #22d3ee;
    --neon-orange: #fb923c;
    --neon-yellow: #fbbf24;

    --grad-main: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #f472b6 100%);
    --grad-warm: linear-gradient(135deg, #f472b6 0%, #fb923c 50%, #fbbf24 100%);
    --grad-cool: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%);
    --grad-fire: linear-gradient(135deg, #f87171 0%, #fb923c 50%, #fbbf24 100%);

    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.15);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.15);
    --glow-pink: 0 0 20px rgba(244, 114, 182, 0.15);

    --text-primary: #e4e4f0;
    --text-secondary: #8888aa;
    --text-muted: #555570;

    --border: rgba(255,255,255,0.06);
    --border-glow: rgba(0, 240, 255, 0.12);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;

    /* Accent colors for step badges & pills */
    --accent-blue: #3b82f6;
    --accent-green: #22d3ee;
    --accent-pink: #f472b6;
    --accent-purple: #a855f7;
    --accent-orange: #fb923c;
    --accent-yellow: #fbbf24;
}

/* ============================================================
   LIGHT THEME (Day Mode)
   ============================================================ */
[data-theme="light"] {
    --bg-void: #f0f2f8;
    --bg-card: #ffffff;
    --bg-elevated: #f5f6fa;
    --bg-surface: #eaecf4;
    --bg-hover: #e2e5f0;

    --neon-cyan: #0891b2;
    --neon-purple: #7c3aed;
    --neon-pink: #db2777;
    --neon-blue: #2563eb;
    --neon-green: #0891b2;
    --neon-orange: #ea580c;
    --neon-yellow: #d97706;

    --grad-main: linear-gradient(135deg, #0891b2 0%, #7c3aed 50%, #db2777 100%);
    --grad-warm: linear-gradient(135deg, #db2777 0%, #ea580c 50%, #d97706 100%);
    --grad-cool: linear-gradient(135deg, #0891b2 0%, #2563eb 50%, #7c3aed 100%);
    --grad-fire: linear-gradient(135deg, #ef4444 0%, #ea580c 50%, #d97706 100%);

    --glow-cyan: 0 0 20px rgba(8, 145, 178, 0.1);
    --glow-purple: 0 0 20px rgba(124, 58, 237, 0.1);
    --glow-pink: 0 0 20px rgba(219, 39, 119, 0.1);

    --text-primary: #1a1a2e;
    --text-secondary: #555577;
    --text-muted: #8888aa;

    --border: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(8, 145, 178, 0.15);

    --accent-blue: #2563eb;
    --accent-green: #0891b2;
    --accent-pink: #db2777;
    --accent-purple: #7c3aed;
    --accent-orange: #ea580c;
    --accent-yellow: #d97706;
}

/* Light mode body overrides */
[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(219, 39, 119, 0.03) 0%, transparent 50%);
}

[data-theme="light"] body::after {
    background-image:
        linear-gradient(rgba(8, 145, 178, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 145, 178, 0.04) 1px, transparent 1px);
}

/* Light mode specific overrides for hard-coded colors */
[data-theme="light"] .container {
    box-shadow:
        0 10px 60px rgba(0, 0, 0, 0.08),
        0 0 30px rgba(8, 145, 178, 0.03);
}

[data-theme="light"] .submit-btn {
    color: #ffffff;
    box-shadow: 0 4px 25px rgba(8, 145, 178, 0.2), 0 4px 25px rgba(124, 58, 237, 0.12);
}
[data-theme="light"] .submit-btn:hover:not(:disabled) {
    box-shadow: 0 8px 40px rgba(8, 145, 178, 0.3), 0 8px 40px rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .step-badge,
[data-theme="light"] .step-pill {
    color: #ffffff !important;
}

[data-theme="light"] .question label .number {
    color: #ffffff;
}

[data-theme="light"] .copy-btn:hover {
    color: #ffffff;
}

[data-theme="light"] .header h1 {
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .output h2 {
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .question select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230891b2' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-void); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c5c8d6; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

[data-theme="light"] .access-gate,
[data-theme="light"] .admin-gate {
    background: var(--bg-void);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(8, 145, 178, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 60%);
}

[data-theme="light"] .access-card {
    box-shadow:
        0 0 40px rgba(8, 145, 178, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: var(--bg-card);
    color: var(--neon-cyan);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
}

/* Smooth transition for theme switch */
body, body *, body *::before, body *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

/* === ANIMATED BACKGROUND === */
body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background: var(--bg-void);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 240, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(244, 114, 182, 0.03) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-2%, 1%) rotate(1deg); }
    66% { transform: translate(1%, -1%) rotate(-0.5deg); }
    100% { transform: translate(-1%, 2%) rotate(0.5deg); }
}

/* === GRID OVERLAY === */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0,240,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* === CONTAINER === */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glow);
    box-shadow:
        0 30px 100px rgba(0,0,0,0.6),
        0 0 60px rgba(0, 240, 255, 0.03),
        inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.header {
    background: var(--bg-card);
    padding: 50px 30px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-main);
    animation: gradientSlide 4s ease infinite;
    background-size: 200% 100%;
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,240,255,0.07) 0%, transparent 60%);
    pointer-events: none;
}

.header .version {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--neon-cyan);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(0,240,255,0.3);
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    animation: gradientSlide 4s ease infinite;
    background-size: 200% 100%;
}

.header p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* === PROGRESS BAR === */
.progress-bar {
    background: var(--bg-surface);
    height: 5px;
    border-radius: 10px;
    margin-top: 28px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.progress-fill {
    background: var(--grad-main);
    background-size: 200% 100%;
    animation: gradientSlide 3s ease infinite;
    height: 100%;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 30px rgba(168, 85, 247, 0.2);
}

.progress-text {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* === FORM === */
.form-content {
    padding: 40px 30px;
}

.question {
    margin-bottom: 20px;
    padding: 22px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    position: relative;
}

.question::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--grad-main);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.question:hover::before {
    opacity: 1;
}

.question:hover {
    border-color: transparent;
    box-shadow: var(--glow-cyan);
}

.question label {
    display: block;
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--text-primary);
    font-size: 14px;
}

.question label .number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-main);
    color: #06060e;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    margin-right: 10px;
    font-size: 13px;
    font-weight: 700;
}

.question select {
    width: 100%;
    padding: 13px 16px;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300f0ff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.question select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1), 0 0 15px rgba(0, 240, 255, 0.05);
}

.question select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* === SUBMIT BUTTON === */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--grad-main);
    background-size: 200% 100%;
    animation: gradientSlide 4s ease infinite;
    color: #06060e;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 25px rgba(0, 240, 255, 0.25), 0 4px 25px rgba(168, 85, 247, 0.15);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0, 240, 255, 0.35), 0 8px 40px rgba(168, 85, 247, 0.25);
}

.submit-btn:active { transform: translateY(0); }

.submit-btn:disabled {
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

/* === OUTPUT SECTION === */
.output {
    display: none;
    padding: 40px 30px;
    background: var(--bg-void);
    position: relative;
}

.output h2 {
    font-family: 'Orbitron', sans-serif;
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
}

.project-name {
    background: var(--bg-elevated);
    border: 1px solid var(--border-glow);
    color: var(--neon-cyan);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 28px;
    font-weight: 500;
    font-size: 13px;
    font-family: 'Fira Code', monospace;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    color: var(--neon-cyan);
    margin: 40px 0 16px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glow);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* === PROMPT BOXES (Accordion) === */
.prompt-box {
    background: var(--bg-elevated);
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

.prompt-box:hover {
    border-color: rgba(0, 240, 255, 0.15);
}

.prompt-box.open {
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: var(--glow-cyan);
}

.prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.prompt-header:hover { background: var(--bg-hover); }

.prompt-header h3 {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.3px;
}

.prompt-header .toggle-icon {
    font-size: 14px;
    color: var(--neon-cyan);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.prompt-box.open .prompt-header .toggle-icon {
    transform: rotate(180deg);
}

.prompt-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.prompt-box.open .prompt-body { max-height: 8000px; }

.prompt-body-inner { padding: 0 18px 18px; }

.prompt-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 12px;
    font-family: 'Fira Code', monospace;
    margin-bottom: 14px;
    white-space: pre-wrap;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* === COPY BUTTON === */
.copy-btn {
    padding: 9px 22px;
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-main);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.copy-btn:hover::before { opacity: 1; }

.copy-btn:hover {
    color: #06060e;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.copy-btn span, .copy-btn {
    position: relative;
    z-index: 1;
}

/* === STEP GUIDE CARDS === */
.step-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    margin: 10px 0;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: rgba(255,255,255,0.08);
    transform: translateX(3px);
}

.step-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

.step-card-title {
    font-weight: 600;
    font-size: 14px;
}

.step-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 42px;
}

.step-card-desc strong {
    color: var(--text-primary);
}

/* === GUIDE CARD GLOW VARIANTS === */
.guide-img1 { border-left: 2px solid var(--neon-cyan); }
.guide-img2 { border-left: 2px solid var(--neon-blue); }
.guide-img3 { border-left: 2px solid var(--neon-green); }
.guide-img4 { border-left: 2px solid var(--neon-pink); }
.guide-img5 { border-left: 2px solid var(--neon-purple); }

.guide-vid-a  { border-left: 2px solid var(--neon-purple); }
.guide-vid-b1 { border-left: 2px solid var(--neon-blue); }
.guide-vid-b2 { border-left: 2px solid var(--neon-green); }
.guide-vid-b3 { border-left: 2px solid var(--neon-orange); }
.guide-vid-c1 { border-left: 2px solid var(--neon-purple); }
.guide-vid-c2 { border-left: 2px solid var(--neon-cyan); }

/* === OVERVIEW BOX === */
.overview-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-glow);
    padding: 26px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.overview-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-main);
    animation: gradientSlide 4s ease infinite;
    background-size: 200% 100%;
}

.overview-box h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    margin: 0 0 18px;
}

.overview-step {
    background: rgba(255,255,255,0.02);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.overview-step:hover {
    border-color: var(--border-glow);
    background: rgba(0, 240, 255, 0.02);
}

.overview-step:last-child { margin-bottom: 0; }

.overview-step strong {
    color: var(--neon-cyan);
    font-size: 14px;
}

.overview-step p {
    color: var(--text-secondary);
    margin: 5px 0 0;
    font-size: 13px;
}

/* === QUICK TIP === */
.quick-tip {
    background: var(--bg-elevated);
    border-left: 2px solid var(--neon-yellow);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.quick-tip strong { color: var(--neon-yellow); font-size: 13px; }
.quick-tip p { color: var(--text-secondary); margin: 4px 0 0; font-size: 13px; }

/* === IMPROVEMENTS === */
.improvements {
    background: var(--bg-elevated);
    border: 1px solid rgba(34, 211, 238, 0.12);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.improvements h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
}

.improvements ul { margin-left: 20px; color: var(--text-secondary); }
.improvements li { margin: 6px 0; line-height: 1.5; font-size: 13px; }

/* === TIP BOX === */
.tip-box {
    background: var(--bg-elevated);
    border-left: 2px solid var(--neon-blue);
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: var(--radius-sm);
}

.tip-box strong { color: var(--neon-blue); display: block; margin-bottom: 4px; font-size: 12px; }
.tip-box p { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }

/* === VIDEO GUIDE BOX === */
.video-guide-box {
    background: var(--bg-elevated);
    border: 1px solid rgba(244, 114, 182, 0.12);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.video-guide-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-warm);
    animation: gradientSlide 4s ease infinite;
    background-size: 200% 100%;
}

.video-guide-box h2 {
    font-family: 'Orbitron', sans-serif;
    background: var(--grad-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px;
    font-size: 18px;
}

.video-guide-box > p { color: var(--text-secondary); margin: 0 0 16px; font-size: 13px; }

.video-mapping {
    background: rgba(255,255,255,0.02);
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.video-mapping strong { color: var(--neon-pink); font-size: 13px; }
.video-mapping ul { margin: 8px 0 0 20px; color: var(--text-secondary); line-height: 1.9; font-size: 12px; }
.video-mapping li strong { color: var(--text-primary); font-size: 12px; }

/* === METADATA === */
.metadata-box {
    background: var(--bg-elevated);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-glow);
}

.metadata-box div { margin-bottom: 10px; }
.metadata-box strong { color: var(--neon-cyan); display: inline-block; min-width: 110px; font-weight: 600; font-size: 13px; }
.metadata-box span { color: var(--text-secondary); font-size: 13px; }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-elevated);
    color: var(--neon-cyan);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glow);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), var(--glow-cyan);
    display: none;
    z-index: 1000;
    font-weight: 600;
    font-size: 13px;
}

.toast.show {
    display: block;
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.footer p:first-child { color: var(--text-secondary); margin-bottom: 4px; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body { padding: 8px; }
    .container { border-radius: var(--radius); }
    .header { padding: 35px 20px 30px; }
    .header h1 { font-size: 22px; }
    .form-content, .output { padding: 20px; }
    .question { padding: 16px; }
    .overview-box, .video-guide-box { padding: 16px; }
    .step-card-desc { padding-left: 0; margin-top: 6px; }
    .changelog-entry { padding: 12px; }
}

/* ============================================================
   CHANGELOG SECTION
   ============================================================ */

.changelog-wrapper {
    margin: 0 20px 8px;
}

.changelog-toggle {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.changelog-toggle:hover {
    border-color: var(--neon-cyan);
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.changelog-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.08);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: -4px;
}

.changelog-content.open {
    max-height: 2000px;
    padding: 10px 0;
}

.changelog-entry {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-version {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.changelog-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
    margin-right: 6px;
}

.changelog-tag.new {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.changelog-tag.improved {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.changelog-tag.fixed {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.changelog-entry strong {
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.changelog-entry p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 6px 0 0;
    font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   INLINE CUSTOM INPUTS — "Add Your Own" in dropdowns
   ============================================================ */
.custom-input-wrap {
    margin-top: 14px;
    padding: 16px;
    background: rgba(168, 85, 247, 0.04);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: var(--radius-sm);
    animation: gateAppear 0.3s ease-out;
}
.custom-input-wrap textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.custom-input-wrap textarea:focus {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}
.custom-input-wrap textarea::placeholder {
    color: var(--text-muted);
    font-size: 12px;
}
.custom-sub-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

/* Inline AI Suggest (inside dropdown questions) */
.ai-suggest-inline {
    margin-top: 10px;
}
.ai-suggest-result {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 8px;
    font-size: 12px;
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.5;
}

/* Context Badge — shows selected space info */
.context-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}
.context-badge strong {
    color: var(--neon-cyan);
}
.context-icon {
    font-size: 14px;
}

/* Button Row */
.ai-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* AI Suggest Button */
.ai-suggest-btn {
    padding: 8px 20px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ai-suggest-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.12);
    transform: translateY(-1px);
}
.ai-suggest-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Enhance Button */
.ai-enhance-btn {
    margin-top: 8px;
    padding: 8px 20px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 8px;
    color: var(--neon-purple);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ai-enhance-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.12);
    transform: translateY(-1px);
}
.ai-enhance-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* AI Result */
.ai-result {
    margin-top: 10px;
    padding: 14px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: var(--radius-sm);
}
.ai-result-label {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.ai-result-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   CLIENT BAR — Top bar showing name, role, credits
   ============================================================ */
.client-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    position: relative;
    z-index: 2;
}
.client-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.client-bar-icon {
    font-size: 16px;
}
.client-bar-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}
.client-bar-role {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(168, 85, 247, 0.12);
    color: var(--neon-purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.client-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.client-bar-credits {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* Logout Button */
.logout-btn {
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 100, 100, 0.2);
    background: rgba(255, 68, 68, 0.06);
    color: #ff8888;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.logout-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff6666;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.1);
    transform: translateY(-1px);
}
[data-theme="light"] .logout-btn {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}
[data-theme="light"] .logout-btn:hover {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
}
.credit-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: none;
}

/* ============================================================
   ACCESS GATE — Login / Key Verification Screen
   ============================================================ */
.access-gate {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--bg-void);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 60%);
}
.access-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 0 60px rgba(0, 240, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.4);
    animation: gateAppear 0.6s ease-out;
}
@keyframes gateAppear {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.access-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.access-badge {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    padding: 4px 16px;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.access-tagline {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 20px;
}
.access-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), rgba(168, 85, 247, 0.3), transparent);
    margin: 0 0 28px;
}
.access-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 10px;
    text-align: left;
}
.access-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.access-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}
.access-input::placeholder {
    letter-spacing: 1px;
    font-size: 13px;
    color: var(--text-muted);
}
.access-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.3);
}
.access-error {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #ff4466;
    margin-top: 12px;
    min-height: 20px;
    transition: all 0.3s ease;
}
.access-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.access-footer p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0;
    line-height: 1.5;
}
.access-footer strong {
    color: var(--neon-cyan);
}
.access-back {
    display: inline-block;
    margin-top: 14px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: var(--neon-cyan);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s ease;
}
.access-back:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Shake animation for wrong key */
@keyframes accessShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-12px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(6px); }
}
.access-shake {
    animation: accessShake 0.4s ease-out;
}
.access-input.access-denied {
    border-color: #ff4466;
    box-shadow: 0 0 20px rgba(255, 68, 102, 0.2);
}

/* Admin Panel Link */
.admin-link {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--neon-cyan);
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 6px 16px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 20px;
}
.admin-link:hover {
    opacity: 1;
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}


/* ============================================================
   SESSION RECOVERY SYSTEM — Styles
   ============================================================ */

/* Recover button (in header) */
.recover-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 10px 22px;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.recover-btn:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    transform: translateY(-1px);
}

/* Recovery Panel */
.recover-panel {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 240, 255, 0.03);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.recover-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.recover-panel-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 0;
}
.recover-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.recover-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.recover-close-btn:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: #ff4444;
    color: #ff6666;
}
.recover-clear-btn {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s;
}
.recover-clear-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff6666;
}
.recover-panel-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 16px;
}

/* Session Cards */
.recover-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}
.recover-session-card {
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}
.recover-session-card:hover {
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.recover-session-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.recover-session-id {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    color: var(--neon-cyan);
    font-weight: 500;
    background: rgba(0, 240, 255, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
}
.recover-session-time {
    font-size: 11px;
    color: var(--text-muted);
}
.recover-session-space {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}
.recover-session-transform {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.recover-session-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.06);
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.recover-session-btn:hover {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #0a0a0f;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.2);
}

/* Light theme adjustments */
[data-theme="light"] .recover-panel {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .recover-session-card {
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .recover-session-card:hover {
    border-color: var(--neon-cyan);
}


/* ============================================================
   VIDEO EDITOR — Styles
   ============================================================ */

/* Toggle Button */
.editor-toggle-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-align: left;
}
.editor-toggle-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.04);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.06);
}
.editor-toggle-btn.editor-toggle-open {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.04);
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid var(--border);
}
.editor-toggle-icon {
    font-size: 12px;
    color: var(--neon-cyan);
    transition: transform 0.3s;
    width: 16px;
    text-align: center;
}
.editor-toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}
.editor-collapsible {
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-top: none;
    border-radius: 0 0 14px 14px;
    background: var(--bg-card);
    overflow: hidden;
}
[data-theme="light"] .editor-toggle-btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
[data-theme="light"] .editor-toggle-btn:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.editor-section {
    max-width: 800px;
    margin: 30px auto 0;
    padding: 0 16px;
}
.editor-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

/* Header */
.editor-header {
    text-align: center;
    margin-bottom: 30px;
}
.editor-header-badge {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 50px;
    font-size: 11px;
    color: var(--neon-cyan);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 12px;
}
.editor-header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}
.editor-header-desc {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto;
}

/* Panels */
.editor-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.editor-panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 0 0 14px;
    letter-spacing: 0.5px;
}
.editor-panel-title .editor-reorder-hint {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.editor-optional {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Drop Zone */
.editor-drop-zone {
    border: 2px dashed rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 240, 255, 0.02);
}
.editor-drop-zone:hover, .editor-drop-zone.drag-over {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.06);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.05);
}
.editor-drop-icon {
    font-size: 36px;
    margin-bottom: 10px;
}
.editor-drop-zone p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 6px;
}
.editor-drop-zone strong {
    color: var(--neon-cyan);
}
.editor-drop-hint {
    font-size: 11px;
    color: var(--text-muted);
}
.editor-total-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    font-family: 'Fira Code', monospace;
}

/* Clip Cards */
.editor-clip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.editor-empty-msg {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}
/* ===== VIDEO PREVIEW PANEL (Canva Style) ===== */
.editor-preview-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.editor-preview-video-wrap {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.editor-preview-video-wrap.horizontal {
    aspect-ratio: 16/9;
    max-width: 280px;
}
.editor-preview-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.editor-preview-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.editor-preview-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    color: var(--text-muted);
    font-size: 14px;
}
.editor-preview-overlay.hidden {
    display: none;
}
.editor-preview-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}
.editor-preview-time {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}
.editor-preview-play-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    background: rgba(0,240,255,0.1);
    color: var(--neon-cyan);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.editor-preview-play-btn:hover {
    background: rgba(0,240,255,0.2);
    box-shadow: 0 0 20px rgba(0,240,255,0.2);
}
.editor-preview-mode-toggle {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    background: var(--bg-elevated);
    padding: 3px;
    border-radius: 8px;
}
.editor-preview-mode-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-preview-mode-btn:hover {
    color: var(--text-primary);
}
.editor-preview-mode-btn.active {
    background: rgba(0,240,255,0.15);
    color: var(--neon-cyan);
}

/* ===== VISUAL TIMELINE EDITOR ===== */
.editor-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.editor-timeline-header .editor-panel-title {
    margin: 0;
}
.editor-timeline-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.editor-undo-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(0,240,255,0.4);
    background: rgba(0,240,255,0.1);
    color: var(--neon-cyan);
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-undo-btn:hover:not(:disabled) {
    background: rgba(0,240,255,0.2);
    border-color: var(--neon-cyan);
}
.editor-undo-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.editor-split-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(168,85,247,0.4);
    background: rgba(168,85,247,0.1);
    color: var(--neon-purple);
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-split-btn:hover:not(:disabled) {
    background: rgba(168,85,247,0.2);
    border-color: var(--neon-purple);
}
.editor-split-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.editor-timeline-shortcuts {
    margin-bottom: 10px;
    padding: 6px 10px;
    background: rgba(0,240,255,0.03);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-muted);
}
.editor-timeline-shortcuts kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    margin: 0 2px;
}
.editor-timeline-zoom {
    display: flex;
    align-items: center;
    gap: 6px;
}
.editor-zoom-btn {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(0,240,255,0.3);
    background: rgba(0,240,255,0.08);
    color: var(--neon-cyan);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.editor-zoom-btn:hover {
    background: rgba(0,240,255,0.15);
    border-color: var(--neon-cyan);
}
.editor-zoom-label {
    font-size: 11px;
    color: var(--text-muted);
}
.editor-timeline-duration-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0,240,255,0.2);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
}

/* Context Menu */
.editor-context-menu {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    min-width: 180px;
    padding: 6px 0;
    z-index: 1000;
}
.editor-ctx-header {
    padding: 8px 14px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.editor-ctx-item {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}
.editor-ctx-item:hover {
    background: rgba(0,240,255,0.1);
}
.editor-ctx-item.active {
    color: var(--neon-cyan);
}
.editor-ctx-danger {
    color: #ff6666;
}
.editor-ctx-danger:hover {
    background: rgba(255,68,68,0.1);
}
.editor-ctx-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Multi-select highlight */
.editor-tl-block-multi {
    outline: 2px solid var(--neon-purple);
    outline-offset: 2px;
}

/* Speed badge on clip */
.editor-tl-block-speed {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(0,0,0,0.7);
    padding: 2px 5px;
    border-radius: 3px;
}
.editor-tl-block-speed:empty {
    display: none;
}

/* Audio track buttons */
.editor-tl-audio-mute,
.editor-tl-audio-play {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.editor-tl-audio-mute:hover,
.editor-tl-audio-play:hover {
    background: rgba(255,255,255,0.2);
}
.editor-tl-audio-bar.muted {
    opacity: 0.5;
    border-style: dashed;
}
.editor-tl-audio-vol {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    margin-left: auto;
    padding-right: 6px;
}

/* Playhead / Scrubber - stays inside timeline */
.editor-visual-timeline {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 10px;
}
.editor-playhead {
    position: absolute;
    top: 22px;
    height: calc(100% - 32px);
    width: 3px;
    z-index: 25;
    cursor: ew-resize;
    pointer-events: auto;
}
.editor-playhead-handle {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--neon-purple);
    border-radius: 3px 3px 50% 50%;
    cursor: ew-resize;
    box-shadow: 0 2px 8px rgba(168,85,247,0.4);
    transition: transform 0.1s;
}
.editor-playhead-handle:hover {
    transform: translateX(-50%) scale(1.15);
}
.editor-playhead-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--neon-purple);
    box-shadow: 0 0 8px rgba(168,85,247,0.5);
}

/* Transition indicator between clips */
.editor-tl-transition {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(0,240,255,0.2));
    border: 2px solid rgba(168,85,247,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: default;
    z-index: 15;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.editor-tl-transition:hover {
    transform: translate(-50%, -50%) scale(1.1);
    border-color: var(--neon-purple);
}

/* Audio Track */
.editor-tl-track-label {
    font-size: 10px;
    color: var(--text-muted);
    padding: 6px 0 2px 4px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}
.editor-tl-audio-track {
    position: relative;
    height: 40px;
    background: linear-gradient(90deg, rgba(34,197,94,0.05) 0%, rgba(34,197,94,0.02) 100%);
    border-radius: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}
.editor-tl-audio-bar {
    position: absolute;
    top: 4px;
    left: 0;
    height: 32px;
    background: linear-gradient(135deg, rgba(34,197,94,0.25), rgba(34,197,94,0.15));
    border: 2px solid rgba(34,197,94,0.5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    min-width: 100px;
}
.editor-tl-audio-icon {
    font-size: 14px;
}
.editor-tl-audio-name {
    font-size: 10px;
    color: #22c55e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.editor-tl-audio-waveform {
    flex: 1;
    height: 16px;
    background: repeating-linear-gradient(
        90deg,
        rgba(34,197,94,0.3) 0px,
        rgba(34,197,94,0.5) 2px,
        rgba(34,197,94,0.2) 4px,
        rgba(34,197,94,0.6) 6px,
        rgba(34,197,94,0.3) 8px
    );
    border-radius: 3px;
    opacity: 0.7;
}
.editor-tl-audio-remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(255,68,68,0.7);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.editor-tl-audio-remove:hover {
    background: #ff4444;
    transform: scale(1.1);
}

/* Audio Controls Panel */
.editor-music-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.editor-music-icon {
    font-size: 18px;
}
.editor-music-name {
    flex: 1;
    font-size: 13px;
    color: #22c55e;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.editor-audio-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(34,197,94,0.05);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 8px;
}
.editor-slider-green::-webkit-slider-thumb {
    background: #22c55e !important;
}
.editor-slider-green::-moz-range-thumb {
    background: #22c55e !important;
}
.editor-audio-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 2px;
}

.editor-visual-timeline {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Time ruler */
.editor-tl-ruler {
    position: relative;
    height: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.editor-tl-ruler-mark {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(0,240,255,0.2);
}
.editor-tl-ruler-mark span {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 9px;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

/* Track (clips container) */
.editor-tl-track {
    position: relative;
    height: 80px;
    background: linear-gradient(90deg, rgba(0,240,255,0.02) 0%, rgba(168,85,247,0.02) 100%);
    border-radius: 6px;
    min-width: 100%;
}

/* Individual clip block */
.editor-tl-block {
    position: absolute;
    top: 4px;
    height: 72px;
    background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(168,85,247,0.15));
    border: 2px solid rgba(0,240,255,0.3);
    border-radius: 8px;
    cursor: grab;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 30px;
}
.editor-tl-block:hover {
    border-color: rgba(0,240,255,0.5);
}
.editor-tl-block.editor-tl-block-selected {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0,240,255,0.25);
}
.editor-tl-block.dragging {
    opacity: 0.4;
    cursor: grabbing;
}
.editor-tl-block.drag-target {
    border-color: var(--neon-purple);
    box-shadow: 0 0 12px rgba(168,85,247,0.3);
}

.editor-tl-block-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Video thumbnail inside block — no crop, show full video */
.editor-tl-block-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    pointer-events: none;
}

/* Info overlay */
.editor-tl-block-info {
    position: absolute;
    bottom: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.editor-tl-block-num {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #0a0a0f;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.editor-tl-block-dur {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Remove button */
.editor-tl-block-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255,68,68,0.85);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.editor-tl-block-remove:hover {
    background: #ff4444;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255,68,68,0.6);
}

/* Resize handles for trimming */
.editor-tl-handle {
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    background: rgba(0,240,255,0.4);
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}
.editor-tl-block:hover .editor-tl-handle {
    opacity: 1;
}
.editor-tl-handle-left {
    left: 0;
    border-radius: 6px 0 0 6px;
}
.editor-tl-handle-right {
    right: 0;
    border-radius: 0 6px 6px 0;
}
.editor-tl-handle:hover {
    background: var(--neon-cyan);
}

/* Legacy clip card styles (hidden) */
.editor-clip-card { display: none; }

/* ===== TRIM PANEL (below timeline) ===== */
.editor-trim-panel {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.editor-trim-panel-inner {
    background: var(--bg-card);
    border: 1px solid rgba(0,240,255,0.1);
    border-radius: 10px;
    padding: 14px 16px;
}
.editor-trim-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.editor-trim-panel-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-cyan);
}
.editor-trim-panel-name {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}
.editor-trim-delete-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255,68,68,0.4);
    border-radius: 6px;
    background: rgba(255,68,68,0.1);
    color: #ff6666;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-trim-delete-btn:hover {
    background: rgba(255,68,68,0.25);
    border-color: #ff4444;
    color: #ff4444;
}

/* Trim controls (used in trim panel) */
.editor-trim-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.editor-trim-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}
.editor-trim-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-surface);
    border-radius: 2px;
    outline: none;
    touch-action: none;
}
.editor-trim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--neon-cyan);
    cursor: pointer;
}
.editor-trim-val {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    min-width: 32px;
    text-align: right;
}

/* Controls Grid */
.editor-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.editor-panel-half {
    margin-bottom: 16px;
}
.editor-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.editor-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-surface);
    border-radius: 2px;
    outline: none;
    touch-action: none;
}
.editor-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--neon-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0,240,255,0.3);
}
.editor-slider-val {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: var(--neon-cyan);
    min-width: 36px;
    text-align: right;
    font-weight: 600;
}
.editor-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
    outline: none;
}
.editor-select:focus {
    border-color: var(--neon-cyan);
}
.editor-label-sm {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Upload buttons */
.editor-upload-btn {
    padding: 10px 20px;
    border: 1px dashed rgba(0,240,255,0.2);
    border-radius: 10px;
    background: rgba(0,240,255,0.03);
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-upload-btn:hover {
    background: rgba(0,240,255,0.08);
    border-color: var(--neon-cyan);
}

/* Music info */
.editor-music-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 10px;
}
.editor-music-name {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.editor-remove-small {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.editor-remove-small:hover {
    background: rgba(255,68,68,0.15);
    color: #ff6666;
}

/* Watermark */
.editor-wm-info {
    margin-top: 12px;
}
.editor-wm-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.editor-wm-preview-img {
    width: 60px; height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 4px;
}
.editor-wm-drag-label {
    font-size: 11px;
    color: var(--text-muted);
    margin: 12px 0 6px;
}
.editor-wm-drag-area {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    /* Grid overlay */
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 25% 25%;
}
.editor-wm-handle {
    position: absolute;
    width: 30px; height: 30px;
    background: rgba(0,240,255,0.2);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: var(--neon-cyan);
    cursor: grab;
    transform: translate(-50%, -50%);
    transition: box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.editor-wm-handle:hover {
    box-shadow: 0 0 15px rgba(0,240,255,0.3);
}

/* Action Buttons */
.editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}
.editor-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}
.editor-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.editor-btn-preview {
    background: var(--bg-elevated);
    border: 1px solid rgba(0,240,255,0.2);
    color: var(--neon-cyan);
}
.editor-btn-preview:hover:not(:disabled) {
    background: rgba(0,240,255,0.1);
    box-shadow: 0 0 20px rgba(0,240,255,0.1);
}
.editor-btn-export {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #0a0a0f;
}
.editor-btn-export:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,240,255,0.2);
}

/* Alternative Export */
.editor-alt-export {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.editor-btn-alt {
    padding: 10px 18px;
    border: 1px dashed rgba(0,240,255,0.25);
    border-radius: 10px;
    background: transparent;
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-btn-alt:hover:not(:disabled) {
    background: rgba(0,240,255,0.06);
    border-color: var(--neon-cyan);
}
.editor-btn-alt:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.editor-alt-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* Export Progress */
.editor-export-progress {
    margin-top: 16px;
}
.editor-export-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}
.editor-export-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 3px;
    transition: width 0.3s;
}
.editor-export-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
    font-family: 'Fira Code', monospace;
}

/* Preview Modal */
.editor-preview-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-preview-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-preview-inner canvas {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    background: #000;
}
.editor-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 6px 16px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.editor-preview-close:hover {
    background: rgba(255,68,68,0.3);
}

/* Editor Toast */
.editor-toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    z-index: 10001;
    transition: bottom 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.editor-toast.show {
    bottom: 30px;
}

/* Light theme */
[data-theme="light"] .editor-drop-zone {
    border-color: rgba(8,145,178,0.3);
    background: rgba(8,145,178,0.02);
}
[data-theme="light"] .editor-tl-block {
    border-color: rgba(8,145,178,0.3);
    background: linear-gradient(135deg, rgba(8,145,178,0.1), rgba(124,58,237,0.1));
}
[data-theme="light"] .editor-tl-block.editor-tl-block-selected {
    border-color: var(--neon-cyan);
}
[data-theme="light"] .editor-wm-drag-area {
    background-image:
        linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

/* Responsive */
@media (max-width: 600px) {
    .editor-controls-grid {
        grid-template-columns: 1fr;
    }
    .editor-actions {
        grid-template-columns: 1fr;
    }
    .editor-trim-row {
        grid-template-columns: 1fr;
    }
}

/* Full width panel */
.editor-panel-full {
    width: 100%;
}
.editor-transition-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.editor-hint-text {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
}


/* ============================================================
   FORM CATEGORY ACCORDION — 3 Section Layout
   ============================================================ */
.form-category {
    margin-bottom: 12px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(12, 12, 26, 0.5);
}
[data-theme="light"] .form-category {
    border-color: rgba(8, 145, 178, 0.15);
    background: rgba(255, 255, 255, 0.5);
}
.category-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(0, 240, 255, 0.04);
    border: none;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    transition: all 0.3s ease;
}
.category-toggle:hover {
    background: rgba(0, 240, 255, 0.08);
}
.cat-icon {
    font-size: 20px;
}
.cat-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    text-align: left;
}
.cat-status {
    font-size: 11px;
    font-family: 'Fira Code', monospace;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.cat-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.form-category.collapsed .cat-arrow {
    transform: rotate(-90deg);
}
.category-content {
    padding: 4px 16px 16px;
    transition: all 0.3s ease;
}
.form-category.collapsed .category-content {
    display: none;
}

/* Custom Flooring Textarea */
#customFlooringWrap textarea,
#customCeilingWrap textarea,
#customWindowWrap textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    resize: vertical;
}

/* ============================================================
   VISUAL SELECTION CARDS — Replace dropdowns with clickable tiles
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}
.card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .card-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .card-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    background: rgba(12, 12, 30, 0.5);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    position: relative;
    min-height: 52px;
    justify-content: center;
}
[data-theme="light"] .sel-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(8, 145, 178, 0.12);
}
.sel-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.08);
}
.sel-card.selected {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.03);
}
.sel-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 11px;
    color: var(--neon-cyan);
    font-weight: 700;
}
.sel-card-emoji {
    font-size: 20px;
    line-height: 1;
}
.sel-card-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}
.sel-card-desc {
    font-size: 8px;
    color: var(--text-muted);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* "Add Custom" card styling */
.sel-card.custom-card {
    border-style: dashed;
    opacity: 0.7;
}
.sel-card.custom-card:hover {
    opacity: 1;
}
.sel-card.custom-card.selected {
    opacity: 1;
    border-style: solid;
}

/* Category cards — bigger, first interaction */
.sel-card.category-card {
    padding: 18px 12px;
    min-height: 90px;
    gap: 6px;
    border-width: 2px;
    border-color: rgba(0, 240, 255, 0.2);
}
.sel-card.category-card .sel-card-emoji {
    font-size: 32px;
}
.sel-card.category-card .sel-card-name {
    font-size: 14px;
    font-weight: 700;
}
.sel-card.category-card .sel-card-desc {
    font-size: 10px;
}
.sel-card.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.12);
}
.sel-card.category-card.selected {
    border-width: 2px;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.2), inset 0 0 25px rgba(0, 240, 255, 0.05);
}

/* Category sub-labels for flooring groups */
.card-group-label {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0 2px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    margin-bottom: 2px;
}

/* ============================================================
   PROMPT CARDS GRID — Compact clickable cards
   ============================================================ */
.prompt-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin: 12px 0 20px;
}
.prompt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
}
.prompt-card:hover {
    border-color: rgba(0,240,255,0.3);
    background: rgba(0,240,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,240,255,0.1);
}
.prompt-card:active {
    transform: translateY(0);
    background: rgba(0,240,255,0.1);
}
.prompt-card.copied {
    border-color: rgba(0,255,120,0.5);
    background: rgba(0,255,120,0.08);
}
.prompt-card-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #0a0a0f;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.prompt-card-badge.vid {
    background: var(--accent-purple);
    border-radius: 8px;
    width: auto;
    padding: 0 6px;
    font-size: 10px;
}
.prompt-card-emoji {
    font-size: 28px;
    line-height: 1;
}
.prompt-card-name {
    font-size: 12px;
    font-weight: 700;
    color: #eee;
    line-height: 1.2;
}
.prompt-card-desc {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    line-height: 1.3;
}
.prompt-card-copy {
    font-size: 10px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.prompt-card:hover .prompt-card-copy {
    opacity: 1;
}
.prompt-hidden {
    display: none !important;
}

/* Highlight cards for reveal moments */
.prompt-card.highlight-card {
    border-color: rgba(240,192,0,0.2);
    background: rgba(240,192,0,0.03);
}
.prompt-card.highlight-card:hover {
    border-color: rgba(240,192,0,0.4);
    background: rgba(240,192,0,0.08);
    box-shadow: 0 4px 15px rgba(240,192,0,0.12);
}
.prompt-card.highlight-card.gold {
    border-color: rgba(255,215,0,0.25);
    background: rgba(255,215,0,0.04);
}
.prompt-card.highlight-card.gold:hover {
    border-color: rgba(255,215,0,0.5);
    background: rgba(255,215,0,0.1);
    box-shadow: 0 4px 15px rgba(255,215,0,0.15);
}

/* Video guide compact */
.video-guide-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 10px;
}
.video-guide-box h2 { display: none; }
.video-mapping { color: rgba(255,255,255,0.5); }

@media (max-width: 480px) {
    .prompt-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .prompt-card { padding: 10px 6px 8px; }
    .prompt-card-emoji { font-size: 22px; }
    .prompt-card-name { font-size: 11px; }
    .prompt-card-desc { font-size: 9px; }
}
