/* ══════════════════════════════════════════
   SUKOON · سكون — SOUNDSCAPE MIXER
   Bilingual theme, flat variable system
   Pair: Outfit (Latin) + Amiri (Arabic display)
   ══════════════════════════════════════════ */

:root {
    --accent:      #4B7BFF;
    --accent-soft: #6E95FF;
    --accent-2:    #9D46FF;
    --danger:      #E74C3C;

    /* ── Dark (default) ── */
    --bg:          #09090f;
    --bg-soft:     #0c0c14;
    --card-bg:     #111118;
    --c-text:      rgba(255,255,255,0.9);
    --c-text-soft: rgba(255,255,255,0.62);
    --c-sub:       rgba(130,132,150,1);
    --c-border:    rgba(255,255,255,0.06);
    --c-border-h:  rgba(255,255,255,0.14);
    --c-img-fade:  rgba(9,9,15,0.82);
    --c-vol-track: rgba(255,255,255,0.08);
    --c-vol-thumb: rgba(255,255,255,0.4);
    --c-vol-fill:  rgba(255,255,255,0.08);
    --c-name:      rgba(255,255,255,0.5);
    --c-name-on:   rgba(255,255,255,0.95);
    --c-pill-bg:   rgba(255,255,255,0.05);
    --c-pill-bd:   rgba(255,255,255,0.08);
    --c-pill-txt:  rgba(255,255,255,0.32);
    --c-pill-hbg:  rgba(255,255,255,0.12);
    --c-pill-hbd:  rgba(255,255,255,0.2);
    --c-pill-htxt: rgba(255,255,255,0.9);
    --c-vol-icon:  rgba(255,255,255,0.22);
    --c-hdr-top:   rgba(9,9,15,1);
    --c-hdr-bot:   rgba(9,9,15,0);
    --c-ftr-bg:    rgba(9,9,15,0.97);
    --c-ftr-bd:    rgba(255,255,255,0.06);
    --c-tog-bg:    rgba(255,255,255,0.06);
    --c-tog-bd:    rgba(255,255,255,0.12);
    --c-rst-bd:    rgba(255,255,255,0.15);
    --c-rst-txt:   rgba(130,132,150,1);
    --c-rst-hbg:   rgba(255,255,255,0.06);
    --c-rst-htxt:  rgba(255,255,255,0.9);
    --c-rst-hbd:   rgba(255,255,255,0.25);
    --c-tmr-bg:    rgba(255,255,255,0.05);
    --c-tmr-bd:    rgba(255,255,255,0.10);
    --c-tmr-txt:   rgba(130,132,150,1);
    --c-tmr-hbg:   rgba(255,255,255,0.10);
    --c-tmr-htxt:  rgba(255,255,255,0.9);
    --c-tmr-hbd:   rgba(255,255,255,0.2);
    --c-inp-bg:    rgba(255,255,255,0.06);
    --c-inp-bd:    rgba(255,255,255,0.18);
    --c-inp-ph:    rgba(255,255,255,0.25);
    --c-toast-bg:  rgba(17,17,24,0.95);
    --c-nav-bd:    rgba(136,136,136,0.6);
    --c-nav-txt:   rgba(136,136,136,1);
    --c-nav-hbg:   rgba(255,255,255,0.08);
    --c-hero-ar:   rgba(255,255,255,0.92);
}

