/* ==========================================================================
   Taomate H3 - Minimalist, Sleek & Modern AI Studio Theme
   Inspired by Luma Dream Machine & Runway Gen-2
   ========================================================================== */

:root {
    /* Light Palette (Clean Slate / Neutral) */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-subtle: #f8fafc;
    
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-focus: #0f172a;

    --text-main: #090d16;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --brand-accent: #090d16;
    --brand-accent-hover: #1e293b;
    --brand-accent-contrast: #ffffff;

    --accent-glow: rgba(15, 23, 42, 0.06);
    --card-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
    --shadow-float: 0 20px 40px -6px rgba(15, 23, 42, 0.12);
    --shadow-menu: 0 10px 30px -4px rgba(15, 23, 42, 0.15);

    --success-dot: #10b981;
    --danger-dot: #ef4444;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    /* Dark Palette (Deep Onyx / Slate) */
    --bg-page: #090a0f;
    --bg-surface: #11131a;
    --bg-surface-elevated: #161922;
    --bg-hover: #1e222e;
    --bg-subtle: #0d0e14;
    
    --border-subtle: #202433;
    --border-strong: #2e3549;
    --border-focus: #ffffff;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --brand-accent: #ffffff;
    --brand-accent-hover: #e2e8f0;
    --brand-accent-contrast: #090d16;

    --accent-glow: rgba(255, 255, 255, 0.04);
    --card-shadow: 0 4px 28px -2px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 24px 48px -6px rgba(0, 0, 0, 0.6);
    --shadow-menu: 0 14px 34px -4px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ==========================================================================
   Top Realtime Linear Progress Bar (Moves Smoothly Left to Right)
   ========================================================================== */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: transparent;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.top-progress-bar.active {
    opacity: 1;
}

.top-progress-bar .progress-fill {
    width: 0%;
    height: 100%;
    background: var(--brand-accent);
    box-shadow: 0 0 10px var(--brand-accent);
    transition: width 0.3s linear;
}

/* ==========================================================================
   Full Width Modern Navbar
   ========================================================================== */
.navbar {
    width: 100%;
    height: 64px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-subtle);
    padding: 2px 8px;
    background-color: var(--bg-hover);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Icon Buttons (Theme Switcher) */
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Status Pill */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-pill:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-strong);
}

.nav-pill.tier-premium {
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.nav-pill.tier-premium .status-indicator.active {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.nav-pill.tier-premium:hover {
    border-color: rgba(245, 158, 11, 0.7);
    background-color: rgba(245, 158, 11, 0.14);
}

.nav-pill.tier-standard {
    border-color: var(--border-subtle);
    background-color: var(--bg-surface);
}

.nav-pill.tier-standard .status-indicator.active {
    background-color: var(--success-dot);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--danger-dot);
    transition: background-color 0.2s ease;
}

.status-indicator.active {
    background-color: var(--success-dot);
}

.nav-link {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--text-main);
    background-color: var(--bg-hover);
}

/* ==========================================================================
   Workspace Hero & Container
   ========================================================================== */
.main-wrapper {
    width: 100%;
    max-width: 860px;
    padding: 42px 24px 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 64px);
    justify-content: space-between;
}

.hero-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.hero-headline {
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text-main);
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==========================================================================
   Unified Luma / Runway Prompt Container
   ========================================================================== */
.unified-card-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unified-promptbar {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.unified-promptbar:focus-within {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 1px var(--border-strong), var(--card-shadow);
}

.prompt-upper-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Image Slot (80x80 Dropzone / Thumbnail) */
.image-uploader-slot {
    width: 84px;
    height: 84px;
    min-width: 84px;
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--border-strong);
    background-color: var(--bg-subtle);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-uploader-slot:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-hover);
}

.drop-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-subtle);
    font-size: 0.68rem;
    font-weight: 500;
    text-align: center;
}

.drop-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.drop-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
}

.thumb-remove-btn:hover {
    background: rgba(0, 0, 0, 0.95);
}

/* Textarea */
.prompt-text-slot {
    flex: 1;
    display: flex;
}

.unified-textarea {
    width: 100%;
    min-height: 84px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    padding: 4px 0;
}

.unified-textarea::placeholder {
    color: var(--text-subtle);
}

/* Bottom Toolbar Inside Promptbar */
.prompt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    gap: 12px;
}

