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

/* ==================== CSS Variables (Light & Dark) ==================== */
:root {
    --bg: #ffffff;
    --bg-secondary: #fafbfc;
    --text: #1e293b;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.02);
    --card-hover-shadow: 0 12px 30px rgba(0,0,0,0.08);
    --hero-bg: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    --hero-text: #0f172a;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --toast-bg-success: #065f46;
    --toast-bg-error: #b91c1c;
    --toast-bg-info: #1e40af;
    --progress-bg: #e2e8f0;
    --progress-fill: #4f46e5;
    --quality-badge-bg: #fbbf24;
    --quality-badge-color: #000;
}

body.dark {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --text: #cbd5e1;
    --text-secondary: #94a3b8;
    --border: #334155;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --card-bg: #1e293b;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.3);
    --card-hover-shadow: 0 12px 30px rgba(0,0,0,0.5);
    --hero-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --hero-text: #f1f5f9;
    --footer-bg: #020617;
    --footer-text: #64748b;
    --toast-bg-success: #047857;
    --toast-bg-error: #b91c1c;
    --toast-bg-info: #1e3a8a;
    --progress-bg: #334155;
    --progress-fill: #818cf8;
    --quality-badge-bg: #f59e0b;
    --quality-badge-color: #000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; transition: background 0.3s, color 0.3s; }

/* ==================== TOP BAR ==================== */
.topbar { display: flex; justify-content: space-between; align-items: center; background: var(--bg); backdrop-filter: blur(12px); padding: 12px 40px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; flex-wrap: wrap; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 32px; width: auto; }
.topbar-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.topbar-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.9rem; padding: 8px 14px; border-radius: 8px; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--primary); color: white; }

/* Dark mode toggle */
.dark-toggle { background: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 1.1rem; color: var(--text); margin-left: 12px; transition: background 0.2s; }
.dark-toggle:hover { background: var(--border); }

/* ==================== HERO ==================== */
.hero { text-align: center; padding: 80px 20px 60px; background: var(--hero-bg); }
.hero h1 { font-size: 3.5rem; font-weight: 800; color: var(--hero-text); margin-bottom: 16px; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 35px; }
.input-section { display: flex; max-width: 700px; margin: 0 auto; background: var(--bg); border-radius: 50px; box-shadow: 0 8px 25px rgba(0,0,0,0.06); overflow: hidden; }
.input-section input { flex: 1; padding: 18px 25px; font-size: 1rem; border: none; outline: none; background: var(--bg); color: var(--text); }
.input-section button { padding: 18px 32px; background: var(--primary); color: white; border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.3s; white-space: nowrap; }
.input-section button:hover { background: var(--primary-hover); }

/* ==================== PROGRESS BAR ==================== */
.progress-container { width: 100%; max-width: 700px; margin: 15px auto; display: none; }
.progress-bar { height: 6px; background: var(--progress-bg); border-radius: 10px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0%; background: var(--progress-fill); border-radius: 10px; transition: width 0.3s; }
.progress-indeterminate .progress-fill { width: 30%; animation: progressMove 1.5s infinite ease-in-out; }
@keyframes progressMove { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ==================== TOAST ==================== */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: 12px; color: white; font-weight: 500; opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s; max-width: 300px; word-wrap: break-word; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--toast-bg-success); }
.toast.error { background: var(--toast-bg-error); }
.toast.info { background: var(--toast-bg-info); }

/* ==================== SECTIONS ==================== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 700; margin-bottom: 50px; color: var(--text); }

/* ==================== FEATURES GRID (WHY CHOOSE US) ==================== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.feature-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 35px 25px; text-align: center; transition: all 0.3s; box-shadow: var(--card-shadow); cursor: default; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--card-hover-shadow); border-color: var(--primary); }
.feature-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; background: #e0e7ff; }
.feature-icon svg { width: 32px; height: 32px; stroke: var(--primary); }
.feature-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ==================== STEPS ==================== */
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.step { flex: 1 1 180px; max-width: 200px; text-align: center; }
.step-number { width: 48px; height: 48px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; margin: 0 auto 18px; box-shadow: 0 4px 12px rgba(79,70,229,0.3); }
.step h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.step p { color: var(--text-secondary); font-size: 0.9rem; }

/* ==================== PLATFORMS (SUPPORT) ==================== */
.platforms-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.platform-link { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border: 1px solid var(--border); border-radius: 40px; color: var(--text); text-decoration: none; font-weight: 600; transition: all 0.2s; background: var(--card-bg); }
.platform-link:hover { transform: translateY(-2px); background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 12px rgba(79,70,229,0.2); }
.platform-link svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

