/* ============================================================
   IAPONT STUDIO V12 - INTERACTIVE & IMMERSIVE EDITION
   Menu Burger · Live Stats · Sound Feedback · UX Excellence
   ============================================================ */

/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- VARIABLES CSS --- */
:root {
    --space-dark: #0a0a0f;
    --space-darker: #050507;
    --space-void: #000000;
    --glass-bg: rgba(15, 15, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.12);
    --neon-purple: #a78bfa;
    --neon-purple-bright: #c4b5fd;
    --neon-pink: #f472b6;
    --neon-cyan: #22d3ee;
    --neon-green: #34d399;
    --neon-orange: #fb923c;
    --glow-purple: 0 0 20px rgba(167, 139, 250, 0.4), 0 0 40px rgba(167, 139, 250, 0.2);
    --glow-green: 0 0 20px rgba(52, 211, 153, 0.4), 0 0 40px rgba(52, 211, 153, 0.2);
    --glow-pink: 0 0 20px rgba(244, 114, 182, 0.4), 0 0 40px rgba(244, 114, 182, 0.2);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BODY - SCROLL ENABLED --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--space-void);
    color: white;
    min-height: 100vh;
    overflow-y: auto; /* ✅ SCROLL ENABLED */
    overflow-x: hidden;
    position: relative;
}

/* --- ANIMATED BACKGROUND (Z-INDEX -1) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* ✅ BEHIND CONTENT */
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(244, 114, 182, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 60%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* --- STARS (Z-INDEX -1) --- */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* ✅ BEHIND CONTENT */
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- LAYOUT (Z-INDEX 10) --- */
.app-layout {
    position: relative;
    z-index: 10; /* ✅ ABOVE BACKGROUND */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-bottom: 100px; /* ✅ SPACE FOR FOOTER */
}

/* --- HEADER --- */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo span:first-child {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.beta-tag {
    font-size: 0.65rem;
    background: rgba(167, 139, 250, 0.2);
    color: var(--neon-purple-bright);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.main-nav a.github-link {
    color: var(--neon-purple-bright);
}

/* --- HERO --- */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: transparent;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--neon-purple-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.6);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
}

.security-badge {
    display: inline-block;
    background: rgba(52, 211, 153, 0.15);
    color: var(--neon-green);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 6px;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

/* --- CONTAINER --- */
.app-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px 30px 100px; /* ✅ BOTTOM PADDING */
}

/* --- STEPPER --- */
.stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 20px 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    cursor: not-allowed;
    transition: var(--transition-smooth);
}

.step.active {
    opacity: 1;
    cursor: pointer;
}

.step-num {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    color: rgba(255, 255, 255, 0.5);
}

.step.active .step-num {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--glow-purple);
    transform: scale(1.05);
}

.step span {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.step.active span {
    color: var(--neon-purple-bright);
}

.step-line {
    width: 70px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 15px;
    transform: translateY(-15px);
}

/* --- VIEWS --- */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* --- DROP ZONE --- */
.drop-area {
    border: 2px dashed rgba(167, 139, 250, 0.3);
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
}

.drop-area.drag-active {
    border-color: var(--neon-purple);
    box-shadow: var(--glow-purple);
    transform: scale(1.01);
}

#drop-initial, #drop-loader, #drop-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.icon-upload {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.icon-success {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: scaleInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleInBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--neon-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

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

#loader-text {
    margin-top: 20px;
    color: var(--neon-purple-bright);
    font-weight: 600;
}

/* --- EDITOR --- */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 15px 20px;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--glass-border);
    border-bottom: none;
}

.toolbar-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-pill:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
}

.checkbox-pill input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--neon-purple);
}

.checkbox-pill span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.main-editor {
    width: 100%;
    min-height: 450px;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    border-top: none;
    padding: 25px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    transition: var(--transition-fast);
    border-radius: 0 0 16px 16px;
}

.main-editor:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.main-editor.code-look {
    font-size: 0.88rem;
    color: var(--neon-green);
}

