/*
 * ASCII Player Video Creator & AI Prompt Generator - Style Sheet
 * Theme: Premium Cyberpunk Terminal (Dark Mode, Glassmorphism, Glowing Accents)
 */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #06070a;
    --bg-card: rgba(13, 16, 23, 0.75);
    --bg-card-hover: rgba(20, 25, 36, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 242, 254, 0.15);
    
    --color-primary: #00f2fe; /* Cyber Cyan */
    --color-secondary: #d946ef; /* Neon Pink/Magenta */
    --color-accent: #10b981; /* Matrix Green */
    --color-warning: #f59e0b; /* Amber Amber */
    --color-text-main: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-text-dim: #4b5563;
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --glow-primary: 0 0 10px rgba(0, 242, 254, 0.5), 0 0 20px rgba(0, 242, 254, 0.2);
    --glow-secondary: 0 0 10px rgba(217, 70, 239, 0.5), 0 0 20px rgba(217, 70, 239, 0.2);
    --glow-accent: 0 0 10px rgba(16, 185, 129, 0.5);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Grid & Stars */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(217, 70, 239, 0.05) 0%, transparent 40%);
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(18, 24, 38, 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 24, 38, 0.25) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
    transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header Section --- */
header {
    background: rgba(6, 7, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition-normal);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.logo span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-mono);
    font-weight: bold;
    box-shadow: var(--glow-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: var(--transition-normal);
}

nav a:hover {
    color: #fff;
}

nav a:hover::after {
    width: 100%;
}

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

/* Language Selector styling */
.lang-selector {
    position: relative;
}

.lang-select-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

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

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #0d1017;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    width: 150px;
    overflow: hidden;
    z-index: 1000;
}

.lang-dropdown.show {
    display: flex;
}

.lang-option {
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-primary);
}

.lang-option.active {
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(0, 242, 254, 0.05);
}

/* --- Hero Section --- */
.hero {
    padding: 5rem 0 3rem 0;
    text-align: center;
    position: relative;
}

.hero-tag {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--color-primary);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 40%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--glow-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-weight: 300;
}

/* --- Tabs Navigation --- */
.app-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 12px;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-btn svg {
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tab-btn.active {
    background: rgba(0, 242, 254, 0.05);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--border-glow);
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.tab-btn.active svg {
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.5));
}

.tab-btn#tab-btn-prompt.active {
    background: rgba(217, 70, 239, 0.05);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.1);
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.3);
}

.tab-btn#tab-btn-prompt.active svg {
    color: var(--color-secondary);
    filter: drop-shadow(0 0 5px rgba(217, 70, 239, 0.5));
}

/* Tab Contents */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

/* --- App Main Stack Layout --- */
.app-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack layout */
    gap: 2rem;
    align-items: start;
    margin-bottom: 5rem;
    width: 100%;
}

.panel-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}


/* Glassmorphic Cards */
.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: border-color var(--transition-normal);
}

.panel-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.panel-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* --- Drag & Drop Area --- */
.uploader-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3.5rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.uploader-zone:hover {
    border-color: var(--color-primary);
    background: rgba(0, 242, 254, 0.02);
    box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.02);
}

.uploader-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(0, 242, 254, 0.05);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.1);
}

.uploader-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: var(--transition-normal);
}

.uploader-zone:hover .uploader-icon,
.uploader-zone.dragover .uploader-icon {
    background: rgba(0, 242, 254, 0.1);
    color: var(--color-primary);
    box-shadow: var(--glow-primary);
    transform: translateY(-5px);
}

.uploader-zone p {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.uploader-zone span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.uploader-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- Terminal display area --- */
.terminal-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    display: none;
}

.terminal-wrapper.active {
    display: block;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 0.35rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.terminal-body {
    background: #000;
    min-height: 400px;
    max-height: 600px;
    overflow: auto;
    padding: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scanline / CRT Effect overlay */
.crt-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    opacity: 0.15;
}

.crt-effect::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: radial-gradient(circle, transparent 70%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* Colored interactive ascii output */
.ascii-output {
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 1;
    white-space: pre;
    color: var(--color-accent);
    letter-spacing: 0;
    margin: auto;
    text-shadow: 0 0 2px rgba(16, 185, 129, 0.3);
    user-select: none;
}

/* GreenPhosphor / Amber CRT presets */
.ascii-output.amber {
    color: var(--color-warning);
    text-shadow: 0 0 2px rgba(245, 158, 11, 0.3);
}

.ascii-output.monochrome {
    color: #fff;
    text-shadow: none;
}

.ascii-output.colorized {
    text-shadow: none;
}

/* Canvas for video capture (hidden) */
.hidden-canvas {
    display: none;
}

/* --- Control Panel Fields --- */
.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
}

.control-label span:last-child {
    font-family: var(--font-mono);
    color: var(--color-primary);
}

/* Styled Range Sliders */
.slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition-fast);
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.8);
    transition: var(--transition-fast);
}

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

