/* ===== GLOBAL & RESET ===== */
:root {
    --emerald: #00e676;
    --emerald-dim: #00c853;
    --emerald-glow: rgba(0, 230, 118, 0.35);
    --emerald-subtle: rgba(0, 230, 118, 0.07);
    --emerald-border: rgba(0, 230, 118, 0.12);
    --emerald-border-hover: rgba(0, 230, 118, 0.35);
    --bg-deep: #050507;
    --bg-card: rgba(14, 14, 18, 0.85);
    --bg-card-hover: rgba(22, 22, 28, 0.95);
    --text-primary: #f0f0f0;
    --text-secondary: #8a8a9a;
    --text-muted: #55556a;
    --radius-lg: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg-deep); color: var(--text-primary); font-family: 'Inter', sans-serif; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

 

/* ===== BACKGROUND ORBS (Glamour Effect) ===== */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs .orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.15; }
.bg-orbs .orb-1 { width: 600px; height: 600px; background: var(--emerald); top: -200px; left: -100px; animation: floatOrb1 20s ease-in-out infinite; }
.bg-orbs .orb-2 { width: 400px; height: 400px; background: #7c4dff; bottom: 10%; right: -80px; animation: floatOrb2 25s ease-in-out infinite; }
.bg-orbs .orb-3 { width: 350px; height: 350px; background: var(--emerald); top: 50%; left: 40%; animation: floatOrb3 18s ease-in-out infinite; }

@keyframes floatOrb1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(80px,60px)} }
@keyframes floatOrb2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-60px,-80px)} }
@keyframes floatOrb3 { 0%,100%{transform:translate(0,0)} 33%{transform:translate(-40px,50px)} 66%{transform:translate(50px,-30px)} }

.page-content { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 100px 0; }

/* ===== TYPOGRAPHY ===== */
.hero h1 .gradient, .cta-section h2 .gradient { background: linear-gradient(135deg, #fff 30%, var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
/* ===== SECTION HEADER (Premium Redesign) ===== */
.section-header { 
    text-align: center; 
    margin-bottom: 70px; 
    position: relative;
    z-index: 2;
}

.section-tag { 
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--emerald); 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    margin-bottom: 20px; 
    padding: 6px 16px; 
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--emerald-border); 
    border-radius: 50px; 
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.section-tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
    animation: blink 1.5s ease-in-out infinite;
}

.section-title { 
    font-size: clamp(1.8rem, 4vw, 2.8rem); 
    font-weight: 800; 
    letter-spacing: -0.02em; 
    margin-bottom: 18px; 
    line-height: 1.2;
    color: #fff;
}

.text-emerald {
    color: var(--emerald);
    text-shadow: 0 0 30px rgba(0, 230, 118, 0.3);
}

.section-desc { 
    font-size: 1.05rem; 
    color: var(--text-secondary); 
    max-width: 600px; 
    margin: 0 auto; 
    line-height: 1.7; 
}

/* Responsive Section Header for Mobile */
@media (max-width: 768px) {
    .section-header { margin-bottom: 50px; }
    .section-desc { font-size: 0.9rem; padding: 0 15px; }
    .section-title { font-size: 1.6rem; }
}

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 36px; border-radius: 50px; font-weight: 700; font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-family: inherit; }
.btn-emerald { background: var(--emerald); color: #000; box-shadow: 0 0 30px var(--emerald-glow), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-emerald:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 0 50px var(--emerald-glow); }
.btn-ghost { background: rgba(255,255,255,0.02); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.15); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-subtle); transform: translateY(-2px); }

/* ===== HERO SECTION ===== */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 100px 20px 80px; position: relative; }
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px; background: linear-gradient(to top, var(--bg-deep), transparent); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: 800px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.5); border: 1px solid var(--emerald-border); padding: 8px 20px; border-radius: 50px; font-size: 0.8rem; color: var(--emerald); font-weight: 600; margin-bottom: 32px; letter-spacing: 0.05em; text-transform: uppercase; backdrop-filter: blur(10px); }
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); animation: blink 1.5s ease-in-out infinite; box-shadow: 0 0 10px var(--emerald); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.03em; }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats Bar */
.stats-bar { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin-top: 64px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.06); }
.stat-item { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--emerald); font-variant-numeric: tabular-nums; text-shadow: 0 0 20px var(--emerald-glow); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ===== FEATURES GRID ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--emerald-border); border-radius: var(--radius-lg); padding: 36px 28px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; backdrop-filter: blur(20px); }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--emerald), transparent); opacity: 0; transition: opacity 0.4s; }
.feature-card:hover { background: var(--bg-card-hover); border-color: var(--emerald-border-hover); transform: translateY(-6px); box-shadow: 0 20px 60px -20px rgba(0, 230, 118, 0.15); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--emerald); margin-bottom: 24px; transition: all 0.3s; }
.feature-card:hover .feature-icon { background: rgba(0, 230, 118, 0.15); box-shadow: 0 0 20px var(--emerald-glow); transform: scale(1.1); }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; }

/* ===== AUDIO PLAYER (Studio Rack Style) ===== */
.player-section { background: linear-gradient(180deg, transparent, var(--emerald-subtle) 50%, transparent); }
.player-wrapper { max-width: 720px; margin: 0 auto; background: rgba(10, 10, 12, 0.9); border: 1px solid var(--emerald-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 118, 0.05); backdrop-filter: blur(20px); }
.player-prompt { padding: 20px 24px; border-bottom: 1px solid var(--emerald-border); display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.3); }
.player-prompt .prompt-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--emerald-subtle); display: flex; align-items: center; justify-content: center; color: var(--emerald); font-size: 0.85rem; flex-shrink: 0; }
.player-prompt .prompt-text { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.player-prompt .prompt-text .highlight { color: var(--emerald); }

.visualizer-container { position: relative; height: 140px; background: #000; cursor: pointer; }
#visualizerCanvas { width: 100%; height: 100%; display: block; }
.visualizer-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.3); transition: opacity 0.3s; }
.visualizer-overlay.hidden { opacity: 0; pointer-events: none; }
.play-big { width: 64px; height: 64px; border-radius: 50%; background: var(--emerald); color: #000; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; transition: all 0.3s; box-shadow: 0 0 30px var(--emerald-glow); }
.play-big:hover { transform: scale(1.1); box-shadow: 0 0 50px var(--emerald-glow); }

.player-controls { padding: 20px 24px 24px; background: rgba(0,0,0,0.2); }
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.time-label { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--text-muted); min-width: 38px; }
.time-label.right { text-align: right; }
.progress-track { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; position: relative; cursor: pointer; transition: height 0.15s; }
.progress-track:hover { height: 7px; }
.progress-fill { height: 100%; background: var(--emerald); border-radius: 3px; position: relative; transition: width 0.1s linear; box-shadow: 0 0 10px var(--emerald-glow); }
.progress-fill::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald-glow); opacity: 0; transition: opacity 0.15s; }
.progress-track:hover .progress-fill::after { opacity: 1; }

