/* ==========================================================================
   SlideGen.AI Studio Pro - High-End Human-Crafted Design System
   Architecture: Obsidian / Carbon Dark Canvas with Precision Specular Glass
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Carbon & Deep Obsidian */
    --bg-base: #06070a;
    --bg-canvas: #090b10;
    --bg-panel: rgba(13, 16, 24, 0.78);
    --bg-panel-solid: #0d1018;
    --bg-surface: rgba(22, 27, 40, 0.7);
    --bg-surface-hover: rgba(30, 37, 54, 0.85);
    --bg-elevated: #161b28;
    --bg-input: rgba(5, 7, 12, 0.65);
    --bg-input-focus: rgba(8, 11, 18, 0.85);

    /* Specular Borders & Separators */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-default: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-focus: #6366f1;
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Brand & Accent Highlights */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --accent: #8b5cf6;
    --brand-cyan: #06b6d4;
    --brand-emerald: #10b981;
    --brand-amber: #f59e0b;
    --brand-rose: #f43f5e;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-hero: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #818cf8 100%);
    --gradient-accent-btn: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Typography */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-tertiary: #64748b;
    --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Radii & Shadows */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 28px rgba(99, 102, 241, 0.3);
}

/* ========================================
   GLOBAL RESETS & BACKGROUND
   ======================================== */

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-top: 72px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Studio Ambient Grid Backdrop */
.studio-ambient-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--bg-base);
}

.grid-spotlight {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 550px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.05) 40%, transparent 70%);
    filter: blur(40px);
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 50% 30%, rgba(0, 0, 0, 0.7) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgba(0, 0, 0, 0.7) 0%, transparent 80%);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: rgba(8, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.logo-icon-badge {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo-text-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.logo-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: white;
}

.logo-ai {
    color: var(--primary);
}

.logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.8px;
    font-family: var(--font-mono);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Privacy Status Badge */
.privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: default;
    transition: all 0.2s;
    font-family: var(--font-mono);
}

.privacy-badge:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.engine-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    color: var(--text-main);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.engine-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

/* ========================================
   BUTTONS & CONTROLS
   ======================================== */

.btn-primary {
    background: var(--gradient-accent-btn);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-default);
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--border-hover);
    color: white;
}

.btn-secondary:disabled, .btn-success:disabled, .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.small {
    padding: 0.42rem 0.85rem;
    font-size: 0.82rem;
}

.icon-only {
    padding: 0.42rem 0.65rem !important;
}

.full-width {
    width: 100%;
}

.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: rotate(30deg);
    animation: buttonShimmer 5s infinite;
}

@keyframes buttonShimmer {
    0% { transform: translateX(-100%) rotate(30deg); }
    30%, 100% { transform: translateX(100%) rotate(30deg); }
}

/* Export Dropdown */
.export-dropdown-container {
    display: inline-flex;
    position: relative;
}

.export-dropdown-container .btn-success:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.export-dropdown-container .btn-success:nth-child(2) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 150;
    min-width: 230px;
    animation: fadeIn 0.15s ease;
}

.export-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.15s;
}

.export-item i {
    color: #818cf8;
    width: 16px;
    text-align: center;
}

.export-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: white;
}

/* ========================================
   HERO BANNER
   ======================================== */

.hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    padding: 0.35rem 0.95rem;
    border-radius: 24px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.6px;
    font-family: var(--font-mono);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 6px #6366f1;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-gradient-text {
    background: var(--gradient-hero);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-features-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.feature-tag i {
    color: #818cf8;
}

.feature-tag:hover {
    border-color: var(--border-default);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.07);
}

/* ========================================
   APP WORKBENCH GRID CONTAINER
   ======================================== */

.app-container {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 1.5rem;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem 2.5rem;
    min-height: 760px;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.panel-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 13, 20, 0.7);
}

.panel-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}

.panel-header h2 i {
    color: var(--primary);
}

.badge {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    font-size: 0.74rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-family: var(--font-mono);
}

/* ========================================
   LEFT PANEL: DECK ARCHITECT
   ======================================== */

.input-panel {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.input-panel::-webkit-scrollbar {
    width: 6px;
}

.input-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Input Tabs */
.input-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(5, 7, 12, 0.5);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.35rem 0.6rem;
    gap: 0.35rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.55rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn.active i {
    color: var(--primary);
}

.tab-content {
    display: none;
    padding-top: 1.1rem;
}

.tab-content.active {
    display: block;
}

/* Inspiration Topic Pills */
.topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.pill-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
    color: white;
    transform: translateY(-1px);
}

