/* ═══════════════════════════════════════════════════════
   إذاعة القرآن الكريم — النمط البصري الإسلامي الكامل
   ═══════════════════════════════════════════════════════ */

/* ── المتغيرات — ثيم سمائي/أبيض بإطار ذهبي ── */
:root {
    --c-bg:          #e9f4fc;   /* خلفية سمائية فاتحة */
    --c-bg2:         #dcecf8;
    --c-bg3:         #f5fbff;
    --c-card:        #ffffff;    /* بطاقات بيضاء */
    --c-card-h:      #f1f9ff;

    --c-gold:        #c49a3c;    /* ذهبي الإطار */
    --c-gold-lt:     #a67c1c;    /* ذهبي غامق لعناوين تُقرأ على الأبيض */
    --c-gold-dim:    #d9c285;    /* ذهبي فاتح */
    --c-gold-pale:   #7c5c12;    /* ذهبي داكن جداً للعناوين الكبيرة */
    --c-gold-muted:  rgba(196,154,60,.45);
    --c-gold-glow:   rgba(196,154,60,.20);

    --c-sky:         #4aa3da;    /* سمائي زاهٍ */
    --c-sky-dark:    #2b6f9e;
    --c-sky-deep:    #1c5379;    /* سمائي عميق للعناوين */
    --c-sky-pale:    #e6f3fc;
    --c-sky-glow:    rgba(74,163,218,.18);

    --c-green:       #1e4a2a;
    --c-green-lt:    #2e6a3e;

    --c-txt:         #173a4f;    /* نص كحلي عميق */
    --c-txt2:        #345f79;    /* ثانوي */
    --c-txt3:        #5b7d91;    /* خافت */
    --c-txt4:        #95aebb;    /* أخفت */

    --c-live:        #e03030;
    --c-live-glow:   rgba(224,48,48,.4);

    --r-sm:  10px;
    --r-md:  14px;
    --r-lg:  20px;

    --shadow-gold:   0 6px 26px rgba(74,163,218,.14);
    --shadow-card:   0 8px 28px rgba(28,83,121,.12);

    --font-quran:    'Scheherazade New', 'Amiri', serif;
    --font-ui:       'Amiri', 'Scheherazade New', serif;

    --transition:    .28s ease;
    --transition-slow: .55s ease;
}

/* ── إعادة تهيئة ── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background-color: var(--c-bg);
    color: var(--c-txt);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    /* نمط النجمة الثمانية المتكرر في الخلفية (سمائي خفيف) */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpolygon points='50,10 57,34 78,22 66,44 90,50 66,56 78,78 57,66 50,90 44,66 22,78 34,56 10,50 34,44 22,22 44,34' fill='none' stroke='%234aa3da' stroke-width='0.7' opacity='0.10'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 100px 100px;
    background-attachment: fixed;
}

button {
    font-family: var(--font-ui);
    cursor: pointer;
}

/* ── طبقة تظليل الخلفية ── */
.bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(74,163,218,.16) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 100%, rgba(196,154,60,.10) 0%, transparent 60%),
                linear-gradient(180deg, #f3faff 0%, #e2eff8 100%);
    pointer-events: none;
    z-index: 0;
}

/* ══════════════════════════════════════════════════════
   غلاف الصفحة
   ══════════════════════════════════════════════════════ */
.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ══════════════════════════════════════════════════════
   الأشرطة الزخرفية
   ══════════════════════════════════════════════════════ */
.ornament-band {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}

.band-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--c-gold) 50%, transparent 100%);
}

.band-gems {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.gem {
    font-style: normal;
    color: var(--c-gold);
    font-size: .75rem;
}

.gem-sm {
    font-style: normal;
    color: var(--c-gold-dim);
    font-size: .55rem;
}

/* ══════════════════════════════════════════════════════
   الترويسة
   ══════════════════════════════════════════════════════ */
.site-header {
    text-align: center;
    padding: 24px 0 16px;
}

/* إطار الترويسة */
.header-frame {
    position: relative;
    border: 1.5px solid var(--c-gold-muted);
    border-radius: var(--r-lg);
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        var(--c-sky-pale) 100%
    );
    box-shadow: var(--shadow-card);
    padding: 0 20px 20px;
    margin: 4px 0;
    overflow: hidden;
}