.controls-row { display: flex; align-items: center; justify-content: space-between; }
.controls-center { display: flex; align-items: center; gap: 20px; }
.ctrl-btn { background: none; border: none; color: var(--text-secondary); font-size: 1rem; cursor: pointer; padding: 8px; border-radius: 50%; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.ctrl-btn:hover { color: var(--emerald); background: rgba(255,255,255,0.05); }
.ctrl-btn.active { color: var(--emerald); }
.ctrl-play { width: 48px; height: 48px; border-radius: 50%; background: var(--emerald); color: #000; font-size: 1.1rem; box-shadow: 0 0 20px var(--emerald-glow); }
.ctrl-play:hover { transform: scale(1.08); background: #fff; }

.volume-group { display: flex; align-items: center; gap: 8px; }
.volume-slider { -webkit-appearance: none; appearance: none; width: 90px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; outline: none; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--emerald); cursor: pointer; }
.volume-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--emerald); cursor: pointer; border: none; }
.track-info { display: flex; flex-direction: column; gap: 2px; }
.track-title { font-size: 0.85rem; font-weight: 600; }
.track-artist { font-size: 0.72rem; color: var(--text-muted); }

/* ===== USE CASES ===== */
.use-cases-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.use-case-chip { padding: 14px 28px; background: var(--bg-card); border: 1px solid var(--emerald-border); border-radius: 50px; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); transition: all 0.3s; cursor: default; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px); }
.use-case-chip i { color: var(--emerald); font-size: 0.85rem; }
.use-case-chip:hover { border-color: var(--emerald-border-hover); color: #fff; background: var(--bg-card-hover); transform: translateY(-3px); box-shadow: 0 8px 30px -10px rgba(0, 230, 118, 0.15); }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gallery-card { background: var(--bg-card); border: 1px solid var(--emerald-border); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); backdrop-filter: blur(10px); }
.gallery-card:hover { border-color: var(--emerald-border-hover); transform: translateY(-6px); box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.5); }
.gallery-thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #0a0a0f; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s; opacity: 0.75; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.08); opacity: 1; }
.gallery-thumb-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.gallery-card:hover .gallery-thumb-overlay { opacity: 1; }
.gallery-play-btn { width: 52px; height: 52px; border-radius: 50%; background: var(--emerald); color: #000; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transform: scale(0.8); transition: transform 0.3s; box-shadow: 0 0 25px var(--emerald-glow); }
.gallery-card:hover .gallery-play-btn { transform: scale(1); }
.gallery-meta { padding: 16px 18px; }
.gallery-meta h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-meta h4 .emerald { color: var(--emerald); }
.gallery-meta .author { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.gallery-meta .author i { font-size: 0.65rem; }
.gallery-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; border: 1px dashed rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); }
.gallery-empty i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.gallery-empty p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== CTA SECTION ===== */
.cta-section { text-align: center; padding: 120px 20px; position: relative; }
.cta-section::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, var(--emerald-glow), transparent 70%); opacity: 0.2; pointer-events: none; }
.cta-section h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 16px; position: relative; }
.cta-section p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 40px; position: relative; }

/* ===== TOAST NOTIFICATION ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(10, 10, 12, 0.95); border: 1px solid var(--emerald-border); border-radius: 12px; padding: 14px 20px; font-size: 0.85rem; color: var(--text-primary); display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); animation: slideInToast 0.4s ease-out; backdrop-filter: blur(20px); }
.toast i { color: var(--emerald); }
@keyframes slideInToast { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== SCROLL REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .stats-bar { gap: 32px; }
}
@media (max-width: 640px) {
    .hero { padding: 80px 16px 60px; min-height: auto; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; justify-content: center; }
    section { padding: 70px 0; }
    .player-wrapper { border-radius: 16px; }
    .visualizer-container { height: 100px; }
    .volume-group { display: none; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery-meta { padding: 12px; }
    .gallery-meta h4 { font-size: 0.8rem; }
    .use-case-chip { padding: 10px 20px; font-size: 0.82rem; }
    .stats-bar { gap: 24px; }
    .stat-num { font-size: 1.4rem; }
}
@media (max-width: 380px) { .gallery-grid { grid-template-columns: 1fr; } }

/* =========================================
   APP LAYOUT (Sidebar, Footer, Mobile Nav)
   ========================================= */
:root {
    --sidebar-full: 260px;
    --sidebar-collapsed: 80px;
    --danger: #ff4757;
}

.app-container { display: flex; min-height: 100vh; }

.main-content { 
    flex: 1; 
    margin-left: var(--sidebar-full); 
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    min-width: 0; 
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-full);
    height: 100vh;
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--emerald-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 1000;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .menu-text, .sidebar.collapsed .footer-label, .sidebar.collapsed .lab-header span, .sidebar.collapsed .sidebar-logo span { opacity: 0; display: none; }
.sidebar.collapsed .audio-lab-widget, .sidebar.collapsed .library-list, .sidebar.collapsed .now-playing { opacity: 0; pointer-events: none; }

.sidebar-toggle {
    position: absolute;
    top: 30px;
    right: -12px;
    width: 24px; height: 24px;
    background: var(--bg-deep);
    border: 1px solid var(--emerald-border);
    border-radius: 50%;
    color: var(--emerald);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem;
    transition: transform 0.35s;
}
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    padding: 0 12px;
    white-space: nowrap;
}
.sidebar-logo span { color: var(--emerald); text-shadow: 0 0 15px var(--emerald-glow); }