/* Upload Zone */
.upload-zone {
    margin: 0.4rem 1.4rem 0.8rem;
    padding: 1.8rem 1rem;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    text-align: center;
    background: rgba(5, 7, 12, 0.4);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
}

.upload-zone i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.upload-zone p {
    color: white;
    font-size: 0.88rem;
}

.upload-hint {
    font-size: 0.74rem;
    color: var(--text-tertiary);
    max-width: 280px;
}

.file-info-badge {
    margin: 0 1.4rem 0.8rem;
    padding: 0.6rem 0.85rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    color: #34d399;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.or-divider {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    padding: 0 1.4rem 0.95rem;
}

.form-row {
    display: flex;
    gap: 0.85rem;
    padding: 0 1.4rem;
}

.form-row .form-group {
    padding-left: 0;
    padding-right: 0;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.38rem;
    letter-spacing: -0.01em;
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.38rem;
}

.label-with-action label { margin-bottom: 0; }

.btn-text-action {
    background: none;
    border: none;
    color: #818cf8;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.btn-text-action:hover {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
}

input, textarea, select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: white;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    background: var(--bg-input-focus);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.styled-select {
    cursor: pointer;
    background-color: var(--bg-input);
}

.styled-select option {
    background-color: #0b0e17;
    color: white;
}

.main-content-textarea {
    min-height: 145px;
    resize: vertical;
    font-size: 0.84rem;
    line-height: 1.55;
}

.shared-settings {
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.95rem;
    margin-top: 0.4rem;
}

/* Visual Options Controls */
.visual-options-group {
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    margin: 0.4rem 1.4rem 0.95rem;
    padding: 0.85rem;
}

.highlight-label {
    color: #c7d2fe !important;
    font-weight: 600;
}

.visual-style-row {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.options-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.options-row.space-between {
    justify-content: space-between;
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* AI Status & Progress Bar */
.ai-status-container {
    margin: 0 1.4rem 0.95rem;
    padding: 0.85rem;
    background: rgba(10, 14, 22, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.ai-status-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #c7d2fe;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.action-area {
    padding: 1.1rem 1.4rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(8, 10, 16, 0.5);
    margin-top: auto;
}

/* ========================================
   RIGHT PANEL: INTERACTIVE STUDIO
   ======================================== */

.preview-panel {
    position: relative;
    display: flex;
    flex-direction: column;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

/* Per-Slide Studio Toolbar */
.slide-studio-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 1.2rem;
    background: rgba(10, 13, 20, 0.9);
    border-bottom: 1px solid var(--glass-border);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toolbar-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.small-select {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    width: auto;
    border-radius: var(--radius-xs);
}

/* Custom Accent Picker */
.custom-accent-wrapper {
    display: flex;
    align-items: center;
    margin-left: 0.4rem;
}

.accent-color-label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

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

.accent-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.accent-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
    color: white;
}

.toolbar-btn.highlight-btn {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.4);
}

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

.toolbar-btn.text-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Studio Canvas Viewport */
.preview-viewport {
    flex: 1;
    background: var(--bg-canvas);
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
    position: relative;
    min-height: 440px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    max-width: 440px;
}

.empty-state i {
    font-size: 3.2rem;
    margin-bottom: 0.9rem;
    opacity: 0.35;
    color: var(--primary);
}

.empty-state h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.empty-privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #34d399;
    background: rgba(16, 185, 129, 0.08);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-family: var(--font-mono);
}

/* ========================================
   SLIDE PREVIEW & CANVAS STYLING
   ======================================== */

.slide-preview {
    width: 100%;
    max-width: 890px;
    aspect-ratio: 16 / 9;
    background: white;
    color: black;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
    border-radius: var(--radius-md);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slide-preview.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.96);
}

/* Contenteditable Styling */
[contenteditable="true"] {
    outline: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: text;
}