/* --- STATS BAR --- */
.stats-bar {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-purple-bright);
}

/* --- BUTTONS --- */
.btn-primary {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    color: #fff;
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
    font-size: 0.95rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-pink));
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-pink);
}

.btn-download {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-green);
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.download-group {
    display: flex;
    gap: 12px;
}

.nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

/* --- EXPORT PANEL --- */
.export-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.config-box h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
}

/* ✅ SELECT FIX - BLACK TEXT ON WHITE */
.select-modern {
    width: 100%;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.95); /* ✅ LIGHT BACKGROUND */
    color: #000; /* ✅ BLACK TEXT */
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: 18px;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    font-weight: 500;
}

.select-modern option {
    background: #fff; /* ✅ WHITE BACKGROUND */
    color: #000; /* ✅ BLACK TEXT */
}

.select-modern:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

/* --- FEEDBACK --- */
.feedback-text {
    color: var(--neon-green);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.feedback-text.show {
    opacity: 1;
}

/* --- TOAST --- */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--glow-green);
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 280px;
    border: 1px solid var(--glass-border);
    font-weight: 500;
}

.toast.error {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--glow-pink);
    border-color: rgba(244, 114, 182, 0.3);
}

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

/* --- FOOTER --- */
.main-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--neon-purple-bright);
}

.footer-credits {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-credits strong {
    color: var(--neon-purple-bright);
    font-weight: 600;
}

/* --- CONFETTI --- */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* --- LANGUAGE BADGE --- */
.language-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-cyan);
    opacity: 0;
    transition: var(--transition-fast);
}

.language-badge.show {
    opacity: 1;
    animation: fadeInDown 0.5s ease;
}

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

/* --- UTILITY --- */
.hidden {
    display: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .stepper {
        transform: scale(0.9);
        padding: 15px 20px;
    }

    .editor-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .toolbar-left {
        flex-direction: column;
        width: 100%;
    }

    .nav-footer {
        flex-direction: column;
        gap: 15px;
    }

    .download-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-download {
        width: 100%;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .app-container {
        padding: 20px 15px 100px;
    }
}

/* ============================================================
   MEGA FOOTER - MOBILE FIRST
   ============================================================ */

.mega-footer {
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.mega-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile First: 1 column */
    gap: 40px;
}

/* Colonne Branding */
.footer-col.footer-brand {
    text-align: center;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footer-logo span {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-top: 10px;
}

.footer-tagline strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Colonne Écosystème */
.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.footer-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    text-align: center;
}

.ecosystem-links,
.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 12px;
}

.ecosystem-link,
.legal-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    text-align: center;
    border: 1px solid transparent;
}

.ecosystem-link:hover,
.legal-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom strong {
    color: var(--neon-purple);
    font-weight: 600;
}

/* ============================================================
   TABLET RESPONSIVE (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
    .mega-footer {
        padding: 60px 30px 30px;
    }

    .mega-footer-container {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
        gap: 50px;
    }

    .footer-col.footer-brand {
        text-align: left;
        grid-column: 1 / -1; /* Span full width */
    }

    .footer-col h4,
    .footer-subtitle {
        text-align: left;
    }

    .ecosystem-links {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
    }

    .ecosystem-link,
    .legal-links a {
        text-align: left;
    }
}

/* ============================================================
   DESKTOP RESPONSIVE (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
    .mega-footer {
        padding: 80px 40px 40px;
    }

    .mega-footer-container {
        grid-template-columns: 1.2fr 1.5fr 1fr; /* Desktop: 3 columns */
        gap: 60px;
    }

    .footer-col.footer-brand {
        grid-column: auto; /* Reset to normal flow */
    }

    .ecosystem-links {
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columns */
        gap: 8px 12px;
    }

    .legal-links {
        grid-template-columns: 1fr; /* Legal stays 1 column */
    }
}

/* ============================================================
   MOBILE FIRST IMPROVEMENTS - TOUCH TARGETS
   ============================================================ */