.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}
.sidebar-menu li a i { font-size: 1.1rem; width: 24px; text-align: center; }
.sidebar-menu li a:hover { background: var(--emerald-subtle); color: var(--emerald); }
.sidebar-menu li a.active { background: var(--emerald-subtle); color: var(--emerald); box-shadow: inset 0 0 0 1px var(--emerald-border-hover); }

/* ===== AUDIO LAB WIDGET ===== */
.audio-lab-widget { margin-top: 30px; border-top: 1px solid var(--emerald-border); padding-top: 20px; transition: opacity 0.35s; }
.lab-header { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; padding: 0 12px; }

.library-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.library-list::-webkit-scrollbar { width: 3px; }
.library-list::-webkit-scrollbar-thumb { background: var(--emerald-border-hover); border-radius: 2px; }

.library-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid transparent; transition: all 0.25s; }
.library-item:hover { background: rgba(0, 230, 118, 0.05); border-color: var(--emerald-border); }
.lib-info { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.lib-name { font-size: 0.82rem; color: #d0d0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-ext { font-size: 0.65rem; color: var(--text-muted); }

.lib-play-btn { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); color: var(--emerald); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; transition: all 0.25s; }
.lib-play-btn:hover { background: rgba(0, 230, 118, 0.15); transform: scale(1.1); }
.lib-play-btn.playing { background: var(--emerald); color: #000; box-shadow: 0 0 12px var(--emerald-glow); animation: playPulse 1.5s ease-in-out infinite; }
@keyframes playPulse { 0%,100% { box-shadow: 0 0 12px var(--emerald-glow); } 50% { box-shadow: 0 0 24px var(--emerald-glow); } }

.now-playing { margin-top: 14px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--emerald-border); display: flex; align-items: center; gap: 10px; opacity: 0.4; transition: all 0.3s; pointer-events: none; }
.now-playing.active { opacity: 1; pointer-events: auto; border-color: var(--emerald-border-hover); box-shadow: 0 0 15px rgba(0, 230, 118, 0.08); }

.np-visualizer { display: flex; align-items: flex-end; gap: 2px; height: 18px; width: 18px; flex-shrink: 0; }
.np-visualizer span { flex: 1; background: var(--emerald); border-radius: 1px; height: 20%; opacity: 0.4; }
.np-visualizer.animate span { animation: miniBar 0.6s ease-in-out infinite alternate; opacity: 1; }
.np-visualizer.animate span:nth-child(1) { animation-delay: 0s; }
.np-visualizer.animate span:nth-child(2) { animation-delay: 0.12s; }
.np-visualizer.animate span:nth-child(3) { animation-delay: 0.24s; }
.np-visualizer.animate span:nth-child(4) { animation-delay: 0.08s; }
.np-visualizer.animate span:nth-child(5) { animation-delay: 0.18s; }
@keyframes miniBar { 0% { height: 20%; } 100% { height: 100%; } }

.np-info { flex: 1; min-width: 0; }
.np-title { font-size: 0.75rem; font-weight: 600; color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.np-progress-track { width: 100%; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; cursor: pointer; }
.np-progress-fill { height: 100%; width: 0%; background: var(--emerald); border-radius: 2px; transition: width 0.2s linear; box-shadow: 0 0 5px var(--emerald); }

.np-stop-btn { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.2); color: var(--danger); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; transition: all 0.25s; }
.np-stop-btn:hover { background: rgba(255,71,87,0.2); transform: scale(1.1); }

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer { margin-top: auto; background: rgba(255,255,255,0.02); padding: 14px; border-radius: 12px; border: 1px solid var(--emerald-border); }
.footer-label { color: var(--text-muted); display: block; margin-bottom: 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-logout { color: var(--danger); text-decoration: none; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 0.25s; }
.footer-logout:hover { transform: translateX(3px); filter: brightness(1.2); }

/* ===== MOBILE NAV ===== */
.mobile-nav { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 992px) {
    .main-content { margin-left: 0 !important; }
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 50px rgba(0,0,0,0.5); }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar-toggle { display: none; }
    
    .mobile-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: rgba(8, 8, 12, 0.9);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--emerald-border);
        position: sticky;
        top: 0;
        z-index: 999;
    }
    .mobile-nav-left { display: flex; align-items: center; gap: 12px; }
    .hamburger-btn { background: none; border: 1px solid var(--emerald-border); color: var(--emerald); font-size: 1.1rem; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
    .mobile-nav-logo { font-size: 1.2rem; font-weight: 800; color: #fff; }
    .mobile-nav-logo span { color: var(--emerald); }
    .mobile-nav-right { display: flex; align-items: center; gap: 15px; font-size: 1.2rem; }
    .mobile-create-btn { color: var(--emerald); }
    .mobile-logout-btn { color: var(--danger); font-size: 1rem; }
    
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
}

/* ===== MAIN FOOTER ===== */
.site-footer {
    background: rgba(5, 5, 7, 0.95);
    border-top: 1px solid var(--emerald-border);
    padding: 30px 20px;
    margin-left: var(--sidebar-full);
    transition: margin-left 0.35s;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.footer-copy strong { color: var(--emerald); font-weight: 600; }
.footer-links { display: flex; gap: 15px; justify-content: center; align-items: center; }
.footer-links a { color: var(--text-secondary); font-size: 0.8rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--emerald); }
.footer-links .divider { color: var(--text-muted); opacity: 0.5; }

@media (max-width: 992px) {
    .site-footer { margin-left: 0; }
}

/* =========================================
   DASHBOARD & CHAT PAGES
   ========================================= */

/* ===== DASHBOARD ===== */
.dashboard-page { padding: 32px; }
.text-emerald { color: var(--emerald); }
.text-muted { color: var(--text-muted); }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.user-greeting { display: flex; align-items: center; gap: 20px; }
.avatar { width: 65px; height: 65px; border-radius: 50%; border: 2px solid var(--emerald); box-shadow: 0 0 15px var(--emerald-glow); }
.plan-badge { padding: 8px 20px; border-radius: 50px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.plan-badge.free { background: rgba(255,255,255,0.1); color: #ccc; border: 1px solid #444; }
.plan-badge.premium { background: var(--emerald-subtle); color: var(--emerald); border: 1px solid var(--emerald); box-shadow: 0 0 10px var(--emerald-glow); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; }
.glass-panel { background: rgba(20, 20, 25, 0.6); border: 1px solid var(--emerald-border); border-radius: 20px; backdrop-filter: blur(12px); padding: 25px; }
.stat-card { display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 60px; height: 60px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--emerald); }
.stat-info { flex: 1; }
.stat-info h3 { margin-bottom: 10px; font-size: 1.1rem; color: #fff; }
.stat-info p { color: #a0a0a0; font-size: 0.9rem; margin-bottom: 15px; }

.progress-container { width: 100%; }
.progress-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; border-radius: 10px; transition: width 1s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 0 10px var(--emerald-glow); }
.quota-text { font-size: 0.85rem; color: #888; }

.btn-upgrade { width: 100%; padding: 12px; background: var(--emerald); color: #000; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; transition: all 0.3s; }
.btn-upgrade.glow-effect:hover { box-shadow: 0 0 20px var(--emerald-glow); transform: translateY(-2px); }
.btn-upgrade.success { background: rgba(0,230,118,0.2); color: var(--emerald); cursor: default; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.btn-outline-emerald { padding: 8px 16px; border: 1px solid var(--emerald); color: var(--emerald); border-radius: 8px; text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.btn-outline-emerald:hover { background: var(--emerald); color: #000; }

.history-list { display: flex; flex-direction: column; gap: 15px; }
.history-item { display: flex; align-items: center; padding: 15px; background: rgba(255,255,255,0.02); border-radius: 12px; transition: 0.3s; border: 1px solid transparent; }
.history-item:hover { background: rgba(0,230,118,0.05); border-color: var(--emerald-border-hover); transform: translateX(5px); }
.history-icon { width: 40px; height: 40px; background: #111; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 15px; color: var(--emerald); }
.history-content { flex: 1; }
.history-content h4 { font-size: 0.95rem; margin-bottom: 4px; color: #eee; }
.history-content p { font-size: 0.85rem; color: #888; font-style: italic; }
.history-date { font-size: 0.8rem; color: #666; }
.empty-state { text-align: center; padding: 40px 20px; color: #666; }
.empty-icon { font-size: 40px; margin-bottom: 15px; opacity: 0.5; }

/* ===== CHAT PAGE ===== */
.chat-page { padding: 20px 32px; }
.chat-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 16px 20px; background: rgba(12,12,18,0.92); border: 1px solid var(--emerald-border); border-radius: 16px; backdrop-filter: blur(20px); }
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-icon-wrap { position: relative; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.header-icon-pulse { position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--emerald); opacity: 0; animation: iconPulse 2.5s ease-out infinite; }
@keyframes iconPulse { 0% { opacity: 0.6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.chat-page-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-sub { font-size: 0.78rem; color: var(--text-secondary); margin: 3px 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quota-badge { background: linear-gradient(135deg, rgba(0,230,118,0.1), rgba(0,230,118,0.04)); border: 1px solid var(--emerald-border); padding: 8px 18px; border-radius: 50px; font-weight: 600; font-size: 0.82rem; color: var(--emerald); white-space: nowrap; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ===== Spinning Rainbow Border (Logo ATW) ===== */
.logo-spin-border {
    width: 100%; height: 100%; border-radius: 50%; padding: 2px;
    background: conic-gradient(from 0deg, #ff0080, #ff8c00, #00e676, #00bfff, #ff0080);
    animation: spinBorder 3s linear infinite;
    display: flex; align-items: center; justify-content: center;
}
.logo-spin-border.small { width: 36px; height: 36px; padding: 1.5px; }
.header-logo-img, .logo-spin-border img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    background: #050507; border: 1px solid #050507;
}
@keyframes spinBorder { to { transform: rotate(360deg); } }

/* ===== Chat Window ===== */
.chat-window-wrapper { background: rgba(12,12,18,0.92); border: 1px solid var(--emerald-border); border-radius: 20px; height: calc(100vh - 180px); min-height: 400px; max-height: 900px; display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(20px); position: relative; }
.chat-window-wrapper::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,230,118,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(0,230,118,0.015) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; z-index: 0; }
.chat-messages { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 1; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--emerald-border-hover); border-radius: 2px; }

.message { display: flex; gap: 12px; max-width: 82%; animation: msgIn 0.4s cubic-bezier(0.4,0,0.2,1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.message.ai { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; margin-top: 2px; overflow: hidden; }
.ai-avatar { border-radius: 50%; }
.user-avatar { border-radius: 50%; border: 1px solid rgba(124,77,255,0.4); }
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.msg-content { min-width: 0; }
.msg-name { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.message.user .msg-name { text-align: right; color: rgba(124,77,255,0.8); }
.msg-body { padding: 14px 18px; border-radius: 16px; line-height: 1.65; font-size: 0.9rem; color: var(--text-primary); word-break: break-word; }
.message.ai .msg-body { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04); border-top-left-radius: 4px; }
.message.user .msg-body { background: rgba(124,77,255,0.08); border: 1px solid rgba(124,77,255,0.15); border-top-right-radius: 4px; }
.msg-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 5px; opacity: 0.7; }
.message.user .msg-time { text-align: right; }
.user-structure-tag { font-size: 0.75rem; background: linear-gradient(135deg, var(--emerald), var(--emerald-dim)); color: #000; padding: 5px 12px; border-radius: 8px; font-weight: 700; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 6px; }

/* ===== Input Panel ===== */
.input-control-panel { background: rgba(5,5,10,0.7); border-top: 1px solid var(--emerald-border); position: relative; z-index: 2; backdrop-filter: blur(20px); }
.tab-headers { display: flex; gap: 4px; padding: 12px 20px 0; position: relative; }
.tab-btn { background: transparent; border: none; color: var(--text-muted); padding: 10px 20px; cursor: pointer; font-weight: 600; font-size: 0.82rem; border-bottom: 2px solid transparent; transition: color 0.3s; display: flex; align-items: center; gap: 8px; font-family: inherit; position: relative; z-index: 1; }
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--emerald); }
.tab-indicator { position: absolute; bottom: 0; height: 2px; background: var(--emerald); border-radius: 1px; transition: left 0.35s cubic-bezier(0.4,0,0.2,1), width 0.35s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 0 10px var(--emerald-glow); }

.tab-content { padding: 16px 20px; background: rgba(0,0,0,0.25); border-bottom: 1px solid rgba(255,255,255,0.03); animation: tabSlide 0.3s ease-out; }
@keyframes tabSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.composer-header { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.composer-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; min-height: 42px; padding: 10px 14px; background: rgba(0,0,0,0.35); border-radius: 12px; border: 1px dashed rgba(255,255,255,0.08); align-items: center; transition: border-color 0.3s; }
.composer-placeholder { color: var(--text-muted); font-size: 0.8rem; }
.comp-tag { background: linear-gradient(135deg, var(--emerald), var(--emerald-dim)); color: #000; padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; animation: tagPop 0.3s cubic-bezier(0.34,1.56,0.64,1); box-shadow: 0 2px 10px var(--emerald-glow); }
@keyframes tagPop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }
.comp-arrow { color: var(--text-muted); font-size: 0.7rem; }
.composer-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-tools button { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: var(--text-secondary); padding: 7px 14px; border-radius: 10px; cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all 0.25s; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.composer-tools button:hover { border-color: var(--emerald-border-hover); color: var(--emerald); background: var(--emerald-subtle); transform: translateY(-1px); }
.composer-tools .reset-btn { color: #ff4757 !important; border-color: rgba(255,71,87,0.2) !important; margin-left: auto !important; }
.composer-tools .reset-btn:hover { border-color: rgba(255,71,87,0.5) !important; background: rgba(255,71,87,0.08) !important; color: #ff6b81 !important; }

.chat-input-area { padding: 14px 20px 18px; display: flex; gap: 10px; align-items: center; }
.action-btn { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); width: 44px; height: 44px; min-width: 44px; border-radius: 12px; color: var(--text-secondary); cursor: pointer; transition: all 0.25s; display: flex; justify-content: center; align-items: center; font-size: 0.9rem; }
.action-btn:hover { background: var(--emerald-subtle); color: var(--emerald); border-color: var(--emerald-border-hover); transform: translateY(-1px); }
.mic-btn.recording { background: rgba(255,71,87,0.1); border-color: rgba(255,71,87,0.4); color: #ff4757; animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,71,87,0.3); } 50% { box-shadow: 0 0 0 8px rgba(255,71,87,0); } }

.input-wrapper { flex: 1; position: relative; min-width: 0; }
.chat-input-area input { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); padding: 12px 18px; border-radius: 14px; color: #fff; font-size: 0.9rem; outline: none; transition: all 0.3s; font-family: inherit; }
.chat-input-area input::placeholder { color: var(--text-muted); }
.chat-input-area input:focus { border-color: var(--emerald-border-hover); background: rgba(0,0,0,0.3); box-shadow: 0 0 0 3px rgba(0,230,118,0.06); }
.input-glow { position: absolute; inset: -1px; border-radius: 15px; background: linear-gradient(135deg, var(--emerald), transparent, var(--emerald)); opacity: 0; transition: opacity 0.3s; z-index: -1; filter: blur(4px); }
.chat-input-area input:focus ~ .input-glow { opacity: 0.15; }

.send-btn { background: linear-gradient(135deg, var(--emerald), var(--emerald-dim)); color: #000; border: none; width: 46px; height: 46px; min-width: 46px; border-radius: 14px; font-weight: 700; cursor: pointer; transition: all 0.25s; display: flex; justify-content: center; align-items: center; font-size: 1rem; position: relative; overflow: hidden; }
.send-btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.05); box-shadow: 0 4px 20px var(--emerald-glow); }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.send-ripple { position: absolute; inset: 0; background: rgba(255,255,255,0.3); border-radius: inherit; transform: scale(0); opacity: 0; }
.send-ripple.active { animation: rippleOut 0.5s ease-out; }
@keyframes rippleOut { to { transform: scale(2.5); opacity: 0; } }

/* ===== Loading & Wave ===== */
.loading-dots { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.loading-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--emerald); animation: dotBounce 1.2s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%,80%,100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.2); } }

.generating-wave { display: flex; gap: 3px; margin-top: 14px; height: 24px; align-items: center; }
.generating-wave .wave-bar { width: 3px; border-radius: 2px; background: linear-gradient(to top, var(--emerald-dim), var(--emerald)); animation: waveJump 0.8s ease-in-out infinite alternate; }
.generating-wave .wave-bar:nth-child(1) { animation-delay: 0s; height: 40%; }
.generating-wave .wave-bar:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.generating-wave .wave-bar:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.generating-wave .wave-bar:nth-child(4) { animation-delay: 0.3s; height: 55%; }
.generating-wave .wave-bar:nth-child(5) { animation-delay: 0.15s; height: 85%; }
.generating-wave .wave-bar:nth-child(6) { animation-delay: 0.25s; height: 45%; }
.generating-wave .wave-bar:nth-child(7) { animation-delay: 0.35s; height: 75%; }
@keyframes waveJump { 0% { transform: scaleY(0.3); opacity: 0.5; } 100% { transform: scaleY(1); opacity: 1; } }

.chat-audio-player { width: 100%; margin-top: 14px; border-radius: 14px; overflow: hidden; outline: none; }
.chat-audio-player::-webkit-media-controls-panel { background: rgba(0,230,118,0.05); }

.chat-toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.chat-toast { background: rgba(12,12,18,0.95); border: 1px solid var(--emerald-border); padding: 12px 24px; border-radius: 12px; font-size: 0.85rem; color: var(--text-primary); display: flex; align-items: center; gap: 10px; backdrop-filter: blur(20px); box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: toastIn 0.4s ease-out; pointer-events: auto; }
.chat-toast i { color: var(--emerald); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.chat-toast.fade-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.95); } }

/* ===== RESPONSIVE FOR DASHBOARD & CHAT ===== */
@media (max-width: 992px) {
    .dashboard-page, .chat-page { padding: 20px; }
}
@media (max-width: 768px) {
    .chat-page-header { flex-direction: column; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; }
    .quota-badge { font-size: 0.75rem; padding: 6px 14px; align-self: flex-start; }
    .chat-window-wrapper { height: calc(100vh - 220px); min-height: 350px; border-radius: 16px; }
    .chat-messages { padding: 16px; gap: 14px; }
    .message { max-width: 90%; gap: 10px; }
    .msg-body { padding: 12px 14px; font-size: 0.85rem; border-radius: 14px; }
    .tab-btn { padding: 8px 14px; font-size: 0.78rem; gap: 6px; }
    .chat-input-area { padding: 10px 14px 14px; gap: 8px; }
    .action-btn { width: 40px; height: 40px; min-width: 40px; }
    .send-btn { width: 42px; height: 42px; min-width: 42px; }
}

/* =========================================
   GALLERY & UPGRADE PAGES
   ========================================= */

/* ===== GALLERY PAGE ===== */
.gallery-page { padding: 32px; }
.gallery-header { margin-bottom: 40px; }
.page-title-wrap { display: flex; align-items: center; gap: 20px; }
.page-icon-bg { width: 60px; height: 60px; border-radius: 16px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--emerald); box-shadow: 0 0 20px rgba(0,230,118,0.1); }
.gallery-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 5px; }
.gallery-header p { color: var(--text-secondary); font-size: 0.95rem; }

.gallery-showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; }

.music-card { background: rgba(20, 20, 25, 0.6); border: 1px solid var(--emerald-border); border-radius: 16px; padding: 12px; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); backdrop-filter: blur(10px); }
.music-card:hover { transform: translateY(-8px); border-color: var(--emerald-border-hover); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); }
.music-card.playing { border-color: var(--emerald); box-shadow: 0 0 25px var(--emerald-glow); }

.cover-wrapper { position: relative; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; background: #111; }
.cover-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s, filter 0.3s; }
.music-card:hover .cover-wrapper img { transform: scale(1.05); filter: brightness(0.6); }
.music-card.playing .cover-wrapper img { filter: brightness(0.5) saturate(1.2); }

.cover-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 50%); opacity: 0; transition: opacity 0.3s; }
.music-card:hover .cover-overlay, .music-card.playing .cover-overlay { opacity: 1; }

.play-overlay-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); background: var(--emerald); color: black; border: none; width: 52px; height: 52px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; opacity: 0; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px var(--emerald-glow); }
.music-card:hover .play-overlay-btn, .music-card.playing .play-overlay-btn { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Equalizer Bars on Card */
.card-eq-bars { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 3px; align-items: flex-end; height: 18px; opacity: 0; transition: opacity 0.3s; }
.card-eq-bars span { width: 3px; background: var(--emerald); border-radius: 2px; height: 30%; }
.card-eq-bars.active { opacity: 1; }
.card-eq-bars.active span { animation: cardEqJump 0.8s ease-in-out infinite alternate; }
.card-eq-bars.active span:nth-child(1) { animation-delay: 0s; }
.card-eq-bars.active span:nth-child(2) { animation-delay: 0.2s; }
.card-eq-bars.active span:nth-child(3) { animation-delay: 0.4s; }
.card-eq-bars.active span:nth-child(4) { animation-delay: 0.1s; }
@keyframes cardEqJump { 0% { height: 20%; } 100% { height: 100%; } }

.card-meta { margin-top: 15px; padding: 0 5px; }
.card-meta h4 { font-size: 1rem; color: #fff; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-row { display: flex; align-items: center; gap: 8px; }
.author-row i { color: var(--emerald); font-size: 0.9rem; }
.author-row p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== UPGRADE PAGE ===== */
.upgrade-page { padding: 40px 32px; max-width: 1100px; margin: 0 auto; }
.upgrade-hero { text-align: center; margin-bottom: 40px; }
.hero-badge-glow { display: inline-block; padding: 6px 16px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); color: var(--emerald); border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.upgrade-hero h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; background: linear-gradient(135deg, #fff, var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 16px; }
.upgrade-hero p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.upgrade-features-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 60px; }
.feat-item { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-secondary); }
.feat-item i { font-size: 1.5rem; color: var(--emerald); width: 50px; height: 50px; border-radius: 12px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); display: flex; align-items: center; justify-content: center; }
.feat-item span { font-size: 0.85rem; font-weight: 600; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 800px; margin: 0 auto; }
.price-card { background: rgba(20, 20, 25, 0.8); border: 1px solid rgba(255,255,255,0.05); border-radius: 24px; padding: 40px 30px; position: relative; display: flex; flex-direction: column; backdrop-filter: blur(15px); transition: transform 0.3s; }
.price-card:hover { transform: translateY(-5px); }

.premium-glow { border-color: var(--emerald); box-shadow: 0 0 40px rgba(0, 230, 118, 0.1); background: linear-gradient(145deg, rgba(15,15,20,0.9), rgba(0,230,118,0.03)); }
.premium-glow::before { content: ''; position: absolute; inset: -1px; border-radius: 24px; padding: 1px; background: linear-gradient(135deg, var(--emerald), transparent, var(--emerald)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

.card-badge { position: absolute; top: -12px; right: 25px; background: var(--emerald); color: #000; font-size: 0.7rem; font-weight: 800; padding: 5px 14px; border-radius: 20px; box-shadow: 0 0 15px var(--emerald-glow); }

.price-card h3 { font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.cost { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.cost span { font-size: 0.9rem; color: #666; font-weight: 400; }
.plan-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 25px; min-height: 40px; }

.perks { list-style: none; margin-bottom: 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.perks li { font-size: 0.9rem; color: #ccc; display: flex; align-items: flex-start; gap: 12px; }
.perks li i { margin-top: 3px; }
.perks li.active i { color: var(--emerald); }
.perks li.disabled { color: #444; }
.perks li.disabled i { color: #555; }

.btn-plan { width: 100%; padding: 14px; border-radius: 12px; border: none; font-weight: bold; font-size: 1rem; cursor: pointer; transition: 0.3s; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-plan.disabled { background: rgba(255,255,255,0.05); color: #555; cursor: not-allowed; }
.btn-plan.active-emerald { background: var(--emerald); color: #000; box-shadow: 0 0 20px var(--emerald-glow); }
.btn-plan.active-emerald:hover { transform: translateY(-3px); box-shadow: 0 5px 25px var(--emerald-glow); }
.secure-payment { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; }

/* ===== FAQ SECTION ===== */
.faq-section { max-width: 800px; margin: 80px auto 0; }
.faq-section h3 { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.faq-item { background: rgba(20,20,25,0.6); border: 1px solid var(--emerald-border); border-radius: 12px; margin-bottom: 15px; overflow: hidden; backdrop-filter: blur(10px); }
.faq-q { padding: 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.faq-q:hover { background: rgba(0,230,118,0.03); }
.faq-q i { transition: transform 0.3s; color: var(--emerald); }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out, padding 0.3s; padding: 0 20px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 200px; padding: 0 20px 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .gallery-page, .upgrade-page { padding: 20px; }
    .upgrade-features-grid { gap: 20px; }
    .pricing-grid { grid-template-columns: 1fr; }
}

/* =========================================
   LEGAL PAGES & BUTTON FIXES
   ========================================= */

/* ===== LEGAL PAGES (ToS & Privacy) ===== */
.legal-page { padding: 40px 32px; }
.legal-wrapper { max-width: 850px; margin: 0 auto; background: rgba(20, 20, 25, 0.6); border: 1px solid var(--emerald-border); border-radius: 24px; padding: 50px; backdrop-filter: blur(15px); box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5); }

.legal-header { text-align: center; margin-bottom: 40px; }
.legal-icon { width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 18px; background: var(--emerald-subtle); border: 1px solid var(--emerald-border); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--emerald); box-shadow: 0 0 25px var(--emerald-glow); }
.legal-wrapper h2 { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.update-date { font-size: 0.85rem; color: var(--text-muted); }

.legal-alert { background: rgba(0,230,118,0.05); border: 1px solid var(--emerald-border); border-radius: 12px; padding: 16px 20px; margin-bottom: 40px; display: flex; gap: 15px; align-items: center; }
.legal-alert i { color: var(--emerald); font-size: 1.2rem; }
.legal-alert span { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

.legal-section { margin-bottom: 35px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.legal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.legal-section h3 { font-size: 1.2rem; color: var(--emerald); margin-bottom: 12px; font-weight: 700; }
.legal-section p { font-size: 0.95rem; color: #c0c0c0; line-height: 1.8; text-align: justify; }

/* ===== FIX: GALLERY EMPTY STATE BUTTON ===== */
.empty-gallery-card .btn-action { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: transparent; 
    color: var(--emerald); 
    border: 1px solid var(--emerald-border-hover);
    padding: 8px 20px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.85rem;
    margin-top: 20px;
    transition: all 0.3s; 
}
.empty-gallery-card .btn-action:hover { 
    background: var(--emerald-subtle); 
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--emerald-glow);
}

/* ===== RESPONSIVE LEGAL ===== */
@media (max-width: 768px) {
    .legal-page { padding: 20px; }
    .legal-wrapper { padding: 30px 20px; border-radius: 16px; }
    .legal-wrapper h2 { font-size: 1.6rem; }
    .legal-alert { flex-direction: column; text-align: center; gap: 10px; }
}

/* =========================================
   FULL SCREEN PLAYER DEMO & TOAST FIX
   ========================================= */

/* Override container limits for player section */
.player-section-full { 
    padding: 100px 0; 
    background: linear-gradient(180deg, transparent, var(--emerald-subtle) 50%, transparent); 
}

/* Full Width Player Wrapper - Kini dibungkus container (Max 1200px) */
.player-wrapper-full {
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid var(--emerald-border);
    border-radius: 24px; /* Tambah rounded corner karena sudah tidak full edge */
    overflow: hidden;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 118, 0.05);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

/* Prompt Bar Full Width */
.player-prompt-full {
    width: 100%;
    padding: 20px 30px;
    border-bottom: 1px solid var(--emerald-border);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.3);
    box-sizing: border-box;
}

/* Make visualizer taller and immersive */
.visualizer-container-full {
    position: relative;
    height: 300px; /* Tinggi ideal untuk desktop */
    width: 100%;
    background: #000;
    cursor: pointer;
}

/* Controls section takes full width */
.player-controls-full {
    padding: 25px 30px;
    background: rgba(0,0,0,0.2);
    width: 100%;
    box-sizing: border-box;
}

/* Ensure progress row and controls row fill width */
.progress-row-full {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.controls-row-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

/* Fix Toast: Move to Bottom Center to avoid blocking right UI */
.toast-container {
    bottom: 24px !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    align-items: center !important;
}
.toast {
    animation: slideInToastCenter 0.4s ease-out !important;
}
@keyframes slideInToastCenter {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments for Tablet & Mobile */
@media (max-width: 768px) {
    .visualizer-container-full { height: 220px; }
    .player-prompt-full { padding: 15px 20px; }
    .player-controls-full { padding: 20px; }
    .player-wrapper-full { border-radius: 16px; }
    
    /* Susun tombol kontrol menjadi tertumpuk vertical di Mobile */
    .controls-row-full {
        flex-direction: column;
        gap: 20px;
    }
    .track-info {
        text-align: center;
        width: 100%;
        order: 1; /* Pindahkan judul lagu ke paling atas */
    }
    .controls-center {
        order: 2; /* Tombol play di tengah */
        width: 100%;
        justify-content: center;
    }
    .volume-group {
        order: 3; /* Volume di paling bawah */
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .visualizer-container-full { height: 180px; }
    .player-prompt-full { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 8px; 
    }
    .player-prompt-full .prompt-text { font-size: 0.75rem; }
    .volume-group { display: none; } /* Sembunyikan volume di layar sangat kecil agar tidak berantakan */
}

/* =========================================
   FIX: LAYOUT HALAMAN UTAMA (INDEX) FULL WIDTH
   ========================================= */
.page-content-home {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1; /* Memaksa konten mengisi sisa ruang layar */
    position: relative;
    z-index: 1;
}


/* =========================================
   MOBILE & TABLET RESPONSIVE FIX (INDEX)
   ========================================= */

/* Mencegah scroll horizontal yang tidak diinginkan */
.page-content-home {
    overflow-x: hidden;
}

/* === TABLET & MOBILE (Max 768px) === */
@media (max-width: 768px) {
    /* Section Padding */
    .page-content-home section { padding: 60px 0; }
    
    /* Container Padding */
    .container { padding: 0 16px; }
    
    /* Player Prompt Bar */
    .player-prompt-full { 
        padding: 14px 16px; 
        gap: 10px;
    }
    .player-prompt-full .prompt-text {
        font-size: 0.75rem;
        line-height: 1.4;
        word-break: break-word; /* Mencegah teks keluar layar */
    }
    
    /* Player Visualizer */
    .visualizer-container-full { height: 200px; }
    
    /* Player Controls */
    .player-controls-full { padding: 16px; }
    .controls-row-full {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .track-info {
        width: 100%;
        text-align: center;
        order: 1; /* Judul pindah ke atas */
    }
    .controls-center {
        order: 2; /* Tombol play di tengah */
        gap: 15px;
    }
    .volume-group {
        order: 3; /* Volume di bawah */
        width: 100%;
        justify-content: center;
    }
    .track-title { font-size: 0.9rem; }
    .track-artist { font-size: 0.7rem; }
    
    /* Gallery Grid di Tablet */
    .gallery-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    .gallery-meta { padding: 12px; }
    
    /* Features Grid di Tablet */
    .features-grid { 
        grid-template-columns: 1fr; 
        max-width: 400px; 
        margin: 0 auto; 
    }
    
    /* Section Header */
    .section-title { font-size: 1.6rem; }
    .section-desc { font-size: 0.9rem; padding: 0 10px; }
}

/* === SMARTPHONE KECIL (Max 480px) === */
@media (max-width: 480px) {
    /* Hero Section */
    .hero { padding: 60px 16px 40px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 0.9rem; }
    .hero-actions { gap: 10px; }
    .btn { width: 100%; max-width: 280px; padding: 14px 20px; font-size: 0.85rem; }
    
    /* Stats Bar */
    .stats-bar { 
        gap: 20px; 
        margin-top: 40px; 
        padding-top: 30px; 
    }
    .stat-num { font-size: 1.3rem; }
    .stat-label { font-size: 0.7rem; }
    
    /* Player Visualizer & Controls */
    .visualizer-container-full { height: 160px; }
    .player-wrapper-full { border-radius: 16px; }
    .ctrl-btn { padding: 6px; font-size: 0.9rem; }
    .ctrl-play { width: 42px; height: 42px; font-size: 1rem; }
    .play-big { width: 52px; height: 52px; font-size: 1.1rem; }
    
    /* Gallery Grid di HP Kecil */
    .gallery-grid { 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    /* Use Cases */
    .use-cases-wrap { gap: 8px; }
    .use-case-chip { 
        padding: 8px 16px; 
        font-size: 0.75rem; 
        width: 100%; 
        max-width: 300px; 
        justify-content: center; 
    }
    
    /* Features Card */
    .feature-card { padding: 24px 20px; }
    .feature-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .feature-card h3 { font-size: 1.05rem; }
    .feature-card p { font-size: 0.85rem; }
    
    /* CTA Section */
    .cta-section { padding: 80px 16px; }
    .cta-section h2 { font-size: 1.6rem; }
    .cta-section p { font-size: 0.9rem; }
}


/* ===== Options Panel ===== */
.options-panel {
    border-bottom: 1px solid var(--emerald-border);
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.options-panel.closed {
    max-height: 0 !important;
}
.options-panel.closed .options-body {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    margin: 0;
}

.options-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.25s, background 0.25s;
}
.options-toggle:hover {
    color: var(--emerald);
    background: var(--emerald-subtle);
}
.toggle-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.35s;
}
.options-panel.closed .toggle-arrow {
    transform: rotate(180deg);
}

.options-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.35s;
}

.opt-row {
    display: flex;
    gap: 12px;
}

.opt-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.opt-group-full {
    flex-basis: 100%;
}

.opt-group label,
.opt-conditional label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.opt-group select,
.opt-input,
.opt-conditional textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s;
    resize: vertical;
}

.opt-group select:focus,
.opt-input:focus,
.opt-conditional textarea:focus {
    border-color: var(--emerald-border-hover);
    box-shadow: 0 0 0 2px rgba(0,230,118,0.08);
}

.opt-conditional {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}

/* Image Upload */
.image-upload-area {
    position: relative;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s;
}
.image-upload-area:hover {
    border-color: var(--emerald-border-hover);
}
.image-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.upload-placeholder i { font-size: 1.5rem; color: var(--emerald); opacity: 0.5; }
.image-preview {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== Responsive Options ===== */
@media (max-width: 768px) {
    .opt-row { flex-direction: column; gap: 10px; }
    .opt-group-full { flex-basis: auto; }
    .options-body { padding: 12px 16px 16px; gap: 10px; }
}


/* ===== Options Panel ===== */
.options-panel { border-bottom: 1px solid var(--emerald-border); overflow: hidden; transition: max-height 0.35s ease; }
.options-panel.closed { max-height: 0 !important; }
.options-panel.closed .options-body { padding-top: 0 !important; padding-bottom: 0 !important; opacity: 0; margin: 0; }
.options-toggle {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px; cursor: pointer;
    color: var(--text-secondary); font-size: 0.8rem; font-weight: 600;
    transition: color 0.25s, background 0.25s;
}
.options-toggle:hover { color: var(--emerald); background: var(--emerald-subtle); }
.toggle-arrow { margin-left: auto; font-size: 0.65rem; transition: transform 0.35s; }
.options-panel.closed .toggle-arrow { transform: rotate(180deg); }
.options-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; transition: all 0.35s; }
.opt-row { display: flex; gap: 12px; }
.opt-group { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.opt-group label, .opt-conditional label {
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.opt-group select, .opt-input, .opt-conditional textarea {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 10px 14px; color: var(--text-primary);
    font-size: 0.85rem; font-family: inherit; outline: none;
    transition: border-color 0.25s; resize: vertical;
}
.opt-group select:focus, .opt-input:focus, .opt-conditional textarea:focus {
    border-color: var(--emerald-border-hover);
    box-shadow: 0 0 0 2px rgba(0,230,118,0.08);
}
.opt-conditional {
    display: flex; flex-direction: column; gap: 6px; padding: 12px 16px;
    background: rgba(0,0,0,0.2); border-radius: 12px; border: 1px solid rgba(255,255,255,0.04);
}
.image-upload-area {
    position: relative; border: 2px dashed rgba(255,255,255,0.1); border-radius: 12px;
    overflow: hidden; cursor: pointer; transition: border-color 0.25s;
}
.image-upload-area:hover { border-color: var(--emerald-border-hover); }
.image-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 30px 20px; color: var(--text-muted); font-size: 0.8rem;
}
.upload-placeholder i { font-size: 1.5rem; color: var(--emerald); opacity: 0.5; }
.image-preview { width: 100%; max-height: 150px; object-fit: cover; border-radius: 10px; display: none; }

@media (max-width: 768px) {
    .opt-row { flex-direction: column; gap: 10px; }
    .options-body { padding: 12px 16px 16px; gap: 10px; }
}