[contenteditable="true"]:hover {
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

[contenteditable="true"]:focus {
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 0 2px var(--primary);
}

.slide-preview h1 {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
    text-rendering: optimizeLegibility;
    font-family: inherit;
}

.slide-preview h2 {
    font-size: 1.25rem;
    opacity: 0.88;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.01em;
    font-family: inherit;
}

.slide-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.slide-header-area {
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 2;
}

.slide-body-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.slide-preview ul {
    list-style-position: inside;
    font-size: 1.08rem;
    line-height: 1.68;
    font-weight: 400;
}

.slide-preview li {
    margin-bottom: 0.55rem;
}

.slide-callout {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid currentColor;
}

/* ========================================
   🛰️ BESPOKE FUTURISTIC DECORATIVE LAYERS
   ======================================== */

.deco-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* 1. HUD Matrix Grid */
.hud-matrix-deco { opacity: 0.9; }
.hud-grid-svg { width: 100%; height: 100%; position: absolute; inset: 0; }

/* 2. Cyber Borders & Corner Brackets */
.cyber-borders-deco { position: absolute; inset: 12px; }
.cyber-corner { position: absolute; width: 22px; height: 22px; border-style: solid; border-width: 0; opacity: 0.85; }
.cyber-corner.top-left { top: 0; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; }
.cyber-corner.top-right { top: 0; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; }
.cyber-corner.bottom-left { bottom: 0; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; }
.cyber-corner.bottom-right { bottom: 0; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; }
.cyber-crosshair { position: absolute; font-family: monospace; font-size: 10px; opacity: 0.6; font-weight: 800; }
.cyber-crosshair.center-left { top: 50%; left: 4px; transform: translateY(-50%); }
.cyber-crosshair.center-right { top: 50%; right: 4px; transform: translateY(-50%); }

/* 3. Hologram Scanline */
.hologram-scanline {
    position: absolute;
    width: 100%;
    height: 2px;
    opacity: 0.4;
    animation: scanlineSweep 4s linear infinite;
    box-shadow: 0 0 12px currentColor;
}
@keyframes scanlineSweep {
    0% { top: 0%; opacity: 0.1; }
    50% { opacity: 0.5; }
    100% { top: 100%; opacity: 0.1; }
}

/* 4. Sci-Fi Hexagon Mesh */
.hex-mesh-deco { opacity: 0.85; }
.hex-grid-svg { width: 100%; height: 100%; position: absolute; inset: 0; }

/* 5. Minimalist Orbital Rings */
.orbital-deco { position: absolute; inset: 0; }
.orbit-circle {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-width: 1px;
    opacity: 0.2;
    transform: translate(-50%, -50%);
}
.orbit-1 { width: 450px; height: 450px; top: 15%; right: -150px; }
.orbit-2 { width: 300px; height: 300px; top: 15%; right: -75px; border-style: dashed; opacity: 0.35; animation: spinOrbit 30s linear infinite; }
.orbit-3 { width: 160px; height: 160px; top: 15%; right: -5px; opacity: 0.5; }
@keyframes spinOrbit {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 6. Geometric Bauhaus Shapes */
.bauhaus-deco { position: absolute; inset: 0; }
.bauhaus-pillar { position: absolute; top: 0; bottom: 0; right: 80px; width: 32px; opacity: 0.15; }
.bauhaus-circle { position: absolute; top: 60px; right: 40px; width: 110px; height: 110px; border-radius: 50%; opacity: 0.25; }
.bauhaus-accent-bar { position: absolute; bottom: 50px; right: 30px; width: 140px; height: 8px; border-radius: 4px; }

/* 7. Quantum Rings */
.quantum-rings-deco {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 320px;
    height: 320px;
}
.quantum-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed currentColor;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.35;
}
.ring-outer { width: 280px; height: 280px; animation: spinClockwise 25s linear infinite; }
.ring-mid { width: 190px; height: 190px; border-style: solid; border-width: 1.5px; opacity: 0.25; animation: spinCounter 18s linear infinite; }
.ring-inner { width: 110px; height: 110px; border-style: dotted; opacity: 0.45; animation: spinClockwise 12s linear infinite; }
.quantum-core-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    box-shadow: 0 0 16px currentColor;
}
@keyframes spinClockwise { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinCounter { from { transform: translate(-50%, -50%) rotate(360deg); } to { transform: translate(-50%, -50%) rotate(0deg); } }

/* 8. Particle Field */
.particle-field-deco {
    position: absolute;
    inset: 0;
    opacity: 0.75;
}
.particle-star {
    animation: particleTwinkle 3s ease-in-out infinite alternate;
}
@keyframes particleTwinkle {
    0% { opacity: 0.2; transform: scale(0.8); }
    100% { opacity: 0.9; transform: scale(1.3); }
}

/* 9. Radar Telemetry Scan */
.radar-scan-deco {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 160px;
    height: 160px;
}
.radar-sweep-beam {
    transform-origin: 80px 80px;
    animation: radarSweep 4s linear infinite;
}
@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 10. Cyber Glitch Offset */
.glitch-offset-deco {
    position: absolute;
    top: 25px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    opacity: 0.8;
}
.glitch-bar { height: 2px; border-radius: 1px; }
.bar-1 { width: 90px; }
.bar-2 { width: 55px; opacity: 0.6; }
.bar-3 { width: 120px; opacity: 0.4; }
.glitch-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* 11. Synthetic DNA Double Helix */
.dna-helix-deco {
    position: absolute;
    right: 15px;
    top: 10%;
    height: 80%;
    width: 60px;
    opacity: 0.85;
}

/* 12. Waveform Equalizer Spectrum */
.waveform-eq-deco {
    position: absolute;
    bottom: 25px;
    right: 35px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 35px;
    opacity: 0.85;
}
.eq-bar {
    width: 4px;
    border-radius: 2px;
    animation: eqBounce 1.2s ease-in-out infinite alternate;
}
.eq-1 { height: 40%; animation-delay: 0.1s; }
.eq-2 { height: 75%; animation-delay: 0.3s; }
.eq-3 { height: 100%; animation-delay: 0.2s; }
.eq-4 { height: 60%; animation-delay: 0.4s; }
.eq-5 { height: 85%; animation-delay: 0.15s; }
.eq-6 { height: 50%; animation-delay: 0.35s; }
.eq-7 { height: 30%; animation-delay: 0.05s; }
@keyframes eqBounce {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* 13. Isometric Wireframe Hypercube */
.isometric-cube-deco {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 220px;
    height: 220px;
    opacity: 0.85;
}

/* 14. Precision Laser Crosshair Target */
.laser-crosshair-deco {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 140px;
    height: 140px;
}

/* ========================================
   SLIDE LAYOUTS: BENTO, KPI, DIAGRAMS & CHARTS
   ======================================== */

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
    width: 100%;
    margin-top: 0.6rem;
}

.bento-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.1rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
}