/* Minimum touch target size: 44x44px */
button,
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-download,
a.github-link {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile: Larger padding for better touch */
@media (max-width: 767px) {
    .btn-primary,
    .btn-secondary,
    .btn-accent,
    .btn-download {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .main-nav a {
        padding: 10px 16px;
    }

    .checkbox-pill {
        padding: 12px 18px;
        font-size: 0.95rem;
    }

    /* Stepper: Better mobile visibility */
    .stepper {
        padding: 20px 15px;
        gap: 10px;
    }

    .step-num {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .step span {
        font-size: 0.85rem;
    }

    /* Hero: Better mobile hierarchy */
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

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

    .security-badge {
        display: block;
        margin-top: 12px;
    }

    /* Editor: Full screen on mobile */
    .main-editor {
        min-height: 300px;
        font-size: 0.95rem;
    }

    /* Drop zone: More compact */
    .drop-area {
        padding: 40px 20px;
        min-height: 350px;
    }

    .icon-upload {
        font-size: 3rem;
    }

    .drop-area h3 {
        font-size: 1.2rem;
    }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--space-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.5);
}

/* ============================================================
   V12: BURGER MENU - MOBILE FIRST
   ============================================================ */

/* Burger Button - Hidden on Desktop */
.burger-btn {
    display: none; /* Hidden by default (desktop) */
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
    transition: var(--transition-fast);
}

.burger-line {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Burger Active State (X Animation) */
.burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Desktop Nav - Show on Desktop, Hide on Mobile */
.desktop-nav {
    display: flex;
}

/* Mobile Menu Overlay - Full Screen */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Nav */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 400px;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateY(0);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    opacity: 0;
    animation: slideInLink 0.5s ease forwards;
}

.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-link:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav-link:nth-child(6) { animation-delay: 0.35s; }
.mobile-nav-link:nth-child(7) { animation-delay: 0.4s; }

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

.mobile-nav-link:hover {
    background: var(--glass-hover);
    border-color: var(--neon-purple);
    color: white;
    transform: translateX(5px);
    box-shadow: var(--glow-purple);
}

.nav-icon {
    font-size: 1.5rem;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Breakpoint */
@media (max-width: 1023px) {
    .burger-btn {
        display: flex; /* Show burger on mobile/tablet */
    }

    .desktop-nav {
        display: none; /* Hide desktop nav on mobile/tablet */
    }
}

/* ============================================================
   V12: POWER BAR (LIVE STATS) - MOBILE FIRST
   ============================================================ */

.power-bar {
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.08) 0%,
        rgba(244, 114, 182, 0.08) 100%
    );
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 40px 20px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.power-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

.power-bar-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr; /* Mobile First: 1 column */
    gap: 20px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        var(--neon-purple) 0%,
        var(--neon-pink) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.stat-card:hover {
    border-color: var(--neon-purple);
    box-shadow: var(--glow-purple);
    transform: translateY(-5px);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--neon-purple-bright), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tablet: 2 columns for first 2, full width for last */
@media (min-width: 768px) {
    .power-bar-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card:last-child {
        grid-column: 1 / -1; /* Span full width */
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .power-bar {
        padding: 50px 30px;
    }

    .power-bar-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .stat-card:last-child {
        grid-column: auto; /* Reset to normal flow */
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .stat-icon {
        font-size: 3.5rem;
        width: 90px;
        height: 90px;
    }

    .stat-number {
        font-size: 2.8rem;
    }
}

/* ============================================================
   V13: HISTORY CONTAINER (LOCAL STORAGE UI)
   ============================================================ */

.history-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 40px;
}

.history-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neon-purple);
    transform: translateX(5px);
}

.history-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-name {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    word-break: break-all;
}

.history-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* V15.1: History Actions Container */
.history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-copy-btn,
.history-share-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-copy-btn:hover {
    background: var(--neon-purple);
    border-color: var(--neon-purple);
    box-shadow: var(--glow-purple);
}

/* V15.1: Share button (green accent) */
.history-share-btn:hover {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: var(--glow-green);
}

@media (max-width: 767px) {
    .history-container {
        padding: 20px 16px;
    }

    .history-item {
        padding: 14px;
        gap: 12px;
    }

    .history-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .history-name {
        font-size: 0.95rem;
    }
}

/* ============================================================
   V14: HISTORY EMPTY STATE
   ============================================================ */

.history-empty {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* ============================================================
   V14: CLICK FLASH ANIMATION (iOS Fallback)
   ============================================================ */

@keyframes clickFlash {
    0% { background: transparent; }
    50% { background: rgba(255, 255, 255, 0.3); }
    100% { background: transparent; }
}

.click-flash {
    animation: clickFlash 0.15s ease-out;
    position: relative;
    overflow: hidden;
}

.click-flash::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* ============================================================
   V14: TOAST NOTIFICATION SYSTEM
   ============================================================ */

.toast-container-v14 {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 500px;
}

.toast-v14 {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast-v14.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.95rem;
    color: white;
    font-weight: 500;
    flex: 1;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid var(--neon-green);
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid var(--neon-cyan);
}

.toast-processing {
    border-left: 4px solid var(--neon-purple);
}

/* ============================================================
   V14: PWA INSTALL BUTTON
   ============================================================ */

.pwa-install-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.4);
    cursor: pointer;
    transition: all var(--transition-smooth);
    z-index: 9998;
    animation: pulse 2s infinite;
}

