/* ==========================================================
   Besharat 114 – Theme  (RTL, responsive, light/dark)
   بدون وابستگی به Bootstrap یا کتابخانه‌ی دیگر
   ========================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Amiri Quran";
    src: url("../fonts/AmiriQuran.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg: #f7f6f2;
    --surface: #ffffff;
    --surface-2: #f0efe9;
    --text: #1d2624;
    --muted: #6b7673;
    --border: #e4e2d9;
    --primary: #0f766e;
    --primary-600: #0b5f58;
    --primary-soft: #e0f2ef;
    --accent: #c8963e;
    --accent-soft: #f7ecd6;
    --danger: #d64550;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(20, 30, 28, .05), 0 8px 24px -12px rgba(20, 30, 28, .14);
    --shadow-lg: 0 20px 50px -20px rgba(15, 118, 110, .35);
    --container: 1180px;
    --header-h: 68px;
    --player-h: 76px;
    --font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", system-ui, sans-serif;
    --font-quran: "Amiri Quran", "Scheherazade New", "Traditional Arabic", "Noto Naskh Arabic", serif;
}

[data-theme="dark"] {
    --bg: #0d1413;
    --surface: #151e1c;
    --surface-2: #1c2825;
    --text: #e8eeec;
    --muted: #93a29e;
    --border: #25332f;
    --primary: #2dd4bf;
    --primary-600: #5eead4;
    --primary-soft: #11312d;
    --accent: #e3b45f;
    --accent-soft: #33280f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 20px 50px -20px rgba(45, 212, 191, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 15px;
    padding-bottom: 0;
    transition: background .25s, color .25s;
}
body.has-player { padding-bottom: calc(var(--player-h) + 12px); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: embed; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
    transition: transform .15s, background .2s, box-shadow .2s, color .2s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
[data-theme="dark"] .btn-primary { color: #06201c; }
.btn-primary:hover { background: var(--primary-600); box-shadow: var(--shadow-lg); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { filter: brightness(.96); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #2a1d05; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.btn-icon:hover { color: var(--primary); border-color: var(--primary); }
.btn-icon.is-active { color: var(--danger); border-color: var(--danger); }
.btn-icon.is-active .icon { fill: currentColor; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #14b8a6); color: #fff; font-size: 13px; font-weight: 900;
}
.brand small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); margin-top: -4px; }
.main-nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: .2s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.header-search {
    display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 0 14px; height: 40px; width: 220px; transition: .2s;
}
.header-search:focus-within { border-color: var(--primary); width: 260px; }
.header-search input { border: 0; background: none; outline: 0; width: 100%; font: inherit; color: inherit; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
    .header-search { display: none; }
    .nav-toggle { display: inline-grid; place-items: center; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; margin: 0; padding: 12px 16px 20px;
        background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
        transform: translateY(-120%); transition: transform .3s; z-index: -1;
    }
    .main-nav.open { transform: none; }
    .main-nav a { padding: 12px 14px; border-radius: var(--radius-sm); }
    .btn-login span { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
    content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent);
    z-index: 0; pointer-events: none;
}
.hero::after {
    content: ""; position: absolute; inset: auto auto -30% -10%; width: 480px; height: 480px; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
    z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 48px); font-weight: 900; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 560px; }
.hero-ayah {
    font-family: var(--font-quran); font-size: clamp(22px, 3vw, 32px); line-height: 2.1; color: var(--primary);
    margin: 0 0 18px; font-weight: 400;
}
.hero-search {
    display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); max-width: 540px; margin: 24px 0 18px;
}
.hero-search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: inherit; padding: 8px 4px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .chip.is-active { color: #06201c; }

.hero-card {
    background: linear-gradient(160deg, #0f766e, #064e47); color: #fff; border-radius: 28px; padding: 28px;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .18), transparent 45%),
                repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px);
}
.hero-card > * { position: relative; }
.hero-card .tag { font-size: 12px; opacity: .8; }
.hero-card h3 { font-size: 20px; margin: 6px 0 2px; }
.hero-card .sub { opacity: .8; font-size: 13px; margin-bottom: 22px; }
.wave { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin-bottom: 20px; }
.wave i { flex: 1; background: rgba(255,255,255,.55); border-radius: 3px; animation: wave 1.4s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: .2s; } .wave i:nth-child(3n+1) { animation-delay: .5s; } .wave i:nth-child(4n) { animation-delay: .8s; }
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: 100%; } }
.hero-card .btn { background: #fff; color: #064e47; }

@media (max-width: 860px) {
    .hero { padding: 40px 0 32px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.stat .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 20px; }
.stat:nth-child(even) .ico { background: var(--accent-soft); color: var(--accent); }
.stat b { display: block; font-size: 22px; font-weight: 900; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat { padding: 14px; } }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.link-more { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1060px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } .grid-6 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .grid { gap: 12px; } .grid-6 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }

.rec-card .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.rec-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.rec-card:hover .thumb img { transform: scale(1.05); }
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 34px; font-family: var(--font-quran); }
.rec-card .play {
    position: absolute; inset-inline-start: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%;
    background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.3);
    transform: translateY(8px); opacity: 0; transition: .25s;
}
[data-theme="dark"] .rec-card .play { color: #06201c; }
.rec-card:hover .play, .rec-card .play:focus-visible, .rec-card.is-playing .play { transform: none; opacity: 1; }
@media (hover: none) { .rec-card .play { transform: none; opacity: 1; } }
.badges { position: absolute; inset-inline-end: 10px; top: 10px; display: flex; gap: 6px; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 4px; }
.rec-card .body { padding: 14px 16px 16px; }
.rec-card h3 { font-size: 15.5px; margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rec-card .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.rec-card .foot { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; border-top: 1px dashed var(--border); padding-top: 10px; }
.rec-card .foot span { display: inline-flex; align-items: center; gap: 5px; }

.reciter-card { text-align: center; padding: 22px 14px; }
.avatar {
    width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center;
    font-weight: 900; font-size: 26px; color: #fff; background: linear-gradient(135deg, var(--c1, #0f766e), var(--c2, #14b8a6));
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border);
}
.reciter-card h3 { font-size: 15px; margin: 0; }
.reciter-card small { color: var(--muted); display: block; }
.reciter-card .count { margin-top: 8px; font-size: 12px; color: var(--primary); font-weight: 700; }

.surah-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.surah-no {
    width: 42px; height: 42px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px;
    color: var(--primary); background: var(--primary-soft); border-radius: 12px; transform: rotate(45deg);
}
.surah-no b { transform: rotate(-45deg); }
.surah-tile h3 { font-size: 15px; margin: 0; }
.surah-tile small { color: var(--muted); }
.surah-tile .ar { margin-inline-start: auto; font-family: var(--font-quran); font-size: 20px; color: var(--primary); }

/* ---------- Page header ---------- */
.page-head { padding: 40px 0 28px; background: linear-gradient(180deg, var(--primary-soft), transparent); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: 30px; margin: 0 0 6px; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li { list-style: none; }
.breadcrumb ol { display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 8px; opacity: .6; }

/* ---------- Filter bar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.field {
    height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    font: inherit; color: inherit; min-width: 150px;
}
.field:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.field { height: auto; padding: 12px 14px; width: 100%; }
.filters .grow { flex: 1; min-width: 220px; position: relative; }
.filters .grow input { width: 100%; padding-inline-start: 40px; }
.filters .grow .icon { position: absolute; inset-inline-start: 13px; top: 12px; color: var(--muted); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; padding: 0; list-style: none; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .pagination .current { color: #06201c; }

/* ---------- Recitation details ---------- */
.details-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .details-grid { grid-template-columns: 1fr; } }
.player-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.player-stage {
    position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #064e47, #0f766e 55%, #b8862f); overflow: hidden;
}
.player-stage::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 16px); }
.player-stage .ayah { position: relative; font-family: var(--font-quran); font-size: clamp(22px, 4vw, 40px); text-align: center; padding: 0 24px; line-height: 2.2; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.big-play {
    position: absolute; inset-inline-end: 20px; bottom: 20px; width: 64px; height: 64px; border-radius: 50%;
    background: #fff; color: #064e47; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s;
}
.big-play:hover { transform: scale(1.08); }
.big-play .icon { width: 28px; height: 28px; }
.player-body { padding: 22px 24px 24px; }
.player-body h1 { font-size: 22px; margin-bottom: 4px; }
.seek { display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; font-size: 12.5px; color: var(--muted); direction: ltr; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--primary) var(--p, 0%), var(--surface-2) var(--p, 0%)); cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--primary); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.controls .spacer { flex: 1; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.meta-item { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.meta-item small { color: var(--muted); display: block; font-size: 12px; }
.meta-item b { font-size: 14px; }
@media (max-width: 520px) { .meta-grid { grid-template-columns: 1fr 1fr; } .player-stage { aspect-ratio: 16 / 10; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel h3 { font-size: 16px; margin-bottom: 14px; }
.panel + .panel { margin-top: 20px; }
.media-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.media-row:last-child { border-bottom: 0; }
.media-row .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.media-row div { flex: 1; min-width: 0; }
.media-row b { display: block; font-size: 14px; }
.media-row small { color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--muted); }
.tag:hover { color: var(--primary); background: var(--primary-soft); }

/* ---------- Track list (playlist / reciter pages) ---------- */
.tracks { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.track { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .2s; }
.track:last-child { border-bottom: 0; }
.track:hover, .track.is-playing { background: var(--primary-soft); }
.track .no { width: 28px; text-align: center; color: var(--muted); font-weight: 700; }
.track .t-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); flex: none; }
.track:hover .t-play, .track.is-playing .t-play { background: var(--primary); color: #fff; }
.track .info { flex: 1; min-width: 0; }
.track .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .info small { color: var(--muted); }
.track .dur { color: var(--muted); font-size: 13px; direction: ltr; }
@media (max-width: 520px) { .track .no { display: none; } .track { padding: 10px 12px; } }

/* ---------- Reciter profile ---------- */
.profile { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.profile .avatar { width: 128px; height: 128px; font-size: 40px; margin: 0; }
.profile h1 { margin: 0 0 4px; font-size: 28px; }
.profile .facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); margin-top: 8px; }
.profile .facts span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Playlist cards ---------- */
.pl-card { padding: 0; }
.pl-cover { aspect-ratio: 1.6; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); position: relative; }
.pl-cover .icon { width: 44px; height: 44px; opacity: .9; }
.pl-card .body { padding: 14px 16px 16px; }
.pl-card h3 { font-size: 15.5px; margin: 0 0 2px; }
.pl-card small { color: var(--muted); }

/* ---------- Auth & forms ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(100% - 32px, 420px); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.form-row .field { width: 100%; }

/* ---------- CTA ---------- */
.cta {
    background: linear-gradient(135deg, #064e47, #0f766e); color: #fff; border-radius: 28px; padding: 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px); }
.cta > * { position: relative; }
.cta h2 { margin: 0 0 6px; font-size: 24px; }
.cta p { margin: 0; opacity: .85; }
.cta .btn { background: var(--accent); color: #2a1d05; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 44px 0 28px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Mini player (global) ---------- */
.mini-player {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 60; height: var(--player-h);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -18px rgba(0,0,0,.4);
    transform: translateY(110%); transition: transform .35s;
}
.mini-player.show { transform: none; }
.mini-inner { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) minmax(120px, 1fr); align-items: center; gap: 20px; height: 100%; }
.mini-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-cover { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #0f766e, #b8862f); color: #fff; display: grid; place-items: center; flex: none; font-family: var(--font-quran); font-size: 20px; }
.mini-info b, .mini-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-info small { color: var(--muted); }
.mini-center { display: grid; gap: 4px; }
.mini-btns { display: flex; justify-content: center; align-items: center; gap: 10px; direction: ltr; }
.mini-btns .btn-icon { width: 36px; height: 36px; border: 0; background: none; }
.mini-btns .main { width: 44px; height: 44px; background: var(--primary); color: #fff; border-radius: 50%; }
[data-theme="dark"] .mini-btns .main { color: #06201c; }
.mini-center .seek { margin: 0; }
.mini-right { display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.mini-right .range { max-width: 90px; }
@media (max-width: 760px) {
    .mini-inner { grid-template-columns: 1fr auto; gap: 10px; }
    .mini-center .seek, .mini-right .range, .mini-btns .hide-sm { display: none; }
    .mini-center { order: 3; }
    .mini-right { display: none; }
}

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: calc(var(--player-h) + 20px); left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Images (جایگزینی: همان نام فایل را در wwwroot/img بازنویسی کنید) ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover { overflow: hidden; }
.pl-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-cover .icon { position: relative; z-index: 1; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.player-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-stage::before { z-index: 1; }
.player-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.15) 60%, rgba(0,0,0,.35)); }
.player-stage .ayah, .big-play { z-index: 2; }
.player-stage { background: var(--surface-2); }
.mini-cover { overflow: hidden; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.thumb a { display: block; width: 100%; height: 100%; }