/* ==================== DOWNLOAD CARDS ==================== */
.format-grid { display: flex; flex-direction: column; gap: 12px; max-width: 700px; margin: 20px auto 0; }
.format-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; display: flex; align-items: center; gap: 16px; transition: all 0.2s; box-shadow: var(--card-shadow); }
.format-card:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(0,0,0,0.08); transform: translateY(-1px); }
.format-type-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.format-type-icon.video { background: #fee2e2; color: #b91c1c; }
.format-type-icon.audio { background: #e0e7ff; color: var(--primary); }
.format-quality { font-weight: 700; font-size: 1rem; color: var(--text); display: flex; align-items: center; gap: 6px; }
.quality-badge { background: var(--quality-badge-bg); color: var(--quality-badge-color); padding: 2px 6px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; }
.format-size { font-size: 0.9rem; color: var(--text-secondary); }
.format-card button { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: background 0.3s; white-space: nowrap; }
.format-card button:hover { background: var(--primary-hover); }
.format-actions { display: flex; gap: 6px; }
.no-audio-badge { background: #fee2e2; color: #b91c1c; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; margin-left: 6px; }

/* ==================== FAQ ACCORDION ==================== */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item h3 { font-weight: 600; display: flex; justify-content: space-between; cursor: pointer; color: var(--text); transition: color 0.2s; }
.faq-item h3:hover { color: var(--primary); }
.faq-item p { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, margin 0.3s ease; margin-top: 0; color: var(--text-secondary); }
.faq-item.open p { max-height: 200px; margin-top: 10px; }

/* ==================== SOCIAL PROOF ==================== */
.testimonial-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.testimonial-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-width: 320px; text-align: center; transition: all 0.3s; }
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.testimonial-avatar { width: 60px; height: 60px; background: var(--primary); border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.4rem; }
.testimonial-text { font-style: italic; color: var(--text-secondary); margin-bottom: 10px; }
.testimonial-author { font-weight: 600; color: var(--text); }

/* ==================== FOOTER ==================== */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 50px 20px 30px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-bottom: 25px; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: white; }

/* ==================== PROGRESS & LOADING ==================== */
.spinner { border: 4px solid var(--border); border-top: 4px solid var(--primary); border-radius: 50%; width: 28px; height: 28px; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 640px) {
    .topbar { padding: 10px 15px; }
    .topbar-nav { order: 2; margin-top: 10px; }
    .hero { padding: 50px 15px 30px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .input-section { flex-direction: column; border-radius: 16px; }
    .input-section button { width: 100%; border-radius: 0 0 16px 16px; }
    .features-grid { grid-template-columns: 1fr; }
    .steps { gap: 25px; }
    .platform-link { padding: 10px 18px; }
    .format-card { flex-direction: column; align-items: flex-start; }
    .format-card button { width: 100%; }
}

/* FAQ hover effect */
.faq-item h3:hover {
    color: var(--primary);
    transform: translateX(4px);
    transition: all 0.2s;
}

/* ==================== FAQ Hover Effect (Card Style) ==================== */
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: var(--card-bg);
}
.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.faq-item.open {
    border-color: var(--primary);
}
.faq-item h3 {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    color: var(--text);
    margin: 0;
}
.faq-item p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin 0.3s ease;
    margin-top: 0;
    color: var(--text-secondary);
}
.faq-item.open p {
    max-height: 200px;
    margin-top: 10px;
}

/* ==================== IMPROVED DOWNLOAD CARDS ==================== */
.format-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    margin: 20px auto 0;
}

.format-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
    flex-wrap: wrap;
}

.format-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* រូបតំណាងប្រភេទឯកសារ */
.format-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.format-type-icon.video {
    background: #fee2e2;
    color: #b91c1c;
}

.format-type-icon.audio {
    background: #e0e7ff;
    color: var(--primary);
}