.pwa-install-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(167, 139, 250, 0.6);
}

.pwa-install-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.install-icon {
    font-size: 1.3rem;
}

.install-text {
    font-family: var(--font-primary);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(167, 139, 250, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(167, 139, 250, 0.7);
    }
}

/* V15.1: Hide PWA button on Desktop */
@media (min-width: 1024px) {
    .pwa-install-btn {
        display: none !important;
    }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .toast-container-v14 {
        bottom: 10px;
        width: 95%;
    }

    .toast-v14 {
        padding: 14px 16px;
    }

    .toast-message {
        font-size: 0.9rem;
    }

    .pwa-install-btn {
        bottom: 20px;
        right: 10px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .install-icon {
        font-size: 1.2rem;
    }
}

/* ============================================================
   V15: SEXY RADIO CARDS (CHUNKING SELECTOR)
   ============================================================ */

.chunk-radio-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first: stack */
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .chunk-radio-grid {
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columns */
        gap: 20px;
    }
}

.chunk-card {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.chunk-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.card-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition-smooth);
    position: relative;
    z-index: 2;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    transition: transform var(--transition-smooth);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.card-use {
    font-size: 0.75rem;
    color: var(--neon-purple-bright);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(167, 139, 250, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: 1;
    border-radius: 16px;
}

/* Hover State */
.chunk-card:hover .card-content {
    border-color: var(--neon-purple);
    transform: translateY(-4px);
}

.chunk-card:hover .card-icon {
    transform: scale(1.15);
}

.chunk-card:hover .card-glow {
    opacity: 0.1;
}

/* Selected State */
.chunk-card input[type="radio"]:checked ~ .card-content {
    border-color: var(--neon-purple);
    border-width: 3px;
    box-shadow: var(--glow-purple);
}

.chunk-card input[type="radio"]:checked ~ .card-glow {
    opacity: 0.15;
}

.chunk-card input[type="radio"]:checked ~ .card-content .card-icon {
    transform: scale(1.2);
    animation: bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.35); }
}

.chunk-card input[type="radio"]:checked ~ .card-content .card-use {
    background: var(--neon-purple);
    color: white;
}

/* Mobile touch targets */
@media (max-width: 639px) {
    .card-content {
        min-height: 140px;
        padding: 20px 16px;
    }

    .card-icon {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.1rem;
    }
}

/* ============================================================
   V15.1: BUTTON PRESS EFFECT (SMOOTH UX - NO FLASH)
   ============================================================ */

/* Subtle press effect on all interactive buttons */
button:active,
.btn-primary:active,
.btn-secondary:active,
.btn-accent:active,
.btn-download:active,
.chunk-card:active,
.pwa-install-btn:active,
.history-copy-btn:active,
.burger-btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease-out;
}