/* Styled Select Elements */
.select-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.select-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.15);
}

.select-input option {
    background: #0d1017;
    color: #fff;
}

/* Button UI */
.btn {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--glow-primary);
    transition: var(--transition-normal);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6), 0 0 35px rgba(217, 70, 239, 0.4);
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
    transform: translateY(-2px);
}

/* Options/Checkboxes */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.checkbox-option:hover {
    color: #fff;
}

.checkbox-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.checkbox-option input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.5);
}

.checkbox-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio button controls */
.radio-group {
    display: flex;
    gap: 0.5rem;
}

.radio-btn {
    flex: 1;
}

.radio-btn input {
    display: none;
}

.radio-btn span {
    display: block;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.radio-btn input:checked + span {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--border-glow);
}

/* Live Video Player and Controls Mockup */
.preview-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    background: rgba(13, 16, 23, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    margin-top: 0; /* Integrated seamlessly with the terminal-body */
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.player-scrubber-container {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
}

.player-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.player-scrubber::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
}

.player-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.8);
    margin-top: -4px; /* Center thumb vertically */
    transition: var(--transition-fast);
}

.player-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--color-secondary);
    box-shadow: 0 0 8px rgba(217, 70, 239, 0.8);
}

.player-time {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    min-width: 105px;
    text-align: center;
    user-select: none;
}


.ctrl-icon-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-icon-btn:hover {
    color: #fff;
}

.ctrl-icon-btn.active {
    color: var(--color-primary);
    filter: drop-shadow(0 0 3px rgba(0, 242, 254, 0.5));
}

.ctrl-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Exporting overlay --- */
.export-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 7, 10, 0.95);
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.export-overlay.active {
    display: flex;
}

.export-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.export-ring {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 80px;
    height: 80px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
    animation: ringRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--color-primary) transparent transparent transparent;
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.export-progress {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.export-status {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    box-shadow: var(--glow-primary);
    transition: width 0.1s linear;
}

/* --- Prompt Engine layout --- */
.prompt-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.prompt-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    transition: var(--transition-normal);
}

.prompt-bar:focus-within {
    border-color: var(--color-secondary);
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.15);
}

.prompt-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    padding: 0.5rem 1rem;
}

.prompt-input::placeholder {
    color: var(--color-text-dim);
}

.prompt-btn {
    border-radius: 8px;
    padding: 0 1.5rem;
    background: linear-gradient(135deg, var(--color-secondary), #a21caf);
    box-shadow: var(--glow-secondary);
}

.prompt-btn:hover {
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.5);
}

.prompt-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.suggestion-chip:hover {
    background: rgba(217, 70, 239, 0.08);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.1);
}

/* --- Guide & Features Section --- */
.section {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3.5rem;
}

.section-title span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 242, 254, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(0, 242, 254, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
}

.feature-card:nth-child(2) .feature-icon {
    background: rgba(217, 70, 239, 0.08);
    color: var(--color-secondary);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

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

/* --- FAQ Section --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    padding: 1.5rem;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    transition: var(--transition-normal);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal) ease;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.975rem;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* --- Footer Section --- */
footer {
    background: #040508;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-brand p {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Advanced Multilingual SEO Articles Cyberpunk Styles
   ========================================================================== */
.seo-guide-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-color);
}

.seo-article {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.seo-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.seo-article-header {
    margin-bottom: 2rem;
}

.seo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: 'Fira Code', monospace;
}

