/* ==========================================================================
   MÜZİK VE MEDYA YÖNETİCİSİ - VERCEL WEB EDITION (LIGHT / DARK THEME)
   ========================================================================== */

:root {
    /* LIGHT THEME (Default) */
    --bg-base: #f0f4f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-card: #ffffff;
    --border-subtle: #e2e8f0;
    --border-focus: #3b82f6;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-secondary: #475569;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    
    --success: #16a34a;
    --success-light: rgba(22, 163, 74, 0.1);
    --warning: #ea580c;
    --warning-light: rgba(234, 88, 12, 0.1);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.1);
    
    --spotify: #1db954;
    --spotify-light: rgba(29, 185, 84, 0.12);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08);
    --shadow-player: 0 -4px 20px rgba(15, 23, 42, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-surface-hover: #1f293d;
    --bg-card: #111827;
    --border-subtle: #1e293b;
    --border-focus: #60a5fa;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-secondary: #cbd5e1;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.15);
    --warning: #f97316;
    --warning-light: rgba(249, 115, 22, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.55);
    --shadow-player: 0 -4px 25px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
    min-height: 100vh;
    padding-bottom: 120px;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-badge {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.brand-titles h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-cloud {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   BUTTONS & INPUTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   TABS NAVIGATION
   ========================================================================== */
.tabs-nav {
    display: flex;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

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

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.25);
}

.tab-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   CARDS & PANELS
   ========================================================================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease forwards;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Platforms Banner */
.platforms-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

/* Downloader Box */
.url-input-container {
    display: flex;
    align-items: center;
    background: var(--bg-base);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    transition: var(--transition);
}

.url-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.url-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 10px 12px;
    font-family: inherit;
}

.downloader-settings-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-item label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.select-input {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.select-input:focus {
    border-color: var(--primary);
}

.downloader-action-col {
    margin-left: auto;
}

/* Status Card */
.download-status-card {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 18px;
}

.status-indicator-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.empty-spinner {
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.status-text-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Recent Downloads List */
.recent-download-row {
    display: grid;
    grid-template-columns: 44px 1fr auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition);
}

.recent-download-row:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-mini-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mini-play:hover {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.05);
}

.file-name-meta {
    overflow: hidden;
}

.file-name-text {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-chip {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

/* ==========================================================================
   CLIENT DUPLICATE FINDER (DRAG & DROP / FOLDER PICKER)
   ========================================================================== */
.dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    background: var(--bg-surface-hover);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.dropzone h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.dropzone p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==========================================================================
   AUDIO PLAYER DOCK
   ========================================================================== */
.audio-player-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-player);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.audio-player-dock.hidden {
    display: none;
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    max-width: 320px;
}

.player-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    overflow: hidden;
}

.player-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-titles {
    overflow: hidden;
}

.player-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.player-controls {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-circle.btn-play-pause {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    width: 42px;
    height: 42px;
}

.btn-circle:hover {
    transform: scale(1.06);
}

.player-progress-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.progress-track {
    flex: 1;
    height: 5px;
    background: var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: var(--radius-full);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 600;
    animation: slideIn 0.25s ease forwards;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   SEO CONTENT & MARKETING SECTIONS
   ========================================================================== */
.seo-section {
    margin-top: 36px;
}

.seo-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.seo-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 28px;
}

/* How to grid */
.howto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

.howto-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.howto-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.step-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 14px;
}

.howto-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.howto-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: inline-block;
}