/* ── Light theme ── */
[data-theme="light"] {
    --bg:          #f4f0ec;
    --bg-soft:     #efeae4;
    --card-bg:     #ffffff;
    --c-text:      rgba(26,21,35,0.9);
    --c-text-soft: rgba(26,21,35,0.6);
    --c-sub:       rgba(130,118,145,1);
    --c-border:    rgba(0,0,0,0.09);
    --c-border-h:  rgba(0,0,0,0.15);
    --c-img-fade:  rgba(255,255,255,0.85);
    --c-vol-track: rgba(0,0,0,0.13);
    --c-vol-thumb: rgba(0,0,0,0.32);
    --c-vol-fill:  rgba(0,0,0,0.10);
    --c-name:      rgba(26,21,35,0.42);
    --c-name-on:   rgba(26,21,35,0.9);
    --c-pill-bg:   rgba(0,0,0,0.04);
    --c-pill-bd:   rgba(0,0,0,0.09);
    --c-pill-txt:  rgba(26,21,35,0.35);
    --c-pill-hbg:  rgba(0,0,0,0.08);
    --c-pill-hbd:  rgba(0,0,0,0.18);
    --c-pill-htxt: rgba(26,21,35,0.9);
    --c-vol-icon:  rgba(0,0,0,0.2);
    --c-hdr-top:   rgba(244,240,236,1);
    --c-hdr-bot:   rgba(244,240,236,0);
    --c-ftr-bg:    rgba(244,240,236,0.97);
    --c-ftr-bd:    rgba(0,0,0,0.09);
    --c-tog-bg:    rgba(0,0,0,0.05);
    --c-tog-bd:    rgba(0,0,0,0.14);
    --c-rst-bd:    rgba(0,0,0,0.14);
    --c-rst-txt:   rgba(130,118,145,1);
    --c-rst-hbg:   rgba(0,0,0,0.05);
    --c-rst-htxt:  rgba(26,21,35,0.9);
    --c-rst-hbd:   rgba(0,0,0,0.22);
    --c-tmr-bg:    rgba(0,0,0,0.04);
    --c-tmr-bd:    rgba(0,0,0,0.10);
    --c-tmr-txt:   rgba(130,118,145,1);
    --c-tmr-hbg:   rgba(0,0,0,0.08);
    --c-tmr-htxt:  rgba(26,21,35,0.9);
    --c-tmr-hbd:   rgba(0,0,0,0.18);
    --c-inp-bg:    rgba(0,0,0,0.04);
    --c-inp-bd:    rgba(0,0,0,0.16);
    --c-inp-ph:    rgba(26,21,35,0.28);
    --c-toast-bg:  rgba(255,255,255,0.95);
    --c-nav-bd:    rgba(0,0,0,0.22);
    --c-nav-txt:   rgba(130,118,145,1);
    --c-nav-hbg:   rgba(0,0,0,0.05);
    --c-hero-ar:   rgba(26,21,35,0.9);
}