/* زوايا الإطار */
.hf-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--c-gold);
    border-style: solid;
    z-index: 2;
}
.hf-corner.hf-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.hf-corner.hf-tl { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.hf-corner.hf-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.hf-corner.hf-bl { bottom: -1px; left: -1px;  border-width: 0 0 2px 2px; }

/* النقوش الهندسية للقوس */
.geometric-top,
.geometric-bottom {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
}

.geometric-top { height: 60px; }
.geometric-bottom { height: 60px; }

.header-inner {
    padding: 8px 20px 4px;
}

/* البسملة */
.bismillah {
    font-family: var(--font-quran);
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--c-gold-lt);
    line-height: 1.7;
    margin-bottom: 10px;
    text-shadow: 0 2px 14px rgba(196,154,60,.30);
    letter-spacing: .02em;
}

.site-title {
    font-family: var(--font-quran);
    font-size: clamp(1.7rem, 5.5vw, 2.8rem);
    font-weight: 700;
    color: var(--c-sky-deep);
    line-height: 1.4;
    text-shadow: 0 2px 14px rgba(74,163,218,.22);
    margin-bottom: 6px;
}

.site-subtitle {
    font-size: clamp(1rem, 2.8vw, 1.25rem);
    color: var(--c-txt2);
    margin-bottom: 14px;
}

.date-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: var(--c-txt3);
    background: rgba(196,149,58,.07);
    border: 1px solid rgba(196,149,58,.18);
    padding: 4px 16px;
    border-radius: 20px;
}

.date-sep { color: var(--c-gold-dim); }

/* ══════════════════════════════════════════════════════
   المحتوى الرئيسي
   ══════════════════════════════════════════════════════ */
.main-content {
    padding: 16px 0 0;
}

/* ══════════════════════════════════════════════════════
   مقطع المشغّل
   ══════════════════════════════════════════════════════ */
.player-section {
    display: flex;
    justify-content: center;
    padding: 24px 0 16px;
}

.player-wrapper {
    width: 100%;
    max-width: 520px;
}

/* إطار القوس الإسلامي */
.player-arch-frame {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, var(--c-sky-pale) 100%);
    border: 1.5px solid var(--c-gold-muted);
    border-radius: 50% 50% var(--r-md) var(--r-md) / 22% 22% var(--r-md) var(--r-md);
    box-shadow: var(--shadow-gold), var(--shadow-card), inset 0 0 60px rgba(74,163,218,.06);
    overflow: hidden;
    padding: 8px 32px 32px;
}

/* الخط الذهبي في أعلى القوس */
.player-arch-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
    border-radius: 50%;
}

/* زوايا إطار المشغّل */
.paf-corner {
    position: absolute;
    width: 18px; height: 18px;
    border-color: var(--c-gold);
    border-style: solid;
    z-index: 2;
}
.paf-corner.paf-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.paf-corner.paf-tl { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.paf-corner.paf-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.paf-corner.paf-bl { bottom: -1px; left: -1px;  border-width: 0 0 2px 2px; }

/* القوس العلوي والسفلي */
.arch-crown, .arch-base {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    overflow: hidden;
    display: block;
}
.arch-crown { height: 40px; }
.arch-base  { height: 20px; margin-top: 12px; }

.player-body {
    text-align: center;
    padding: 4px 0 0;
}

/* شارة البث المباشر */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(224,48,48,.12);
    border: 1px solid rgba(224,48,48,.3);
    color: #ff6666;
    font-size: .8rem;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    letter-spacing: .04em;
}

.live-dot {
    width: 8px; height: 8px;
    background: var(--c-live);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--c-live-glow);
    animation: livePulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--c-live-glow); }
    50%       { opacity: .6; transform: scale(.8); box-shadow: 0 0 2px var(--c-live-glow); }
}

/* شعار الإذاعة */
.radio-emblem {
    display: block;
    margin: 0 auto 14px;
    filter: drop-shadow(0 0 10px rgba(196,149,58,.3));
    animation: emblemGlow 3s ease-in-out infinite alternate;
}

@keyframes emblemGlow {
    from { filter: drop-shadow(0 0 6px rgba(196,149,58,.2)); }
    to   { filter: drop-shadow(0 0 16px rgba(196,149,58,.5)); }
}

/* معلومات المحطة */
.now-playing-info {
    margin-bottom: 22px;
    min-height: 70px;
}

.station-name {
    font-family: var(--font-quran);
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 700;
    color: var(--c-gold-lt);
    line-height: 1.5;
    margin-bottom: 4px;
}