/* Mobile touch targets - add press effect */
@media (max-width: 767px) {
    .mobile-nav-link:active {
        transform: translateX(5px) scale(0.98);
    }

    .step:active {
        transform: scale(0.95);
    }
}

/* ============================================================
   V15: STAT NUMBER FLASH EFFECT
   ============================================================ */

@keyframes statFlash {
    0% {
        background: linear-gradient(135deg, var(--neon-purple-bright), var(--neon-pink));
        filter: brightness(1);
        text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
    }
    50% {
        background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
        filter: brightness(1.5);
        text-shadow: 0 0 20px rgba(52, 211, 153, 0.8);
    }
    100% {
        background: linear-gradient(135deg, var(--neon-purple-bright), var(--neon-pink));
        filter: brightness(1);
        text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
    }
}

.stat-number.flash-update {
    animation: statFlash 0.5s ease-out;
}

/* ============================================================
   V15: PWA MODAL (iOS FALLBACK)
   ============================================================ */

.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pwa-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-modal-overlay.active .pwa-modal {
    transform: scale(1);
}

.pwa-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.pwa-modal-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.pwa-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.pwa-modal-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.pwa-modal-body {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pwa-modal-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pwa-modal-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--neon-purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.step-icon {
    font-size: 1.2rem;
    margin: 0 4px;
}

.pwa-modal-footer {
    text-align: center;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--neon-purple);
}

@media (max-width: 480px) {
    .pwa-modal {
        padding: 24px 20px;
    }

    .pwa-modal-title {
        font-size: 1.2rem;
    }

    .pwa-modal-steps {
        gap: 12px;
    }

    .step-text {
        font-size: 0.9rem;
    }
}

/* ============================================================
   V16 - BATCH PROCESSING & PRO TOOLS
   ============================================================ */