.toolbar-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.chip-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.73rem;
}

/* ==========================================================================
   Custom Sleek Dropdown (Resolution & Seed)
   ========================================================================== */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-dropdown-btn:hover {
    border-color: var(--border-strong);
    background-color: var(--bg-surface-elevated);
}

.selected-text {
    font-weight: 600;
    color: var(--text-main);
}

.chevron-svg {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.custom-dropdown.open .chevron-svg {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 250px;
    max-height: 280px;
    overflow-y: auto;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-menu);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 3px;
    z-index: 100;
}

/* Modern Sleek Scrollbar (Avoids Ugly White OS Scrollbars) */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.custom-dropdown.open .custom-dropdown-menu {
    display: flex;
    animation: menu-slide-up 0.15s ease-out;
}

@keyframes menu-slide-up {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.15s;
}

.dropdown-item:hover {
    background-color: var(--bg-hover);
}

.dropdown-item.active {
    background-color: var(--bg-hover);
    border-left: 3px solid var(--brand-accent);
}

.item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.item-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Seed Persistence Input in dropdown */
.seed-persistence-input-wrapper {
    padding: 8px 12px 6px 12px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 4px;
}

.seed-persistence-input-wrapper input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--bg-subtle);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    outline: none;
}

.seed-persistence-input-wrapper input:focus {
    border-color: var(--brand-accent);
}

/* ==========================================================================
   Modern Slider (Duration 2-15s)
   ========================================================================== */
.chip-slider-item {
    padding: 4px 12px;
    gap: 8px;
}

.modern-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 4px;
    background: var(--border-strong);
    outline: none;
    cursor: pointer;
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-accent);
    border: 2px solid var(--bg-surface);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-badge {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-main);
    min-width: 24px;
}

/* ==========================================================================
   Stepper Box for Quality & Speed Steps
   ========================================================================== */
.stepper-box input {
    width: 44px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.75rem;
    outline: none;
    text-align: center;
}

/* Toggle Switch Chip */
.toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.toggle-container input {
    display: none;
}

.toggle-slider {
    width: 28px;
    height: 16px;
    background-color: var(--border-strong);
    border-radius: 16px;
    position: relative;
    transition: 0.2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ffffff;
    top: 2px;
    left: 2px;
    transition: 0.2s;
}

.toggle-container input:checked + .toggle-slider {
    background-color: var(--brand-accent);
}

.toggle-container input:checked + .toggle-slider::before {
    transform: translateX(12px);
    background-color: var(--brand-accent-contrast);
}

.toggle-label {
    font-weight: 600;
    color: var(--text-main);
}

/* Primary Action Button (Anchored Bottom Right) */
.btn-generate-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--accent-glow);
    white-space: nowrap;
}

.btn-generate-action:hover:not(:disabled) {
    background-color: var(--brand-accent-hover);
    transform: translateY(-1px);
}