.seo-h2 {
    font-size: 2rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.seo-h2 strong {
    color: var(--color-primary);
}

.seo-lead {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.seo-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    margin: 2rem 0;
}

.seo-subsection {
    margin-bottom: 2.5rem;
}

.seo-subsection:last-child {
    margin-bottom: 0;
}

.seo-h3 {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-h3::before {
    content: '>';
    color: var(--color-secondary);
    font-family: 'Fira Code', monospace;
    font-weight: bold;
}

.seo-p {
    font-size: 0.975rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.seo-p strong {
    color: #fff;
    font-weight: 600;
}

.seo-p code {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--color-secondary);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

.seo-list, .seo-list-ordered {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.975rem;
    line-height: 1.7;
}

.seo-list li, .seo-list-ordered li {
    margin-bottom: 0.75rem;
}

.seo-list li strong, .seo-list-ordered li strong {
    color: #fff;
}

.seo-list li code {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--color-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Overrides & Mobile Optimizations
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero h1 {
        font-size: 2.75rem;
    }
    .app-grid {
        grid-template-columns: 1fr;
    }
    .panel-controls-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    .hero {
        padding: 4rem 0 2rem 0;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .hero-tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .container {
        padding: 0 1rem;
    }
    .header-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-actions {
        width: 100%;
        justify-content: center;
    }
    .uploader-zone {
        padding: 2.5rem 1rem;
    }
    .terminal-body {
        padding: 0.75rem;
    }
    .ascii-output {
        font-size: 3.5px !important;
        line-height: 3.5px !important;
        letter-spacing: -0.2px !important;
        overflow-x: auto;
    }
    .preview-controls {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    .player-scrubber-container {
        width: 100%;
        order: -1;
        margin: 0;
    }
    .player-time {
        font-size: 0.75rem;
        min-width: auto;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }
    .panel-card {
        padding: 1.25rem;
    }
    .seo-article {
        padding: 1.5rem;
    }
    .seo-h2 {
        font-size: 1.5rem;
    }
    .seo-lead {
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.85rem;
    }
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    .prompt-bar {
        flex-direction: column;
        gap: 0.75rem;
        background: none;
        border: none;
        padding: 0;
    }
    .prompt-input {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.75rem 1rem;
    }
    .prompt-btn {
        padding: 0.75rem;
        border-radius: 8px;
        justify-content: center;
    }
}

/* ==========================================================================
   CLI Promotion Panel Cyberpunk Styles
   ========================================================================== */
.cli-promo-section {
    padding: 4rem 0;
    border-top: 1px dashed var(--border-color);
}

.cli-promo-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(6, 7, 10, 0.8), rgba(217, 70, 239, 0.02));
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.cli-promo-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.cli-promo-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(217, 70, 239, 0.08);
    border: 1px solid rgba(217, 70, 239, 0.2);
    color: var(--color-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    font-family: 'Fira Code', monospace;
}

.cli-promo-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.cli-promo-text {
    flex: 1;
}

.cli-promo-title {
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.01em;
}

.cli-promo-p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.glow-text {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.cli-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cli-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cli-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    flex-shrink: 0;
}

.cli-step-desc {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cli-step-desc strong {
    font-size: 0.9rem;
    color: #fff;
}

.cli-code {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--color-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    width: fit-content;
}

.cli-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cli-promo-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important;
    color: #fff !important;
    padding: 0.85rem 1.75rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: var(--glow-primary) !important;
}

.cli-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4) !important;
}

.cli-note {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media screen and (max-width: 768px) {
    .cli-promo-content {
        flex-direction: column;
        gap: 2rem;
    }
    .cli-action-box {
        width: 100%;
    }
    .cli-code {
        width: 100%;
        overflow-x: auto;
    }
}

.format-warning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #f59e0b;
    display: none;
    align-items: flex-start;
    gap: 0.5rem;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

/* --- GitHub Star Support & Badge --- */
.github-stars-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--color-text-dim);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    line-height: 1;
}

.github-stars-badge:hover {
    color: #fff;
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.github-stars-badge svg {
    fill: currentColor;
}

.stars-separator {
    opacity: 0.25;
    margin: 0 0.1rem;
}

.stars-num {
    font-weight: bold;
    color: var(--color-primary);
    filter: drop-shadow(0 0 2px rgba(0, 242, 254, 0.4));
}

.github-support-section {
    padding: 3rem 0;
    border-top: 1px dashed var(--border-color);
}

.github-support-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(6, 7, 10, 0.85), rgba(0, 242, 254, 0.015));
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.github-support-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.03) 0%, transparent 70%);
    z-index: 0;
}

.github-support-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.15);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    font-family: 'Fira Code', monospace;
}

.github-support-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.github-support-text {
    flex: 1;
}

.github-support-title {
    font-size: 1.65rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.github-support-p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.github-live-counter {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
}

.counter-label {
    font-size: 0.85rem;
    color: var(--color-text-dim);
}

.counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 242, 254, 0.04);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 30px;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.05rem;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.08);
}