/* ព័ត៌មានកណ្ដាល */
.format-info {
    flex: 1 1 180px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.format-quality {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ស្លាកគុណភាព (4K, 2K, HD) */
.quality-badge {
    display: inline-block;
    background: #f59e0b;
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ស្លាក "គ្មានសំឡេង" */
.no-audio-badge {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
}

/* ទំហំឯកសារ */
.format-size {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ប្លុកប៊ូតុង */
.format-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.format-actions button {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    border: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ប៊ូតុងទាញយកធម្មតា */
.format-actions button:first-child {
    background: var(--primary);
    color: white;
}

.format-actions button:first-child:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(79,70,229,0.3);
}

/* ប៊ូតុង "Download with Audio" */
.format-actions button:last-child {
    background: #059669;
    color: white;
}

.format-actions button:last-child:hover {
    background: #047857;
    box-shadow: 0 4px 10px rgba(5,150,105,0.3);
}

/* ការឆ្លើយតបលើឧបករណ៍តូច */
@media (max-width: 600px) {
    .format-card {
        flex-direction: column;
        align-items: stretch;
    }

    .format-info {
        margin-bottom: 8px;
    }

    .format-actions {
        margin-left: 0;
        justify-content: flex-end;
    }

    .format-actions button {
        flex: 1;
    }
}

/* ========== Responsive Embedded Video ========== */
.video-preview {
    display: flex;
    flex-wrap: wrap; /* អនុញ្ញាតឱ្យធាតុរុំលើអេក្រង់តូច */
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 30px;
    max-width: 100%;
}

/* ធាតុវីដេអូ ឬរូបភាពតូច */
.video-preview video,
.video-preview img {
    display: block;
    max-width: 100%;    /* មិនដែលធំជាងកុងតឺន័រមេ */
    height: auto;       /* រក្សាសមាមាត្ររូបភាព */
    border-radius: 12px;
    background: #000;   /* ផ្ទៃខាងក្រោយសម្រាប់វីដេអូ */
}

/* កំណត់ទំហំមូលដ្ឋានសម្រាប់កុំព្យូទ័រលើតុ */
.video-preview video,
.video-preview img {
    width: 100%;
    max-width: 560px;   /* ទទឹងអតិបរមាសមរម្យ */
}

/* ប្លុកព័ត៌មាន (ចំណងជើង, រយៈពេល) */
.video-preview .info {
    flex: 1 1 250px;    /* យ៉ាងហោចណាស់ទទឹង 250px, អាចពង្រីកបាន */
    text-align: left;
}

/* នៅលើឧបករណ៍ចល័ត */
@media (max-width: 640px) {
    .video-preview {
        flex-direction: column;
        align-items: center;
    }
    .video-preview video,
    .video-preview img {
        max-width: 100%;   /* ពេញទទឹងនៅលើទូរស័ព្ទ */
    }
    .video-preview .info {
        text-align: center;
    }
}

/* ========== RESPONSIVE VIDEO EMBED ========== */
.video-responsive {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;    /* ឱ្យជ្រុងមូលស្អាត */
    margin: 20px 0;
}
.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========== Mobile Fix for Download Cards ========== */
@media (max-width: 640px) {
    .format-card {
        flex-direction: row;      /* ប្ដូរពីជួរដេក ទៅជួរឈរ */
        align-items: flex-start;
        gap: 10px;
    }
    .format-type-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .format-card button {
        width: 100%;
        text-align: center;
    }
    .format-actions {
        width: 100%;
    }
    .format-actions button {
        width: 100%;
    }
}

/* ========== Resolution Badge (HD, 2K, 4K, 8K) ========== */
.format-card {
    position: relative;  /* ដើម្បីឲ្យ badge អាចដាក់ដាច់ខាត */
}
.resolution-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
}

/* ========== DARK MODE (activated by body.dark-mode) ========== */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}
body.dark-mode .topbar {
    background: rgba(15,23,42,0.9);
    border-bottom-color: #1e293b;
}
body.dark-mode .topbar-title,
body.dark-mode .nav-link {
    color: #e2e8f0;
}
body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    background: #4f46e5;
    color: white;
}
body.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom-color: #334155;
}
body.dark-mode .hero h1,
body.dark-mode .section-title {
    color: #f1f5f9;
}
body.dark-mode .hero p,
body.dark-mode .step p,
body.dark-mode .feature-card p,
body.dark-mode .faq-item p,
body.dark-mode .format-size {
    color: #cbd5e1;
}
body.dark-mode .container,
body.dark-mode .feature-card,
body.dark-mode .platform-link,
body.dark-mode .format-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
body.dark-mode .feature-card:hover {
    border-color: #4f46e5;
}
body.dark-mode .feature-card h3,
body.dark-mode .step h4,
body.dark-mode .faq-item h3 {
    color: #f1f5f9;
}
body.dark-mode .platform-link {
    color: #cbd5e1;
}
body.dark-mode .platform-link:hover {
    background: #4f46e5;
    color: white;
}
body.dark-mode .input-section {
    background: #1e293b;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
body.dark-mode .input-section input {
    background: #1e293b;
    color: #e2e8f0;
}
body.dark-mode .format-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
body.dark-mode .format-type-icon.video {
    background: #7f1d1d;
    color: #fca5a5;
}
body.dark-mode .format-type-icon.audio {
    background: #1e3a5f;
    color: #93c5fd;
}
body.dark-mode .faq-item {
    border-bottom-color: #334155;
}
body.dark-mode .faq-item h3 span {
    color: #64748b;
}
body.dark-mode .site-footer {
    background: #020617;
    color: #94a3b8;
}
body.dark-mode .site-footer a {
    color: #cbd5e1;
}
body.dark-mode #downloadStatus {
    background: #064e3b;
    border-color: #065f46;
    color: #a7f3d0;
}
body.dark-mode .no-audio-badge {
    background: #7f1d1d;
    color: #fca5a5;
}
body.dark-mode .resolution-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ========== DARK MODE ========== */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}
body.dark-mode .topbar {
    background: rgba(15,23,42,0.95);
    border-bottom: 1px solid #334155;
}
body.dark-mode .topbar-title { color: #e2e8f0; }
body.dark-mode .nav-link { color: #94a3b8; }
body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active { background: #4f46e5; color: white; }
body.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
body.dark-mode .hero h1 { color: #f1f5f9; }
body.dark-mode .hero p { color: #94a3b8; }
body.dark-mode .section-title { color: #f1f5f9; }
body.dark-mode .feature-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.dark-mode .feature-card h3 { color: #f1f5f9; }
body.dark-mode .feature-card p { color: #94a3b8; }
body.dark-mode .step-number { box-shadow: 0 4px 12px rgba(79,70,229,0.5); }
body.dark-mode .step h4 { color: #f1f5f9; }
body.dark-mode .step p { color: #94a3b8; }
body.dark-mode .platform-link {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .platform-link:hover { background: #4f46e5; color: white; }
body.dark-mode .faq-item { border-color: #334155; }
body.dark-mode .faq-item h3 { color: #f1f5f9; }
body.dark-mode .faq-item p { color: #94a3b8; }
body.dark-mode .site-footer { background: #020617; }
body.dark-mode .footer-links a { color: #94a3b8; }
body.dark-mode .format-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .format-card:hover { border-color: #6366f1; }
body.dark-mode .format-quality { color: #f1f5f9; }
body.dark-mode .format-size { color: #94a3b8; }
body.dark-mode .no-audio-badge { background: #7f1d1d; color: #fecaca; }
body.dark-mode .input-section { background: #1e293b; }
body.dark-mode .input-section input {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}
body.dark-mode .input-section input::placeholder { color: #64748b; }
body.dark-mode #downloadStatus {
    background: #064e3b;
    border-color: #047857;
    color: #a7f3d0;
}
body.dark-mode .spinner { border-color: #334155; border-top-color: #4f46e5; }

/* Dark Mode Toggle Button */
#darkModeToggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
    color: inherit;
}
#darkModeToggle:hover {
    background: rgba(79,70,229,0.1);
}

/* ========== DARK MODE ========== */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}
body.dark-mode .topbar {
    background: rgba(15,23,42,0.95);
    border-bottom: 1px solid #334155;
}
body.dark-mode .topbar-title { color: #e2e8f0; }
body.dark-mode .nav-link { color: #94a3b8; }
body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active { background: #4f46e5; color: white; }
body.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
body.dark-mode .hero h1 { color: #f1f5f9; }
body.dark-mode .hero p { color: #94a3b8; }
body.dark-mode .section-title { color: #f1f5f9; }
body.dark-mode .feature-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.dark-mode .feature-card h3 { color: #f1f5f9; }
body.dark-mode .feature-card p { color: #94a3b8; }
body.dark-mode .step-number { box-shadow: 0 4px 12px rgba(79,70,229,0.5); }
body.dark-mode .step h4 { color: #f1f5f9; }
body.dark-mode .step p { color: #94a3b8; }
body.dark-mode .platform-link {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .platform-link:hover { background: #4f46e5; color: white; }
body.dark-mode .faq-item { border-color: #334155; }
body.dark-mode .faq-item h3 { color: #f1f5f9; }
body.dark-mode .faq-item p { color: #94a3b8; }
body.dark-mode .site-footer { background: #020617; }
body.dark-mode .footer-links a { color: #94a3b8; }
body.dark-mode .format-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .format-card:hover { border-color: #6366f1; }
body.dark-mode .format-quality { color: #f1f5f9; }
body.dark-mode .format-size { color: #94a3b8; }
body.dark-mode .no-audio-badge { background: #7f1d1d; color: #fecaca; }
body.dark-mode .input-section { background: #1e293b; }
body.dark-mode .input-section input {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}
body.dark-mode .input-section input::placeholder { color: #64748b; }
body.dark-mode #downloadStatus {
    background: #064e3b;
    border-color: #047857;
    color: #a7f3d0;
}
body.dark-mode .spinner { border-color: #334155; border-top-color: #4f46e5; }

/* Dark Mode Toggle Button */
#darkModeToggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
    color: inherit;
}
#darkModeToggle:hover {
    background: rgba(79,70,229,0.1);
}