/* Direct body background — avoids var() transition rendering bug */
body                      { background: #09090f; }
[data-theme="light"] body { background: #f4f0ec; }

body {
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    color: var(--c-text);
    transition: background 0.4s ease, color 0.35s ease;
}

.app-container {
    height: auto;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════
   Ambient orbs
   ══════════════════════════════════════════ */
.orb {
    position: fixed; border-radius: 50%;
    pointer-events: none; z-index: 0;
    filter: blur(90px); opacity: 0.6;
}
.orb-1 {
    width: 620px; height: 620px; top: -220px; left: -160px;
    background: radial-gradient(circle, rgba(75,123,255,0.11) 0%, transparent 70%);
}
.orb-2 {
    width: 520px; height: 520px; bottom: -160px; right: -110px;
    background: radial-gradient(circle, rgba(157,70,255,0.09) 0%, transparent 70%);
}
[data-theme="light"] .orb-1 { background: radial-gradient(circle, rgba(75,123,255,0.2) 0%, transparent 70%); }
[data-theme="light"] .orb-2 { background: radial-gradient(circle, rgba(157,70,255,0.16) 0%, transparent 70%); }

/* ══════════════════════════════════════════
   Header · bilingual brand
   ══════════════════════════════════════════ */
.header {
    padding: 1.8rem 2rem 1rem;
    background: linear-gradient(to bottom, var(--c-hdr-top) 55%, var(--c-hdr-bot));
    position: relative; z-index: 10;
    transition: background 0.4s ease;
    flex-wrap: wrap;
    row-gap: 1rem;
}
.header-brand {
    display: flex; align-items: center; gap: 1rem;
}
.brand-icon {
    width: 52px; height: 52px; border-radius: 15px;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 6px 22px rgba(0,0,0,0.32);
    border: 1.5px solid rgba(255,255,255,0.08);
}
[data-theme="light"] .brand-icon {
    box-shadow: 0 4px 18px rgba(0,0,0,0.14);
    border-color: rgba(0,0,0,0.06);
}

/* Bilingual wordmark: Latin + Arabic side-by-side */
.brand-names {
    display: flex; align-items: baseline; gap: 0.9rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.title {
    font-size: 1.85rem; font-weight: 700;
    letter-spacing: 5px; color: var(--c-text);
    line-height: 1;
    transition: color 0.35s ease;
}
.title-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-weight: 700;
    font-size: 2.35rem;
    line-height: 1;
    letter-spacing: 0;
    color: var(--c-hero-ar);
    direction: rtl;
    unicode-bidi: isolate;
    position: relative;
    padding-left: 0.9rem;
    transition: color 0.35s ease, text-shadow 0.5s ease;
    text-shadow: 0 0 32px rgba(75,123,255,0.0);
}
.title-ar::before {
    content: '';
    position: absolute;
    left: 0; top: 12%; bottom: 12%;
    width: 1px;
    background: var(--c-border-h);
}
.brand-names:hover .title-ar {
    text-shadow: 0 0 24px rgba(75,123,255,0.35);
}

.subtitle {
    font-size: 0.85rem; color: var(--c-sub);
    margin-top: 8px;
    letter-spacing: 0.5px;
    transition: color 0.35s ease;
}
.subtitle .subtitle-latin {
    font-style: normal;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: 0.8px;
}
.subtitle .subtitle-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 1.05rem; font-weight: 700;
    color: var(--accent);
    margin: 0 0.05rem;
    vertical-align: -1px;
}
.subtitle .dot-sep {
    opacity: 0.5; margin: 0 0.5rem;
}

/* Active badge */
.active-badge {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: rgba(75,123,255,0.1); border: 1px solid rgba(75,123,255,0.25);
    color: var(--accent); font-size: 0.75rem; font-weight: 700;
    padding: 0.22rem 0.7rem; border-radius: 20px; margin-top: 0.7rem;
    letter-spacing: 0.5px; opacity: 0; transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.active-badge.show { opacity: 1; transform: translateY(0); }
.badge-dot {
    width: 6px; height: 6px; background: var(--accent);
    border-radius: 50%; animation: badge-pulse 1.6s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.6); }
}

/* Theme toggle */
.theme-toggle {
    background: var(--c-tog-bg); border: 1px solid var(--c-tog-bd);
    color: var(--c-sub); font-family: 'Outfit', sans-serif;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1px;
    padding: 0.48rem 1rem; border-radius: 30px; cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.theme-toggle:hover {
    background: var(--c-tog-bg); filter: brightness(1.3);
    color: var(--c-text); border-color: var(--c-border-h);
}

/* Nav buttons — light mode fixes */
[data-theme="light"] .nav-btn {
    color: var(--c-nav-txt);
    border-color: var(--c-nav-bd);
}
[data-theme="light"] .nav-btn:hover {
    color: var(--c-text); border-color: var(--c-border-h);
    background-color: var(--c-nav-hbg); box-shadow: none;
}

/* ══════════════════════════════════════════
   Controls bar (in header)
   ══════════════════════════════════════════ */
.controls-bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    flex-basis: 100%;
    margin-top: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--c-border);
}
[data-theme="light"] .controls-bar {
    background: rgba(0,0,0,0.025);
}
.ctrl-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700; letter-spacing: 1.3px;
    font-size: 0.72rem; padding: 0.45rem 1rem;
    border-radius: 30px; cursor: pointer;
    transition: all 0.28s ease; white-space: nowrap;
}
.ctrl-divider {
    width: 1px; height: 1.4rem;
    background: var(--c-border); flex-shrink: 0;
}

.stop-btn {
    background: transparent; border: 1px solid rgba(231,76,60,0.45);
    color: var(--danger);
}
.stop-btn:hover {
    background: var(--danger); color: white; border-color: var(--danger);
    box-shadow: 0 0 20px rgba(231,76,60,0.3); transform: translateY(-1px);
}
.save-btn {
    background: transparent; border: 1px solid rgba(75,123,255,0.35);
    color: var(--accent);
}
.save-btn:hover {
    background: rgba(75,123,255,0.1); border-color: rgba(75,123,255,0.6);
    transform: translateY(-1px);
}
.restore-btn {
    background: transparent; border: 1px solid var(--c-rst-bd);
    color: var(--c-rst-txt);
}
.restore-btn:hover {
    background: var(--c-rst-hbg); color: var(--c-rst-htxt);
    border-color: var(--c-rst-hbd); transform: translateY(-1px);
}