.feature-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ Accordion */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 40px;
}

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

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    background: transparent;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: inherit;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-arrow {
    transition: transform 0.2s ease;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid transparent;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Footer */
.app-footer {
    margin-top: 50px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   ========================================================================== */

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 1. TABLETS & COMPACT LAPTOPS (<= 1024px) */
@media (max-width: 1024px) {
    .app-container {
        padding: 20px 16px;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .howto-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .recent-download-row {
        grid-template-columns: 40px 1fr auto auto auto;
        gap: 10px;
    }
    .audio-player-dock {
        padding: 10px 18px;
    }
    .player-track-info {
        max-width: 250px;
    }
}

/* 2. TABLETS & MOBILE PHONES (<= 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 110px;
    }

    .app-container {
        padding: 14px 10px;
    }

    /* Header */
    .app-header {
        padding: 14px 16px;
        margin-bottom: 14px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .header-brand {
        min-width: 0;
        flex: 1;
    }
    .header-brand a {
        min-width: 0;
    }
    .logo-badge {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    .brand-titles {
        min-width: 0;
    }
    .brand-titles h1 {
        font-size: 1.15rem;
        flex-wrap: wrap;
    }
    .badge-cloud {
        font-size: 0.68rem;
        padding: 2px 6px;
    }
    .brand-desc {
        font-size: 0.76rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Tabs */
    .tabs-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 4px;
        margin-bottom: 14px;
        overflow-x: hidden;
    }
    .tab-btn {
        min-width: 0;
        padding: 10px 6px;
        flex-direction: column;
        gap: 4px;
        font-size: 0.82rem;
        text-align: center;
        white-space: normal;
        border-radius: var(--radius-sm);
    }
    .tab-btn svg {
        width: 18px;
        height: 18px;
    }
    .tab-badge {
        font-size: 0.66rem;
        padding: 2px 6px;
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Cards */
    .card {
        padding: 16px 14px;
        margin-bottom: 14px;
        border-radius: var(--radius-md);
    }
    .panel-header {
        margin-bottom: 12px;
    }
    .panel-header h2 {
        font-size: 1.15rem;
    }
    .panel-subtitle {
        font-size: 0.82rem;
    }

    /* Platforms Chips */
    .platforms-banner {
        gap: 6px;
        margin-bottom: 14px;
        justify-content: flex-start;
    }
    .platform-chip {
        font-size: 0.74rem;
        padding: 4px 9px;
    }

    /* Downloader input */
    .url-input-container {
        padding: 4px 8px;
        position: relative;
    }
    .url-input-container input {
        padding: 8px 6px;
        font-size: 16px; /* Prevents automatic zoom on mobile iOS */
    }
    .url-input-container #btnPasteUrl {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Downloader settings & action button */
    .downloader-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 12px;
    }
    .setting-item {
        width: 100%;
    }
    .select-input {
        width: 100%;
        height: 46px;
        font-size: 0.9rem;
    }
    .downloader-action-col {
        width: 100%;
        margin-left: 0;
    }
    #btnStartDownload {
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        font-size: 0.92rem;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.35;
    }

    /* Recent downloads */
    .recent-download-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }
    .recent-download-row .btn-mini-play {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }
    .recent-download-row .file-name-meta {
        flex: 1 1 calc(100% - 50px);
        min-width: 0;
    }
    .recent-download-row .file-name-text {
        font-size: 0.86rem;
    }
    .recent-download-row .meta-chip {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
    .recent-download-row a.btn {
        margin-left: auto;
        padding: 6px 12px;
        font-size: 0.76rem;
    }

    /* Audio Player Dock */
    .audio-player-dock {
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-top: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-player);
        z-index: 1000;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .player-track-info {
        min-width: 0;
        flex: 1;
        max-width: calc(100% - 90px);
        gap: 10px;
    }
    .player-thumb {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
    .player-title {
        font-size: 0.84rem;
    }
    .player-artist {
        font-size: 0.72rem;
    }
    .player-controls {
        flex: initial;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    .player-progress-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        gap: 0;
    }
    .player-progress-bar .time-text {
        display: none;
    }
    .progress-track {
        height: 3px;
        border-radius: 0;
        width: 100%;
        margin: 0;
    }
    .btn-circle.btn-play-pause {
        width: 38px;
        height: 38px;
    }

    /* Grids */
    .howto-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }
    .howto-card {
        padding: 16px;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 28px;
    }
    .feature-item {
        padding: 16px;
    }

    /* SEO & FAQ */
    .seo-section {
        margin-top: 28px;
    }
    .seo-title {
        font-size: 1.25rem;
    }
    .seo-subtitle {
        font-size: 0.85rem;
        margin-bottom: 18px;
    }
    .faq-question {
        padding: 14px 16px;
        font-size: 0.88rem;
    }
    .faq-answer {
        padding: 0 16px 14px;
        font-size: 0.82rem;
    }

    /* Dropzone */
    .dropzone {
        padding: 28px 16px;
        margin-bottom: 16px;
    }
    .dropzone-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }
    .dropzone h3 {
        font-size: 1rem;
    }
    .dropzone p {
        font-size: 0.78rem;
    }
    #btnPickFolder {
        width: 100%;
        justify-content: center;
    }

    /* Toast */
    .toast-container {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }
    .toast {
        font-size: 0.82rem;
        padding: 10px 14px;
    }
}

/* 3. SMALL MOBILE SCREENS (<= 480px) */
@media (max-width: 480px) {
    .app-header {
        padding: 10px 12px;
    }
    .header-brand a {
        gap: 10px;
    }
    .logo-badge {
        width: 36px;
        height: 36px;
    }
    .brand-titles h1 {
        font-size: 1.05rem;
    }
    .brand-desc {
        display: none; /* Keep header super clean on narrow screens */
    }
    #themeText {
        display: none; /* Icon-only on narrow phones */
    }
    .header-actions .btn {
        padding: 8px 10px;
        min-width: 36px;
        justify-content: center;
    }

    .url-input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px;
    }
    .url-input-container input {
        width: 100%;
        padding: 6px 4px;
    }
    .url-input-container #btnPasteUrl {
        width: 100%;
        justify-content: center;
        padding: 8px;
    }

    .footer-links {
        gap: 12px;
        font-size: 0.8rem;
    }
}