.reciter-label {
    font-size: .9rem;
    color: var(--c-txt2);
    margin-bottom: 6px;
}

.player-status-msg {
    font-size: .78rem;
    color: var(--c-txt3);
    min-height: 18px;
    animation: fadeIn .3s ease;
}

/* أزرار التحكم */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 22px;
}

.ctrl-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
    color: var(--c-txt2);
}

.ctrl-btn:hover { transform: scale(1.12); color: var(--c-gold-lt); }
.ctrl-btn:active { transform: scale(.96); }

/* زر السابق والتالي */
.btn-prev, .btn-next {
    width: 44px; height: 44px;
    background: rgba(196,149,58,.08);
    border: 1px solid var(--c-gold-muted) !important;
}

.btn-prev:hover, .btn-next:hover {
    background: rgba(196,149,58,.18);
}

/* زر التشغيل الرئيسي */
.btn-play {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-gold-lt) 100%);
    border: 2px solid #fff !important;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 0 22px rgba(196,154,60,.45), 0 6px 16px rgba(28,83,121,.25);
    position: relative;
    overflow: hidden;
}

.btn-play::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.15), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.btn-play:hover {
    box-shadow: 0 0 32px rgba(196,149,58,.6), 0 4px 16px rgba(0,0,0,.6);
    transform: scale(1.06);
}

.btn-play.is-playing {
    background: linear-gradient(135deg, #6e1a1a 0%, #b02020 100%);
    border-color: #e05050 !important;
    box-shadow: 0 0 22px rgba(176,32,32,.4);
}

.btn-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
}

/* شريط الصوت */
.volume-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vol-icon-btn {
    background: none;
    border: none;
    color: var(--c-txt3);
    transition: var(--transition);
    padding: 4px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
}

.vol-icon-btn:hover { color: var(--c-gold-lt); }

.vol-slider-wrap {
    position: relative;
    width: 150px;
    height: 20px;
    display: flex;
    align-items: center;
}

.volume-slider {
    -webkit-appearance: none;
    position: relative;
    z-index: 2;
    width: 100%; height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    background: var(--c-gold);
    border: 2px solid var(--c-gold-lt);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(196,149,58,.5);
    transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 14px rgba(196,149,58,.8);
    transform: scale(1.15);
}

.volume-slider::-moz-range-thumb {
    width: 16px; height: 16px;
    background: var(--c-gold);
    border: 2px solid var(--c-gold-lt);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.volume-slider::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

.vol-track {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(196,149,58,.2);
    border-radius: 2px;
    overflow: hidden;
    z-index: 1;
}

.vol-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-gold-dim), var(--c-gold));
    border-radius: 2px;
    transition: width .1s;
}

.vol-value {
    font-size: .78rem;
    color: var(--c-txt3);
    min-width: 32px;
    text-align: start;
}

/* ══════════════════════════════════════════════════════
   الفاصل الزخرفي
   ══════════════════════════════════════════════════════ */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
}

.sd-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-gold-dim), transparent);
}

.sd-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ══════════════════════════════════════════════════════
   عنوان المقطع
   ══════════════════════════════════════════════════════ */