/* Timer */
.timer-section { display: flex; align-items: center; gap: 0.45rem; }
.timer-label {
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 1.5px; color: var(--c-sub);
}
.timer-presets { display: flex; align-items: center; gap: 0.3rem; }
.timer-preset {
    background: var(--c-tmr-bg); border: 1px solid var(--c-tmr-bd);
    color: var(--c-tmr-txt); font-family: 'Outfit', sans-serif;
    font-size: 0.7rem; font-weight: 700; padding: 0.28rem 0.55rem;
    border-radius: 20px; cursor: pointer;
    transition: all 0.25s ease; letter-spacing: 0.4px;
}
.timer-preset:hover {
    background: var(--c-tmr-hbg); color: var(--c-tmr-htxt);
    border-color: var(--c-tmr-hbd);
}
.timer-preset.active-preset {
    background: rgba(75,123,255,0.12);
    border-color: rgba(75,123,255,0.4); color: var(--accent);
}
.timer-display { display: flex; align-items: center; gap: 0.45rem; }
.timer-countdown {
    font-size: 0.88rem; font-weight: 700; color: var(--accent);
    letter-spacing: 1.5px; font-variant-numeric: tabular-nums;
    min-width: 3.2rem;
}
.timer-countdown.urgent {
    color: var(--danger); animation: urgent-pulse 1s ease-in-out infinite;
}
@keyframes urgent-pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.45; }
}
.timer-cancel-btn {
    background: transparent; border: none; color: var(--c-sub);
    font-size: 0.72rem; cursor: pointer; padding: 0.2rem 0.35rem;
    border-radius: 50%; transition: color 0.2s; line-height: 1;
}
.timer-cancel-btn:hover { color: var(--danger); }

.timer-custom { display: flex; align-items: center; gap: 0.35rem; }
.timer-custom-input {
    width: 3.6rem; background: var(--c-inp-bg);
    border: 1px solid var(--c-inp-bd); color: var(--c-text);
    font-family: 'Outfit', sans-serif; font-size: 0.72rem;
    font-weight: 700; padding: 0.28rem 0.5rem; border-radius: 12px;
    outline: none; text-align: center; -moz-appearance: textfield;
    transition: border-color 0.2s ease;
}
.timer-custom-input::-webkit-inner-spin-button,
.timer-custom-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.timer-custom-input::placeholder { color: var(--c-inp-ph); }
.timer-custom-input:focus { border-color: rgba(75,123,255,0.5); }
.timer-go-btn {
    background: rgba(75,123,255,0.14) !important;
    border-color: rgba(75,123,255,0.4) !important;
    color: var(--accent) !important;
}
.timer-go-btn:hover { background: rgba(75,123,255,0.25) !important; }

.master-volume-container label {
    font-size: 0.68rem; letter-spacing: 1.5px;
    font-weight: 700; color: var(--c-sub);
}
#master-volume { width: 120px; }

/* ══════════════════════════════════════════
   Tracks Grid
   ══════════════════════════════════════════ */
.tracks-grid {
    padding: 0.5rem 2rem 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 1.2rem; position: relative; z-index: 1;
}

.track-card {
    border-radius: 18px; overflow: hidden; padding: 0;
    border: 1.5px solid var(--c-border);
    background: var(--card-bg); cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.2,0,0.2,1),
                box-shadow 0.35s ease, border-color 0.35s ease,
                background 0.35s ease;
    animation: cardIn 0.55s cubic-bezier(0.2,0,0.2,1) both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.track-card:nth-child(1)  { animation-delay: 0.05s; }
.track-card:nth-child(2)  { animation-delay: 0.10s; }
.track-card:nth-child(3)  { animation-delay: 0.15s; }
.track-card:nth-child(4)  { animation-delay: 0.20s; }
.track-card:nth-child(5)  { animation-delay: 0.25s; }
.track-card:nth-child(6)  { animation-delay: 0.30s; }
.track-card:nth-child(7)  { animation-delay: 0.35s; }
.track-card:nth-child(8)  { animation-delay: 0.40s; }
.track-card:nth-child(9)  { animation-delay: 0.45s; }
.track-card:nth-child(10) { animation-delay: 0.50s; }

[data-theme="light"] .track-card {
    box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}