/* --- SENSITIVE MODE TOGGLE --- */
.sensitive-mode-container {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(15, 15, 25, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.sensitive-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

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

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    transition: all var(--transition-fast);
    border: 1px solid var(--glass-border);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.sensitive-toggle input:checked + .toggle-slider {
    background: #ef4444;
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.sensitive-toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.sensitive-info {
    margin-top: 8px;
    margin-left: 62px;
}

.sensitive-info small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Sensitive Mode Active - Red Theme */
body.sensitive-mode {
    --neon-purple: #ef4444;
    --neon-purple-bright: #f87171;
    --glow-purple: 0 0 20px rgba(239, 68, 68, 0.4), 0 0 40px rgba(239, 68, 68, 0.2);
}

body.sensitive-mode .drop-area {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

/* V16.1: CRITICAL - Hide history in sensitive mode */
body.sensitive-mode .history-container {
    display: none !important;
}

/* V16.1: Show purge button only in sensitive mode */
body.sensitive-mode #btnPurgeSensitive {
    display: inline-block !important;
}

/* V16.4: Merge Mode Toggle */
.merge-mode-container {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(15, 15, 25, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.merge-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

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

.merge-toggle input:checked + .toggle-slider {
    background: var(--neon-purple);
    border-color: var(--neon-purple-bright);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.merge-toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.merge-info {
    margin-top: 8px;
    margin-left: 62px;
}

.merge-info small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
}

/* V16.1: Danger button styling */
.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

/* --- BATCH QUEUE --- */
#batch-queue {
    padding: 24px;
}

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

.queue-header h3 {
    font-size: 1.2rem;
    color: var(--neon-purple-bright);
}

.queue-actions {
    display: flex;
    gap: 10px;
}

.queue-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

/* Custom Scrollbar for Queue */
.queue-list::-webkit-scrollbar {
    width: 8px;
}

.queue-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.queue-list::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 4px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(15, 15, 25, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.queue-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-purple);
}

.queue-item.processing {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

.queue-item.completed {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(52, 211, 153, 0.05);
}

.queue-item.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

.queue-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.queue-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.queue-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.queue-item-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.queue-item-btn:hover {
    background: var(--neon-purple);
    border-color: var(--neon-purple-bright);
    box-shadow: var(--glow-purple);
}

.queue-item-btn.preview-btn:hover {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

.queue-item-btn.remove-btn:hover {
    background: #ef4444;
    border-color: #dc2626;
}

.queue-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.queue-stats {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- BATCH PROGRESS --- */
#batch-progress {
    padding: 24px;
    text-align: center;
}

.batch-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.batch-progress-header span {
    font-weight: 600;
    color: white;
}

.batch-progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

.current-file-processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- CONFIGURATION PRESETS --- */
.config-presets {
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(15, 15, 25, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.config-presets h4 {
    font-size: 1.1rem;
    color: var(--neon-purple-bright);
    margin-bottom: 16px;
}

.preset-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.preset-card {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.preset-card input[type="radio"] {
    display: none;
}

.preset-content {
    padding: 16px;
    background: rgba(15, 15, 25, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    text-align: center;
    transition: all var(--transition-fast);
}

.preset-card:hover .preset-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--neon-purple);
}

.preset-card input:checked + .preset-content {
    border-color: var(--neon-purple-bright);
    background: rgba(167, 139, 250, 0.1);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.preset-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    margin-bottom: 6px;
}

.preset-specs {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- TOKEN CALCULATOR --- */
.token-calculator {
    margin: 20px 0;
    padding: 16px;
    background: rgba(15, 15, 25, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.token-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.token-count {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--neon-purple-bright);
}

.token-chars {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.token-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    margin-bottom: 8px;
}

.token-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.token-segment.gpt4 {
    background: var(--neon-green);
}

.token-segment.claude {
    background: #facc15;
}

.token-segment.over {
    background: #ef4444;
}

.token-legend {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* V16.3: CRITICAL - Ensure modals appear above sensitive mode overlays */
#xray-modal,
#file-preview-modal {
    z-index: 99999 !important;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--neon-purple-bright);
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ef4444;
    border-color: #dc2626;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* X-Ray Preview Specific */
.xray-info {
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.xray-preview {
    background: var(--space-darker);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--neon-green);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* File Preview Specific */
.preview-filename {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 12px;
}

.preview-content {
    background: var(--space-darker);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* --- NOTIFICATION BANNER --- */
.notification-banner {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    animation: slideUpBanner 0.3s ease;
}

.notification-banner.hidden {
    display: none;
}

@keyframes slideUpBanner {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    max-width: 500px;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-text {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.btn-accent-small,
.btn-secondary-small {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--glass-border);
}

.btn-accent-small {
    background: var(--neon-purple);
    color: white;
}

.btn-accent-small:hover {
    background: var(--neon-purple-bright);
    box-shadow: var(--glow-purple);
}

.btn-secondary-small {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary-small:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- RESPONSIVE V16 --- */
@media (max-width: 768px) {
    .queue-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .queue-actions {
        width: 100%;
    }

    .queue-actions button {
        flex: 1;
    }

    .preset-cards {
        grid-template-columns: 1fr;
    }

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

    .queue-item-actions {
        width: 100%;
        justify-content: stretch;
    }

    .queue-item-btn {
        flex: 1;
    }

    .notification-content {
        flex-direction: column;
        text-align: center;
    }

    .notification-actions {
        width: 100%;
    }

    .notification-actions button {
        flex: 1;
    }

    .modal-content {
        max-width: 100%;
        max-height: 90vh;
    }
}

/* Styles Footer */
.main-footer {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 4rem 1rem 2rem;
    margin-top: auto;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
}

.swiss-hosted {
    color: #cbd5e1;
    font-weight: 600;
    display: block;
    margin-top: 10px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--neon-cyan, #22d3ee);
}

.donate-link {
    color: #ec4899 !important; /* Rose Neon pour le don */
    font-weight: 700;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
    font-size: 0.85rem;
}

.footer-badges {
    display: flex;
    gap: 10px;
}

.badge-pill {
    background: #1e293b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #94a3b8;
}