.section-heading {
    font-family: var(--font-quran);
    font-size: clamp(1.2rem, 3.8vw, 1.55rem);
    font-weight: 700;
    color: var(--c-gold-lt);
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sh-orn {
    color: var(--c-gold);
    font-size: .85rem;
}

/* ══════════════════════════════════════════════════════
   قائمة المحطات
   ══════════════════════════════════════════════════════ */
.stations-section {
    margin: 0 0 12px;
}

/* تبويبات الوضع */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.mode-tab {
    background: rgba(196,149,58,.06);
    border: 1px solid var(--c-gold-muted);
    color: var(--c-txt2);
    padding: 8px 24px;
    font-size: .9rem;
    font-family: var(--font-ui);
    transition: var(--transition);
    border-radius: var(--r-sm);
}

.mode-tab:hover {
    background: rgba(196,149,58,.14);
    color: var(--c-gold-lt);
}

.mode-tab.active {
    background: rgba(196,149,58,.18);
    border-color: var(--c-gold);
    color: var(--c-gold-pale);
    box-shadow: 0 0 12px rgba(196,149,58,.15);
}

/* شبكة المحطات */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.stations-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--c-txt3);
    font-size: .9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.spinner {
    width: 38px; height: 38px;
    border: 3px solid rgba(196,149,58,.2);
    border-top-color: var(--c-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* بطاقة المحطة */
.station-card {
    background: var(--c-card);
    border: 1px solid rgba(196,149,58,.22);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    border-radius: var(--r-sm);
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
    opacity: 0;
    transition: var(--transition);
}

.station-card:hover {
    background: var(--c-card-h);
    border-color: var(--c-gold-muted);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.station-card:hover::before { opacity: 1; }

.station-card.active {
    background: rgba(196,149,58,.1);
    border-color: var(--c-gold);
    box-shadow: 0 0 18px rgba(196,149,58,.18);
}

.station-card.active::before { opacity: 1; }

.sc-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 8px;
    filter: grayscale(.4) brightness(1.1);
}

.sc-name {
    font-size: .92rem;
    font-family: var(--font-quran);
    color: var(--c-txt2);
    line-height: 1.55;
    font-weight: 700;
}

.station-card.active .sc-name { color: var(--c-gold-lt); }

.sc-playing {
    display: block;
    margin-top: 6px;
    font-size: .72rem;
    color: var(--c-gold);
}

.sc-waves {
    display: inline-flex;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.sc-waves span {
    display: inline-block;
    width: 3px;
    background: var(--c-gold);
    border-radius: 1px;
    animation: wave 1s ease-in-out infinite;
}
.sc-waves span:nth-child(1) { animation-delay: 0s;    height: 100%; }
.sc-waves span:nth-child(2) { animation-delay: .2s;   height: 60%; }
.sc-waves span:nth-child(3) { animation-delay: .4s;   height: 80%; }
.sc-waves span:nth-child(4) { animation-delay: .1s;   height: 50%; }

@keyframes wave {
    0%, 100% { transform: scaleY(.5); }
    50%       { transform: scaleY(1); }
}

/* ── لوحة التلاوة المستمرة ── */
.reciter-desc {
    text-align: center;
    font-size: .9rem;
    color: var(--c-txt3);
    margin-bottom: 20px;
    line-height: 1.7;
}

.reciters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.reciter-card {
    background: var(--c-card);
    border: 1px solid rgba(196,149,58,.22);
    padding: 16px 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border-radius: var(--r-sm);
    position: relative;
}

.reciter-card:hover {
    background: var(--c-card-h);
    border-color: var(--c-gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.reciter-card.active {
    background: rgba(196,149,58,.1);
    border-color: var(--c-gold);
    box-shadow: 0 0 18px rgba(196,149,58,.18);
}

.rc-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}

.rc-name {
    font-family: var(--font-quran);
    font-size: .95rem;
    font-weight: 700;
    color: var(--c-txt2);
    line-height: 1.5;
}

.reciter-card.active .rc-name { color: var(--c-gold-lt); }

.rc-quality {
    display: block;
    font-size: .72rem;
    color: var(--c-txt4);
    margin-top: 4px;
}

/* شريط تقدم السورة */
.surah-progress {
    background: var(--c-card);
    border: 1px solid var(--c-gold-muted);
    padding: 14px 20px;
    border-radius: var(--r-sm);
    margin-top: 8px;
}

.surah-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: .88rem;
}

#currentSurahName { color: var(--c-gold-lt); font-weight: 700; }
#surahCounter     { color: var(--c-txt3); }

.surah-progress-bar {
    height: 6px;
    background: rgba(196,149,58,.15);
    border-radius: 3px;
    overflow: hidden;
}

#surahProgressFill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-gold-dim), var(--c-gold));
    border-radius: 3px;
    transition: width .5s ease;
}

/* ══════════════════════════════════════════════════════
   مقطع الآية القرآنية
   ══════════════════════════════════════════════════════ */
.verse-section {
    display: flex;
    justify-content: center;
    padding: 0 0 16px;
}

.verse-frame {
    position: relative;
    max-width: 700px;
    width: 100%;
    border: 1px solid var(--c-gold-muted);
    padding: 40px 36px;
    background: linear-gradient(165deg, #ffffff 0%, var(--c-sky-pale) 100%);
    box-shadow: var(--shadow-card);
    text-align: center;
    border-radius: var(--r-sm);
}

/* الإطار الداخلي */
.verse-inner-border {
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(196,149,58,.12);
    pointer-events: none;
    border-radius: calc(var(--r-sm) - 2px);
}

/* زوايا إطار الآية */
.vf-corner {
    position: absolute;
    width: 22px; height: 22px;
    border-color: var(--c-gold);
    border-style: solid;
    z-index: 2;
}
.vf-corner.vf-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.vf-corner.vf-tl { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.vf-corner.vf-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.vf-corner.vf-bl { bottom: -1px; left: -1px;  border-width: 0 0 2px 2px; }

.verse-text {
    font-family: var(--font-quran);
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    line-height: 2.1;
    color: var(--c-txt);
    margin: 24px 0 16px;
    animation: fadeIn .5s ease;
}

.verse-loading {
    color: var(--c-txt3);
    font-size: 1rem;
    padding: 16px 0;
}

.verse-ref {
    font-size: .9rem;
    color: var(--c-txt2);
    margin-bottom: 22px;
    animation: fadeIn .5s ease;
}

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

.verse-next-btn {
    background: rgba(196,149,58,.08);
    border: 1px solid var(--c-gold-muted);
    color: var(--c-txt2);
    padding: 8px 26px;
    font-family: var(--font-ui);
    font-size: .88rem;
    transition: var(--transition);
    border-radius: var(--r-sm);
}

.verse-next-btn:hover {
    background: rgba(196,149,58,.18);
    border-color: var(--c-gold);
    color: var(--c-gold-lt);
}

/* ══════════════════════════════════════════════════════
   لوحة الإهداء — صدقة جارية على روح المرحوم
   ══════════════════════════════════════════════════════ */
.memorial-section {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.memorial-frame {
    position: relative;
    max-width: 560px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--c-gold-muted);
    border-radius: var(--r-sm);
    padding: 32px 28px 28px;
    background: linear-gradient(165deg, #ffffff 0%, var(--c-sky-pale) 100%);
    box-shadow: var(--shadow-gold), var(--shadow-card);
}

/* زوايا إطار الإهداء */
.mf-corner {
    position: absolute;
    width: 22px; height: 22px;
    border-color: var(--c-gold);
    border-style: solid;
    z-index: 2;
}
.mf-corner.mf-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.mf-corner.mf-tl { top: -1px; left: -1px;  border-width: 2px 0 0 2px; }
.mf-corner.mf-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.mf-corner.mf-bl { bottom: -1px; left: -1px;  border-width: 0 0 2px 2px; }

.memorial-photo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196,149,58,.18), transparent 70%);
}

.memorial-photo {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--c-gold);
    box-shadow: 0 0 24px rgba(196,149,58,.35), 0 4px 14px rgba(0,0,0,.6);
    filter: sepia(.12) brightness(1.02);
}

.memorial-lead {
    font-size: clamp(.95rem, 2.6vw, 1.15rem);
    color: var(--c-txt2);
    margin-bottom: 6px;
}

.memorial-name {
    font-family: var(--font-quran);
    font-size: clamp(1.6rem, 5vw, 2.3rem);
    font-weight: 700;
    color: var(--c-gold-pale);
    line-height: 1.6;
    margin-bottom: 12px;
    text-shadow: 0 2px 14px rgba(196,154,60,.25);
}

.memorial-dua {
    font-size: clamp(.9rem, 2.4vw, 1.05rem);
    color: var(--c-txt3);
    line-height: 1.9;
    max-width: 440px;
    margin: 0 auto 16px;
}

.memorial-verse {
    font-family: var(--font-quran);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    color: var(--c-gold-lt);
    line-height: 1.9;
    text-shadow: 0 0 16px rgba(196,149,58,.25);
}

/* ══════════════════════════════════════════════════════
   سورة الفاتحة
   ══════════════════════════════════════════════════════ */
.fatiha-section {
    display: flex;
    justify-content: center;
    padding: 0 0 16px;
}

.fatiha-frame {
    position: relative;
    max-width: 700px;
    width: 100%;
    border: 1px solid var(--c-gold-muted);
    padding: 40px 36px;
    background: linear-gradient(165deg, #ffffff 0%, var(--c-sky-pale) 100%);
    box-shadow: var(--shadow-card);
    text-align: center;
    border-radius: var(--r-sm);
}

.fatiha-text {
    margin: 18px 0 16px;
    animation: fadeIn .5s ease;
}

.fatiha-ayah {
    font-family: var(--font-quran);
    font-size: clamp(1.3rem, 4vw, 1.85rem);
    line-height: 2.4;
    color: var(--c-txt);
}

.fatiha-ayah:first-child {
    color: var(--c-gold-lt);
}

.fatiha-ref {
    font-size: .9rem;
    color: var(--c-txt2);
    margin-top: 10px;
}

/* ══════════════════════════════════════════════════════
   التذييل
   ══════════════════════════════════════════════════════ */
.site-footer {
    padding: 8px 0 24px;
    text-align: center;
}

.footer-content {
    padding: 20px 0 8px;
}

.shahada {
    font-family: var(--font-quran);
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    color: var(--c-gold-lt);
    line-height: 1.9;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(196,154,60,.22);
}

.footer-tag {
    font-size: .88rem;
    color: var(--c-txt3);
    margin-bottom: 8px;
}

.footer-copy {
    font-size: .75rem;
    color: var(--c-txt4);
    letter-spacing: .12em;
}

/* ══════════════════════════════════════════════════════
   التجاوب مع الأجهزة المختلفة
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .page-wrapper { padding: 0 10px 30px; }

    .header-frame { padding: 0 12px 16px; }

    .player-arch-frame { padding: 6px 20px 24px; }

    .stations-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .reciters-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .verse-frame { padding: 28px 20px; }

    .mode-tabs { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
    .bismillah    { font-size: 1.8rem; }
    .site-title   { font-size: 1.5rem; }
    .site-subtitle { font-size: .9rem; }

    .stations-grid,
    .reciters-grid { grid-template-columns: 1fr 1fr; }

    .verse-text { font-size: 1.25rem; }

    .player-controls { gap: 14px; }
    .btn-play { width: 62px; height: 62px; }

    .vol-slider-wrap { width: 110px; }

    .memorial-photo { width: 140px; height: 140px; }
    .fatiha-ayah { font-size: 1.2rem; line-height: 2.2; }

    .ov-inner { padding: 18px 22px; }
    .ov-orn { display: none; }
}

@media (max-width: 360px) {
    .stations-grid,
    .reciters-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   مساعدات عامة
   ══════════════════════════════════════════════════════ */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* مظهر التحديد في المتصفح */
::selection {
    background: rgba(74,163,218,.22);
    color: var(--c-sky-deep);
}

/* ══════════════════════════════════════════════════════
   آية الاستفتاح أعلى الصفحة
   ══════════════════════════════════════════════════════ */
.opening-verse {
    display: flex;
    justify-content: center;
    padding: 14px 0 4px;
}

.ov-inner {
    position: relative;
    max-width: 760px;
    width: 100%;
    text-align: center;
    padding: 22px 54px;
    border-radius: var(--r-lg);
    background: linear-gradient(165deg, #ffffff 0%, var(--c-sky-pale) 100%);
    border: 1.5px solid var(--c-gold-muted);
    box-shadow: var(--shadow-gold), var(--shadow-card);
}

.ov-orn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-quran);
    font-size: 2.4rem;
    color: var(--c-gold);
    opacity: .7;
}
.ov-orn-r { right: 16px; }
.ov-orn-l { left: 16px; }

.ov-text {
    font-family: var(--font-quran);
    font-size: clamp(1.5rem, 4.6vw, 2.15rem);
    line-height: 2;
    color: var(--c-sky-deep);
    text-shadow: 0 2px 12px rgba(74,163,218,.18);
    margin-bottom: 8px;
}

.ov-ref {
    display: inline-block;
    font-size: .9rem;
    color: var(--c-gold-lt);
    background: rgba(196,154,60,.10);
    border: 1px solid var(--c-gold-muted);
    padding: 3px 16px;
    border-radius: 16px;
}

/* اسم الإهداء بالأخير */
.dedication-sep {
    display: block;
    color: var(--c-gold);
    letter-spacing: .35em;
    font-size: .8rem;
    margin: 18px 0 8px;
}
.dedication-by {
    font-size: .9rem;
    color: var(--c-txt3);
    margin-bottom: 2px;
}

/* ══════════════════════════════════════════════════════
   لمسات سمائية على العناصر التفاعلية
   ══════════════════════════════════════════════════════ */
.reciter-card.active,
.station-card.active {
    background: linear-gradient(165deg, #ffffff, var(--c-sky-pale));
    border-color: var(--c-gold);
    box-shadow: 0 6px 20px rgba(74,163,218,.22);
}
.reciter-card.active .rc-name { color: var(--c-sky-deep); }
.radio-emblem { filter: drop-shadow(0 0 10px rgba(74,163,218,.35)); }

/* شارة "صدقة جارية" */
.sadaqa-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--c-gold), var(--c-gold-lt));
    color: #fff;
    font-size: .82rem;
    letter-spacing: .04em;
    padding: 5px 18px;
    border-radius: 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(196,154,60,.30);
}