.track-card:hover {
    transform: translateY(-7px) scale(1.01);
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
    border-color: var(--c-border-h);
    background: var(--card-bg);
}
[data-theme="light"] .track-card:hover {
    box-shadow: 0 14px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
.track-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(75,123,255,0.15),
                0 24px 60px rgba(75,123,255,0.18),
                0 8px 20px rgba(0,0,0,0.2);
}
.track-card.active:hover {
    box-shadow: 0 0 0 1px rgba(75,123,255,0.25),
                0 28px 70px rgba(75,123,255,0.25);
}
[data-theme="light"] .track-card.active {
    box-shadow: 0 0 0 1.5px rgba(75,123,255,0.3),
                0 8px 28px rgba(75,123,255,0.15);
}

.card-image-wrap {
    position: relative; width: 100%;
    aspect-ratio: 1 / 1; overflow: hidden;
}
.track-image {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2,0,0.2,1), opacity 0.35s ease;
}
[data-theme="light"] .track-image { opacity: 0.88; }
.track-card:hover .track-image { transform: scale(1.09); }

.card-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 40%, var(--c-img-fade) 100%);
}
[data-theme="light"] .card-overlay {
    background: linear-gradient(180deg,
        transparent 0%, transparent 60%,
        rgba(255,255,255,0.45) 100%);
}

.card-active-tint {
    position: absolute; inset: 0;
    background: rgba(75,123,255,0.1); opacity: 0;
    transition: opacity 0.5s ease; pointer-events: none;
}
.track-card.active .card-active-tint { opacity: 1; }

.play-btn-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0; transition: opacity 0.3s ease;
}
.track-card:hover .play-btn-overlay { opacity: 1; }
.play-circle {
    width: 54px; height: 54px; border-radius: 50%;
    background: rgba(75,123,255,0.88); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(75,123,255,0.5);
    transition: transform 0.2s ease, background 0.2s;
    font-size: 1.3rem;
}
.play-circle:hover { transform: scale(1.12); background: rgba(75,123,255,1); }
.play-icon  { color: white; margin-left: 3px; }
.pause-icon { color: white; display: none; letter-spacing: -2px; }
.track-card.active .play-icon  { display: none; }
.track-card.active .pause-icon { display: inline; }

/* EQ bars */
.eq-bars {
    position: absolute; bottom: 10px; right: 10px;
    display: flex; gap: 3px; align-items: flex-end;
    height: 22px; opacity: 0; transition: opacity 0.4s ease;
}
.track-card.active .eq-bars { opacity: 1; }
.eq-bars span {
    width: 3px; border-radius: 3px; background: var(--accent);
    height: 3px; display: block; transform-origin: bottom;
}
.track-card.active .eq-bars span:nth-child(1) { animation: eqbar 0.80s ease-in-out infinite; }
.track-card.active .eq-bars span:nth-child(2) { animation: eqbar 0.60s ease-in-out infinite 0.12s; }
.track-card.active .eq-bars span:nth-child(3) { animation: eqbar 1.05s ease-in-out infinite 0.24s; }
.track-card.active .eq-bars span:nth-child(4) { animation: eqbar 0.72s ease-in-out infinite 0.06s; }
.track-card.active .eq-bars span:nth-child(5) { animation: eqbar 0.50s ease-in-out infinite 0.18s; }
@keyframes eqbar {
    0%, 100% { height: 3px; opacity: 0.6; }
    50%       { height: 20px; opacity: 1; }
}

/* Ripple */
.ripple-effect {
    position: absolute; border-radius: 50%;
    background: rgba(75,123,255,0.35); transform: scale(0);
    animation: ripple-anim 0.55s ease-out forwards; pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(5); opacity: 0; } }

/* Card body */
.card-body {
    padding: 0.8rem 0.9rem 0.9rem;
    display: flex; flex-direction: column; gap: 0.6rem;
    background: var(--card-bg);
    transition: background 0.35s ease;
}
.track-name {
    font-size: 0.82rem; font-weight: 700;
    color: var(--c-name); letter-spacing: 1.2px;
    text-transform: uppercase; margin: 0; cursor: default;
    transition: color 0.3s;
}
.track-card.active .track-name { color: var(--c-name-on); }