.bento-card.highlight {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.bento-icon {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.bento-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.bento-desc {
    font-size: 0.86rem;
    opacity: 0.85;
    line-height: 1.45;
}

/* KPI Metric Layout */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    width: 100%;
    margin-top: 0.8rem;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.3rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.kpi-metric {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-family: inherit;
}

.kpi-label {
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0.9;
}

.kpi-sub {
    font-size: 0.74rem;
    opacity: 0.7;
}

/* Architecture & Flow Diagram */
.diagram-container {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
}

.mermaid-diagram-svg {
    max-width: 100%;
    max-height: 240px;
}

/* Image / Feature Split Layout */
.split-feature-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
    align-items: center;
    width: 100%;
    height: 100%;
}

.split-feature-visual {
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 250px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.split-feature-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Process Timeline Layout */
.timeline-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    width: 100%;
    margin-top: 1rem;
    position: relative;
}

.timeline-step {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.9rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.timeline-step-num {
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
    opacity: 0.7;
}

.timeline-step-title {
    font-size: 0.92rem;
    font-weight: 700;
}

.timeline-step-desc {
    font-size: 0.76rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Comparison Matrix Layout */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    width: 100%;
    margin-top: 0.8rem;
}

.comparison-column {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem;
}

.comparison-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Quote Layout */
.quote-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem 2rem;
}

.quote-mark {
    font-size: 3rem;
    line-height: 1;
    opacity: 0.3;
    margin-bottom: 0.4rem;
}

.quote-text {
    font-size: 1.45rem;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-weight: 500;
}

.quote-author {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Native Chart Layout */
.chart-slide-container {
    width: 100%;
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   SLIDE THUMBNAILS FILMSTRIP
   ======================================== */

.slide-thumbnails-strip {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 1.4rem;
    overflow-x: auto;
    background: rgba(8, 10, 16, 0.85);
    border-top: 1px solid var(--glass-border);
}

.slide-thumbnails-strip::-webkit-scrollbar {
    height: 5px;
}

.slide-thumbnails-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.slide-thumbnail-item {
    flex: 0 0 110px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xs);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
    background: #111;
}

.slide-thumbnail-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.slide-thumbnail-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
    transform: scale(1.04);
}

.thumb-num-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--font-mono);
}