.btn-generate-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.requirement-hint {
    padding: 0 6px;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* ==========================================================================
   Progress & Status Box
   ========================================================================== */
.status-box {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}

.radar-pulse {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    animation: spin-pulse 0.85s linear infinite;
}

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

.status-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-primary {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.status-secondary {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Output Video Showcase (Minimalist Player)
   ========================================================================== */
.output-showcase-box {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.output-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-success {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.output-timestamp {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.btn-download-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-download-pill:hover {
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
}

.video-stage {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #000000;
    display: flex;
    justify-content: center;
}

.video-stage video {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-dialog {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    max-width: 440px;
    width: 100%;
    padding: 24px;
    box-shadow: var(--shadow-float);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-subtle);
    font-size: 20px;
    cursor: pointer;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.modal-body input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--bg-subtle);
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
}

.modal-body input:focus {
    border-color: var(--brand-accent);
}

.modal-error {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--danger-dot);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.btn-ghost {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
}

.btn-solid {
    padding: 8px 16px;
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* Primary Action Button (Compact Icon-Only on Bottom-Right) */
.btn-generate-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--accent-glow);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-generate-action:hover:not(:disabled) {
    background-color: var(--brand-accent-hover);
    transform: translateY(-1px);
}

.btn-generate-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.requirement-hint {
    padding: 0 6px;
    font-size: 0.72rem;
    color: var(--text-subtle);
}

/* ==========================================================================
   Prompt Guide Modal & Chip Styling
   ========================================================================== */
.chip-guide-btn {
    cursor: pointer;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.15s ease;
}

.chip-guide-btn:hover {
    background-color: var(--bg-surface-elevated);
    border-color: var(--border-strong);
    color: var(--brand-accent);
}

.chip-guide-btn svg {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.chip-guide-btn:hover svg {
    color: var(--brand-accent);
}

.modal-dialog.guide-dialog {
    max-width: 760px;
    width: 94%;
    max-height: 88vh;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-main);
}

.guide-instruction-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background-color: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-main);
}

.guide-instruction-box svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #f59e0b;
}

.guide-body-wrapper {
    flex: 1;
    min-height: 180px;
    max-height: 52vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background-color: var(--bg-subtle);
    overflow: hidden;
}

.guide-body-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
}

.guide-file-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-copy-guide {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background-color: var(--bg-hover);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-guide:hover {
    background-color: var(--brand-accent);
    color: var(--brand-accent-contrast);
    border-color: var(--brand-accent);
}

.btn-copy-guide.copied,
.btn-solid.copied {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.guide-pre {
    flex: 1;
    padding: 14px;
    margin: 0;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================================================
   Mobile Responsive Optimizations (Ultra-Clean, Compact Toolbar)
   ========================================================================== */
@media (max-width: 640px) {
    .navbar {
        padding: 0 12px;
        height: 52px;
    }

    .nav-brand {
        gap: 6px;
    }

    .brand-logo {
        width: 24px;
        height: 24px;
    }

    .brand-name {
        font-size: 0.88rem;
    }

    .brand-tag {
        display: none;
    }

    .nav-actions {
        gap: 6px;
    }

    .icon-btn {
        width: 30px;
        height: 30px;
    }

    .nav-pill {
        padding: 4px 8px;
        font-size: 0.68rem;
        gap: 4px;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 2px 4px;
    }

    .main-wrapper {
        min-height: calc(100dvh - 52px);
        padding: 12px 12px 8px 12px;
        gap: 8px;
        justify-content: space-between;
    }

    .hero-header {
        margin-bottom: 4px;
        gap: 4px;
    }

    .hero-headline {
        font-size: 1.32rem;
        line-height: 1.2;
    }

    .hero-desc {
        font-size: 0.73rem;
    }

    .unified-card-container {
        gap: 4px;
        margin-bottom: 0;
    }

    .requirement-hint {
        padding: 0 4px;
        font-size: 0.68rem;
    }

    .unified-promptbar {
        padding: 8px 10px;
        gap: 8px;
    }

    .prompt-upper-row {
        gap: 8px;
    }

    .image-uploader-slot {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }

    .drop-empty svg {
        width: 16px;
        height: 16px;
    }

    .drop-empty span {
        font-size: 0.58rem;
    }

    .unified-textarea {
        min-height: 60px;
        font-size: 0.82rem;
    }

    /* Bottom Toolbar: Compact chips with Icon-only button at right */
    .prompt-toolbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        padding-top: 8px;
    }

    .toolbar-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
        flex: 1;
        justify-content: flex-start;
    }

    .custom-dropdown-btn,
    .chip-item {
        padding: 3px 7px;
        font-size: 0.68rem;
        gap: 4px;
    }

    .chip-slider-item {
        padding: 2px 6px;
        gap: 6px;
    }

    .modern-slider {
        width: 50px;
        height: 3px;
    }

    .slider-badge {
        font-size: 0.68rem;
    }

    .stepper-box input {
        width: 28px;
        font-size: 0.68rem;
    }

    .custom-dropdown-menu {
        min-width: 210px;
        max-width: calc(100vw - 24px);
    }

    .btn-generate-action {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: var(--radius-sm);
    }

    /* Modal Mobile Adjustments */
    .modal-dialog.guide-dialog {
        padding: 16px;
        max-height: 90vh;
        width: 96%;
        gap: 10px;
    }

    .guide-body-wrapper {
        max-height: 46vh;
    }

    .guide-instruction-box {
        font-size: 0.72rem;
        padding: 8px 10px;
    }

    .guide-pre {
        padding: 10px;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}

.toast-msg {
    background-color: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--brand-accent);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: var(--shadow-float);
    animation: toast-slide-in 0.2s ease-out;
    pointer-events: auto;
}

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