/* Variant pills */
.variant-pills { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.vpill {
    background: var(--c-pill-bg); border: 1px solid var(--c-pill-bd);
    color: var(--c-pill-txt); border-radius: 20px;
    padding: 0.15rem 0.55rem; font-size: 0.68rem;
    font-family: 'Outfit', sans-serif; font-weight: 600;
    cursor: pointer; transition: all 0.18s ease;
    line-height: 1.5; letter-spacing: 0.5px;
}
.vpill:hover {
    background: var(--c-pill-hbg); color: var(--c-pill-htxt);
    border-color: var(--c-pill-hbd); transform: translateY(-1px);
}
.vpill.active {
    background: rgba(75,123,255,0.18);
    border-color: rgba(75,123,255,0.55); color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(75,123,255,0.28);
}

/* Volume row */
.vol-row { display: flex; align-items: center; gap: 0.5rem; }
.vol-icon {
    font-size: 0.8rem; color: var(--c-vol-icon);
    min-width: 1rem; transition: color 0.3s, filter 0.2s; user-select: none;
    cursor: pointer;
}
.vol-icon:hover { filter: brightness(1.8); }
.track-card.active .vol-icon { color: rgba(75,123,255,0.55); }

.volume-slider {
    flex: 1; margin-top: 0; height: 4px;
    background: var(--c-vol-track); --fill: 50%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0.12) 0%,
        rgba(255,255,255,0.12) var(--fill),
        var(--c-vol-track) var(--fill)
    );
}
[data-theme="light"] .volume-slider {
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.12) 0%,
        rgba(0,0,0,0.12) var(--fill),
        var(--c-vol-track) var(--fill)
    );
}
.volume-slider::-webkit-slider-thumb {
    width: 13px; height: 13px;
    background: var(--c-vol-thumb);
    transition: background 0.2s, transform 0.2s;
}
.volume-slider:hover::-webkit-slider-thumb,
.volume-slider:focus::-webkit-slider-thumb { transform: scale(1.3); }
.track-card.active .volume-slider {
    background: linear-gradient(
        to right,
        rgba(75,123,255,0.75) 0%,
        rgba(75,123,255,0.75) var(--fill),
        var(--c-vol-fill) var(--fill)
    );
}
.track-card.active .volume-slider::-webkit-slider-thumb { background: var(--accent); }

/* Master volume */
#master-volume {
    --fill: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0.48) 0%,
        rgba(255,255,255,0.48) var(--fill),
        rgba(255,255,255,0.1) var(--fill)
    );
}
[data-theme="light"] #master-volume {
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.32) 0%,
        rgba(0,0,0,0.32) var(--fill),
        rgba(0,0,0,0.1) var(--fill)
    );
}

/* Loading ring */
.load-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 38px; height: 38px;
    border: 3px solid rgba(255,255,255,0.16);
    border-top-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 10;
}
.track-card.loading .load-ring {
    opacity: 1;
    animation: load-spin 0.72s linear infinite;
}
.track-card.loading .play-btn-overlay { opacity: 0 !important; }
@keyframes load-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Keyboard focus */
.track-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(75,123,255,0.18),
                0 24px 60px rgba(0,0,0,0.28);
}

/* ══════════════════════════════════════════
   iOS Coming Soon
   ══════════════════════════════════════════ */
.ios-section {
    padding: 0 2rem 1.5rem;
    position: relative; z-index: 1;
}
.ios-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto;
    border-radius: 22px;
    padding: 1.8rem 2.2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(75,123,255,0.12) 0%,
        rgba(157,70,255,0.1) 100%);
    border: 1px solid rgba(75,123,255,0.28);
}
[data-theme="light"] .ios-card {
    background: linear-gradient(135deg,
        rgba(75,123,255,0.08) 0%,
        rgba(157,70,255,0.07) 100%);
    border-color: rgba(75,123,255,0.22);
    box-shadow: 0 4px 24px rgba(75,123,255,0.09);
}
.ios-card::before {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    top: -130px; right: -90px;
    background: radial-gradient(circle, rgba(157,70,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.ios-left { flex: 1; min-width: 0; }
.ios-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(75,123,255,0.12);
    border: 1px solid rgba(75,123,255,0.3);
    padding: 0.18rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 0.65rem;
}
.ios-heading {
    display: flex; align-items: center; gap: 0.7rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--c-text);
    margin: 0 0 0.55rem;
    letter-spacing: 0.5px;
    transition: color 0.35s ease;
}
.ios-heading-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 1.7rem; font-weight: 700;
    color: var(--accent); line-height: 1;
    margin-right: 0.15rem;
}
.ios-heading-icon {
    width: 36px; height: 36px; border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
.ios-sub {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--c-sub);
    margin: 0;
    max-width: 400px;
    transition: color 0.35s ease;
}
.ios-right {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 0.75rem; flex-shrink: 0;
}
.ios-cta-label {
    font-size: 0.78rem;
    color: var(--c-sub);
    text-align: right;
    margin: 0;
    max-width: 200px;
    line-height: 1.5;
}
.ios-btn {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(75,123,255,0.35);
}
.ios-btn:hover {
    background: #3a6aee;
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(75,123,255,0.45);
}