.star-icon {
    stroke: var(--color-primary);
    fill: var(--color-primary);
    filter: drop-shadow(0 0 2px var(--color-primary));
}
.github-support-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.github-support-action iframe {
    transition: transform var(--transition-fast);
}

.github-support-action iframe:hover {
    transform: scale(1.06);
}

.btn-github-star {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.6rem;
    background: linear-gradient(90deg, #24292e, #1b1f23);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-github-star:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3) !important;
    border-color: var(--color-primary);
}

@media screen and (max-width: 768px) {
    .github-support-content {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }
    .github-support-action {
        width: 100%;
        align-items: center;
    }
    .btn-github-star {
        width: 100%;
        justify-content: center;
    }
}

/* --- Real-time Interactive Star Animations & Contrast --- */
@keyframes starPulseGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px 8px rgba(0, 242, 254, 0.5);
        border-color: var(--color-primary);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0);
    }
}

.star-pulse-active {
    animation: starPulseGlow 1.2s ease-in-out;
}

@keyframes numberGlowChange {
    0% {
        color: #fff;
        text-shadow: 0 0 15px #00f2fe, 0 0 30px #00f2fe;
        transform: scale(1);
    }
    50% {
        color: #fff;
        text-shadow: 0 0 25px #00f2fe, 0 0 50px #00f2fe;
        transform: scale(1.3);
    }
    100% {
        color: var(--color-primary);
        text-shadow: 0 0 2px rgba(0, 242, 254, 0.4);
        transform: scale(1);
    }
}

.number-glow-active {
    display: inline-block;
    animation: numberGlowChange 1s ease-out;
}

/* ========================================================
   TOAST NOTIFICATION SYSTEM - AI Generation Status
   ======================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(10, 14, 24, 0.92);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.08);
    font-family: var(--font-sans);
    color: var(--color-text-main);
    font-size: 0.85rem;
    line-height: 1.4;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateX(120%);
    opacity: 0;
}

.toast-notification.toast-exit {
    animation: toastSlideOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.toast-icon.toast-info {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.toast-icon.toast-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.toast-icon.toast-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.toast-icon.toast-ai {
    background: rgba(217, 70, 239, 0.15);
    color: #d946ef;
    box-shadow: 0 0 8px rgba(217, 70, 239, 0.2);
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 2px;
    color: var(--color-text-main);
}

.toast-message {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #d946ef);
    border-radius: 1px;
    animation: toastProgressShrink var(--toast-duration, 4s) linear forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes toastProgressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 600px) {
    .toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* ========================================================
   LOCAL AI COPILOT SYSTEM - WASM / WEBGPU PROMPT ENHANCER
   ======================================================== */

.ai-copilot-panel {
    background: rgba(15, 20, 35, 0.65);
    border: 1px solid rgba(217, 70, 239, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 14px;
    margin-bottom: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-copilot-panel.active {
    border-color: rgba(217, 70, 239, 0.4);
    box-shadow: 0 6px 24px rgba(217, 70, 239, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-copilot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.ai-copilot-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-main);
    flex-grow: 1;
}

.ai-copilot-title svg {
    color: #d946ef;
    filter: drop-shadow(0 0 4px rgba(217, 70, 239, 0.4));
}

.ai-copilot-badge {
    background: rgba(217, 70, 239, 0.15);
    color: #d946ef;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(217, 70, 239, 0.25);
    letter-spacing: 0.8px;
    text-shadow: 0 0 4px rgba(217, 70, 239, 0.3);
}

.ai-copilot-content {
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    animation: fadeInCopilot 0.35s ease-out forwards;
}

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

.copilot-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .copilot-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.control-group.compact {
    margin-bottom: 0;
}

.control-group.compact label {
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: var(--color-text-muted);
}

.select-input.compact, .slider-input.compact {
    padding: 6px 10px;
    font-size: 0.78rem;
    height: 32px;
}

.slider-input.compact {
    height: auto;
}

.copilot-status {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.status-text {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.status-percentage {
    font-weight: 600;
    color: #00f2fe;
}

.status-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.status-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d946ef, #00f2fe);
    border-radius: 2px;
    width: 0%;
    transition: width 0.2s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Custom Mini Toggle Switch */
.switch-container {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

input:checked + .switch-slider {
    background-color: #d946ef;
    border-color: rgba(217, 70, 239, 0.3);
}

input:checked + .switch-slider:before {
    transform: translateX(18px);
}