/* ══════════════════════════════════════════════════════
   أذكار الصباح والمساء
   ══════════════════════════════════════════════════════ */
.adhkar-section { margin: 0 0 8px; }

.adhkar-panel { display: none; }
.adhkar-panel.active { display: block; animation: fadeIn .4s ease; }

.dhikr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 760px;
    margin: 0 auto;
}

.dhikr-card {
    position: relative;
    background: var(--c-card);
    border: 1px solid var(--c-gold-muted);
    border-inline-start: 4px solid var(--c-gold);
    border-radius: var(--r-md);
    padding: 20px 22px;
    box-shadow: 0 4px 16px rgba(28,83,121,.07);
    transition: var(--transition);
}
.dhikr-card:hover {
    box-shadow: 0 8px 24px rgba(74,163,218,.16);
    transform: translateY(-2px);
}

.dhikr-text {
    font-family: var(--font-quran);
    font-size: clamp(1.15rem, 3.4vw, 1.5rem);
    line-height: 2.1;
    color: var(--c-txt);
    margin-bottom: 10px;
}

.dhikr-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px dashed var(--c-gold-muted);
    padding-top: 10px;
}

.dhikr-virtue {
    font-size: .82rem;
    color: var(--c-txt3);
    line-height: 1.6;
    flex: 1;
    min-width: 180px;
}