/* ══════════════════════════════════════════
   About / Story section
   ══════════════════════════════════════════ */
.about-section {
    padding: 1rem 2rem 2rem;
    position: relative; z-index: 1;
}
.about-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--c-border);
    border-radius: 22px;
    padding: 2.2rem 2.4rem;
    transition: background 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .about-card {
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.about-heading {
    display: flex; align-items: center; gap: 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
    margin: 0 0 1.4rem;
    text-transform: uppercase;
}
.about-heading-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 1.3rem; font-weight: 700;
    letter-spacing: 0; text-transform: none;
    line-height: 1;
    opacity: 0.9;
}

/* Etymology callout */
.about-etym {
    background: linear-gradient(135deg,
        rgba(75,123,255,0.07) 0%,
        rgba(157,70,255,0.06) 100%);
    border: 1px solid rgba(75,123,255,0.18);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
[data-theme="light"] .about-etym {
    background: linear-gradient(135deg,
        rgba(75,123,255,0.06) 0%,
        rgba(157,70,255,0.04) 100%);
    border-color: rgba(75,123,255,0.18);
}
.about-etym-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 2.6rem; font-weight: 700;
    line-height: 1; color: var(--accent);
    flex-shrink: 0;
    text-shadow: 0 0 28px rgba(75,123,255,0.15);
}
.about-etym-text {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--c-text-soft);
    margin: 0;
}
.about-etym-text em {
    font-style: normal;
    color: var(--c-text);
    font-weight: 600;
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.about-body p {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--c-text);
    opacity: 0.84;
    margin: 0;
    transition: color 0.35s ease;
}
.about-sign {
    font-size: 0.88rem !important;
    opacity: 1 !important;
    color: var(--c-sub) !important;
    margin-top: 0.5rem !important;
}
.about-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.7rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--c-border);
}
.about-cta-label {
    font-size: 0.82rem;
    color: var(--c-sub);
    flex: 1;
    min-width: 160px;
}
.about-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(75,123,255,0.08);
    border: 1px solid rgba(75,123,255,0.3);
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.about-email-btn:hover {
    background: rgba(75,123,255,0.16);
    border-color: rgba(75,123,255,0.55);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(75,123,255,0.18);
}

/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
.footer {
    background: var(--c-ftr-bg);
    border-top: 1px solid var(--c-ftr-bd);
    padding: 0.65rem 2rem;
    display: flex; justify-content: center;
    position: relative; z-index: 10;
    transition: background 0.4s ease;
}
[data-theme="light"] .footer { box-shadow: 0 -4px 24px rgba(0,0,0,0.05); }
.footer-logo { height: 18px; opacity: 0.3; border-radius: 4px; }
.footer-copyright {
    display: flex; align-items: center; gap: 0.7rem;
    color: var(--c-sub); font-size: 0.72rem;
}

/* ══════════════════════════════════════════
   Toast
   ══════════════════════════════════════════ */
.toast {
    position: fixed; bottom: 5rem; left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--c-toast-bg);
    border: 1px solid rgba(75,123,255,0.28);
    color: var(--c-text); font-family: 'Outfit', sans-serif;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.4px;
    padding: 0.55rem 1.3rem; border-radius: 30px;
    backdrop-filter: blur(14px); opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000; pointer-events: none; white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════
   Waitlist Modal
   ══════════════════════════════════════════ */