/* ========================================
   BOTTOM SLIDE NAVIGATION
   ======================================== */

.slide-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.4rem;
    background: rgba(10, 13, 20, 0.9);
    border-top: 1px solid var(--glass-border);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-default);
    color: var(--text-main);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#slide-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.notes-toggle-btn {
    font-size: 0.8rem;
    gap: 0.4rem;
}

/* Speaker Notes Drawer */
.speaker-notes-drawer {
    background: rgba(8, 11, 18, 0.95);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 1.4rem;
    animation: slideUp 0.2s ease;
}

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

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.notes-header h4 {
    font-size: 0.86rem;
    font-weight: 700;
    color: #c7d2fe;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.notes-tip {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.notes-body {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
    min-height: 60px;
    max-height: 120px;
    overflow-y: auto;
}

/* ========================================
   MODALS & RAYCAST-STYLE OVERLAYS
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--bg-panel-solid);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.close-modal-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(5, 7, 12, 0.4);
}

/* Engine Option Radio Cards */
.engine-option-card {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.engine-option-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
}

.engine-option-card.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 1px var(--primary);
}

.engine-option-title {
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.engine-option-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ========================================
   PRESENTER MODE FULL-SCREEN CONSOLE
   ======================================== */

.presenter-overlay {
    position: fixed;
    inset: 0;
    background: #05070a;
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.presenter-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: #090c12;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.presenter-brand-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulseDot 1.5s infinite;
}

.presenter-deck-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

.presenter-timer-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.timer-display {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.presenter-main-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    overflow: hidden;
}

.presenter-slide-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020305;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    position: relative;
}

.presenter-side-drawer {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.next-slide-preview-box {
    background: #090c12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.next-slide-preview-box h5 {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-slide-viewport {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.presenter-notes-box {
    flex: 1;
    background: #090c12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.presenter-notes-box h5 {
    font-size: 0.78rem;
    color: #c7d2fe;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.presenter-notes-text {
    flex: 1;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
}

.presenter-bottom-bar {
    padding: 0.85rem 2rem;
    background: #090c12;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========================================
   TEMPLATES CATALOG GALLERY
   ======================================== */

.templates-container {
    max-width: 1480px;
    margin: 4rem auto 3rem;
    padding: 0 1.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.theme-filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.theme-filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.theme-filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: var(--border-default);
}

.theme-filter-btn.active {
    background: var(--gradient-accent-btn);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--primary);
}

.template-card.active-theme {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary), 0 10px 25px rgba(99, 102, 241, 0.3);
}

.template-preview {
    aspect-ratio: 16 / 9;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.template-info {
    padding: 1rem 1.1rem;
    background: rgba(8, 11, 18, 0.9);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.template-info h3 {
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ========================================
   TOAST NOTIFICATION SYSTEM
   ======================================== */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toast {
    background: #0f1422;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.1rem;
    color: white;
    font-size: 0.86rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: toastSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left: 3px solid #10b981; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid #6366f1; }

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   RESPONSIVE DESIGN & PRINT MEDIA
   ======================================== */

@media (max-width: 1180px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .input-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .glass-nav {
        padding: 0.75rem 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .app-container {
        padding: 0.5rem 1rem 2rem;
    }
    
    .bento-grid, .kpi-container, .split-feature-layout, .comparison-container, .timeline-track {
        grid-template-columns: 1fr !important;
    }
    
    .slide-preview {
        padding: 1.5rem;
    }
    
    .slide-preview h1 {
        font-size: 1.5rem;
    }
    
    .slide-preview h2 {
        font-size: 1rem;
    }
}

@media print {
    .no-print, header, .input-panel, .slide-studio-toolbar, .slide-thumbnails-strip, .slide-navigation, .speaker-notes-drawer, .templates-container, .toast-container {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        background: white !important;
        color: black !important;
    }
    
    .app-container {
        display: block;
        padding: 0;
        max-width: 100%;
    }
    
    .glass-panel {
        border: none;
        box-shadow: none;
        background: none;
    }
    
    .slide-preview {
        display: flex !important;
        opacity: 1 !important;
        box-shadow: none !important;
        page-break-after: always;
        max-width: 100%;
    }
}