.dhikr-repeat {
    flex-shrink: 0;
    font-size: .82rem;
    font-weight: 700;
    color: var(--c-sky-deep);
    background: var(--c-sky-pale);
    border: 1px solid rgba(74,163,218,.3);
    padding: 4px 14px;
    border-radius: 16px;
}

/* ══════════════════════════════════════════════════════
   التسبيحات — عدّادات تفاعلية
   ══════════════════════════════════════════════════════ */
.tasbeeh-hint {
    text-align: center;
    font-size: .88rem;
    color: var(--c-txt3);
    margin-bottom: 18px;
}

.tasbeeh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    max-width: 820px;
    margin: 0 auto;
}

.tasbeeh-item {
    position: relative;
    background: var(--c-card);
    border: 1.5px solid var(--c-gold-muted);
    border-radius: var(--r-md);
    padding: 20px 16px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow var(--transition), border-color var(--transition);
    box-shadow: 0 4px 16px rgba(28,83,121,.07);
    user-select: none;
}
.tasbeeh-item:hover { box-shadow: 0 8px 22px rgba(74,163,218,.18); }
.tasbeeh-item:active { transform: scale(.97); }
.tasbeeh-item.done {
    border-color: var(--c-gold);
    background: linear-gradient(165deg, #fffdf6, var(--c-sky-pale));
    box-shadow: 0 0 0 3px rgba(196,154,60,.18), 0 8px 22px rgba(74,163,218,.18);
}

.tb-phrase {
    font-family: var(--font-quran);
    font-size: clamp(1.2rem, 3.6vw, 1.5rem);
    color: var(--c-gold-lt);
    line-height: 1.7;
    margin-bottom: 10px;
}

.tb-count {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--c-sky-deep);
    line-height: 1;
    font-family: var(--font-ui);
}
.tb-target { font-size: .95rem; color: var(--c-txt3); }

.tb-bar {
    height: 5px;
    background: rgba(74,163,218,.16);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}
.tb-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--c-sky), var(--c-gold));
    border-radius: 3px;
    transition: width .2s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.tb-count.bump { animation: pop .25s ease; }

/* ══════════════════════════════════════════════════════
   الصلاة الإبراهيمية + خواتيم البقرة
   ══════════════════════════════════════════════════════ */
.salah-text,
.baqarah-text {
    font-family: var(--font-quran);
    line-height: 2.4;
    color: var(--c-txt);
    margin: 14px 0 6px;
}
.salah-text {
    font-size: clamp(1.2rem, 3.6vw, 1.7rem);
    color: var(--c-sky-deep);
}
.baqarah-ayah {
    font-size: clamp(1.25rem, 3.8vw, 1.75rem);
    line-height: 2.5;
    color: var(--c-txt);
    margin-bottom: 8px;
}
.baqarah-ayah .ayah-no {
    color: var(--c-gold-lt);
    font-size: .8em;
}