.wl-backdrop {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.wl-backdrop.open { opacity: 1; pointer-events: auto; }
.wl-modal {
    background: var(--card-bg);
    border: 1px solid var(--c-border);
    border-radius: 24px;
    padding: 2.2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.2,0,0.2,1);
}
[data-theme="light"] .wl-modal { box-shadow: 0 16px 60px rgba(0,0,0,0.14); }
.wl-backdrop.open .wl-modal { transform: translateY(0) scale(1); }
.wl-close {
    position: absolute; top: 1.1rem; right: 1.2rem;
    background: none; border: none;
    color: var(--c-sub); font-size: 1rem; cursor: pointer;
    padding: 0.3rem; line-height: 1;
    border-radius: 50%; transition: color 0.2s;
}
.wl-close:hover { color: var(--c-text); }
.wl-tag {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 2px;
    color: var(--accent); background: rgba(75,123,255,0.12);
    border: 1px solid rgba(75,123,255,0.3);
    display: inline-block; padding: 0.18rem 0.65rem;
    border-radius: 20px; margin-bottom: 0.75rem;
}
.wl-title {
    font-size: 1.5rem; font-weight: 700;
    color: var(--c-text); margin: 0 0 0.5rem;
    letter-spacing: 0.3px;
}
.wl-title-ar {
    font-family: 'Amiri', 'Noto Naskh Arabic', serif;
    font-weight: 700; color: var(--accent);
    margin-left: 0.4rem;
}
.wl-desc {
    font-size: 0.85rem; line-height: 1.65;
    color: var(--c-sub); margin: 0 0 1.4rem;
}
.wl-form { display: flex; flex-direction: column; gap: 0.9rem; }
.wl-field { display: flex; flex-direction: column; gap: 0.3rem; }
.wl-field label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.8px;
    color: var(--c-sub);
}
.wl-field input {
    background: var(--c-inp-bg); border: 1px solid var(--c-inp-bd);
    color: var(--c-text); font-family: 'Outfit', sans-serif;
    font-size: 0.88rem; padding: 0.65rem 0.9rem;
    border-radius: 12px; outline: none;
    transition: border-color 0.2s ease;
}
.wl-field input::placeholder { color: var(--c-inp-ph); }
.wl-field input:focus { border-color: rgba(75,123,255,0.5); }
.wl-submit {
    margin-top: 0.4rem;
    background: var(--accent); color: white;
    font-family: 'Outfit', sans-serif; font-size: 0.88rem;
    font-weight: 700; letter-spacing: 0.5px;
    padding: 0.75rem 1.4rem; border: none;
    border-radius: 30px; cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(75,123,255,0.3);
}
.wl-submit:hover:not(:disabled) {
    background: #3a6aee; transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(75,123,255,0.4);
}
.wl-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.wl-success { text-align: center; padding: 1rem 0; }
.wl-success-icon {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(75,123,255,0.12); border: 1px solid rgba(75,123,255,0.35);
    color: var(--accent); font-size: 1.5rem;
    margin: 0 auto 1rem;
}
.wl-success p {
    font-size: 0.9rem; line-height: 1.6;
    color: var(--c-text); margin: 0;
}

/* ══════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
    .tracks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem; padding: 0.8rem;
    }
    .header { padding: 1rem; }
    .subtitle, .active-badge { margin-left: 0; }
    .brand-names { gap: 0.55rem; }
    .title { font-size: 1.25rem; letter-spacing: 2.5px; }
    .title-ar { font-size: 1.7rem; padding-left: 0.55rem; }

    .controls-bar { gap: 0.4rem; padding: 0.5rem 0.65rem; }
    .ctrl-divider { display: none; }
    .card-body { padding: 0.65rem 0.75rem 0.75rem; }
    .timer-presets { flex-wrap: wrap; }
    #master-volume { width: 90px; }

    .volume-slider { height: 6px; }
    .volume-slider::-webkit-slider-thumb { width: 20px; height: 20px; }
    #master-volume { height: 6px; }
    #master-volume::-webkit-slider-thumb { width: 22px; height: 22px; }
    .vpill { padding: 0.25rem 0.7rem; font-size: 0.72rem; }

    .ios-section { padding: 0 0.8rem 1.2rem; }
    .ios-card { flex-direction: column; align-items: flex-start; padding: 1.4rem 1.2rem; }
    .ios-right { align-items: flex-start; }
    .ios-cta-label { text-align: left; max-width: none; }

    .about-section { padding: 0.5rem 0.8rem 1.5rem; }
    .about-card { padding: 1.5rem 1.3rem; }
    .about-etym { padding: 0.9rem 1rem; gap: 0.9rem; }
    .about-etym-ar { font-size: 2.2rem; }
    .about-cta { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .wl-modal { padding: 1.6rem; }
}
