/* ╔══════════════════════════════════════════════════════════════════╗
   ║  سهرة — الأساس والقشرة والمكوّنات                                  ║
   ║  (الصفحات في pages.css — تتحمّل بعده فتغلب بترتيب المصدر)          ║
   ╚══════════════════════════════════════════════════════════════════╝ */
[hidden] { display: none !important; }
:root {
  --bg: #0b0820; --acc: #ffc75a; --acc2: #b98cff; --acc-ink: #120c06; --acc2-ink: #120c06;
  --ink: #f6f3ff; --ink2: #d4cdef; --mut: #a39cc6;
  --plate: rgba(13, 10, 30, .80); --plate2: rgba(20, 15, 44, .88); --plate3: rgba(30, 22, 62, .92);
  --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .17);
  --r: 16px; --r2: 24px; --head: 78px; --wrap: 1520px; --gut: 28px;
  --sh: 0 24px 60px -24px rgba(0, 0, 0, .85), 0 2px 0 rgba(255, 255, 255, .03) inset;
  --f: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --fd: 'Lalezar', 'Readex Pro', sans-serif;
  --ok: #2fd38a; --bad: #ff4060; --warn: #ffb02e; --tr: #ff3b4f; --an: #9b6bff;
  color-scheme: dark;
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html[data-scale=s] { font-size: 14.5px; }
html[data-scale=l] { font-size: 17.6px; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
svg { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
bdi { unicode-bidi: isolate; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2.5px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 11px; height: 9px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--acc) 38%, #222); border-radius: 9px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
html.has-modal { overflow: hidden; }

/* ═══════════ الخلفية الحيّة ═══════════ */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); pointer-events: none; }
#bg .scene { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
#bg .scene.on { opacity: 1; }
#bg .sky, .tp .sky { position: absolute; inset: 0; background: var(--sky); }
#bg .art, .tp .art { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
#bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
#bg .vig { position: absolute; inset: 0; z-index: 3; background: radial-gradient(130% 95% at 50% 38%, transparent 48%, rgba(0, 0, 0, .55) 100%), linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 22%, transparent 62%, rgba(0, 0, 0, .5)); }
#bg .grain { position: absolute; inset: -50%; z-index: 4; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.6s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
/* نوافذ المدن */
.art .wins rect { fill: #ffd38a; opacity: .75; }
.wins-warm .wins rect { fill: #ffbf6a; }
.wins-neon .wins rect:nth-child(3n) { fill: #19f0ff; } .wins-neon .wins rect:nth-child(3n+1) { fill: #ff2bd6; } .wins-neon .wins rect:nth-child(3n+2) { fill: #c4f6ff; opacity: .45; }
.wins-red .wins rect { fill: #ff4a3a; opacity: .55; }
.wins-sodium rect { fill: #ffb547; opacity: .8; }
.bulbs circle { fill: #ffd27a; filter: drop-shadow(0 0 5px #ffb547); }
.art .neon { filter: drop-shadow(0 0 10px #ff3b30) drop-shadow(0 0 24px #ff3b30); }
/* حركات المشاهد (رخيصة: transform وopacity فقط) */
.art [class*="a-"] { transform-box: fill-box; }
.a-pulse { animation: aPulse var(--dur, 7s) ease-in-out infinite var(--d, 0s); }
@keyframes aPulse { 0%, 100% { opacity: var(--po, 1); } 50% { opacity: calc(var(--po, 1) * .55); } }
.a-drift { animation: aDrift var(--dur, 80s) ease-in-out infinite alternate; }
@keyframes aDrift { from { transform: translateX(0); } to { transform: translateX(520px); } }
.a-walk { transform-box: view-box !important; animation: aWalk var(--dur, 120s) linear infinite; }
@keyframes aWalk { from { transform: translateX(var(--from, -300px)); } to { transform: translateX(var(--to, 1900px)); } }
.a-sway { transform-origin: 50% 0; animation: aSway var(--dur, 10s) ease-in-out infinite alternate var(--d, 0s); }
@keyframes aSway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
.a-spin { transform-origin: center; animation: aSpin var(--dur, 60s) linear infinite; }
.a-spin.rev { animation-direction: reverse; }
@keyframes aSpin { to { transform: rotate(360deg); } }
.a-blink { animation: aBlink var(--dur, 5s) steps(1) infinite var(--d, 0s); }
@keyframes aBlink { 0%, 62% { opacity: 1; } 64% { opacity: .15; } 70% { opacity: .9; } 74% { opacity: .2; } 80%, 100% { opacity: 1; } }
.a-flicker { animation: aFlick 2.6s infinite var(--d, 0s); }
@keyframes aFlick { 0%, 100% { opacity: 1; } 8% { opacity: .72; } 14% { opacity: .95; } 37% { opacity: .78; } 43% { opacity: 1; } 71% { opacity: .66; } 76% { opacity: .96; } }
.a-flag { transform-origin: 0 50%; animation: aFlag 2.4s ease-in-out infinite alternate var(--d, 0s); }
@keyframes aFlag { from { transform: skewY(-5deg) scaleX(1); } to { transform: skewY(5deg) scaleX(.94); } }
.a-rock { transform-origin: 50% 100%; animation: aRock var(--dur, 7s) ease-in-out infinite alternate; }
@keyframes aRock { from { transform: rotate(-1.6deg) translateY(0); } to { transform: rotate(1.6deg) translateY(6px); } }
.a-bob { animation: aBob var(--dur, 8s) ease-in-out infinite alternate; }
@keyframes aBob { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
.a-wave1, .a-wave2, .a-wave3 { transform-box: view-box !important; animation: aWave 26s linear infinite; }
.a-wave2 { animation-duration: 38s; } .a-wave3 { animation-duration: 54s; }
@keyframes aWave { from { transform: translateX(0); } to { transform: translateX(-1600px); } }
.a-rise { animation: aRise 6s ease-in-out infinite alternate var(--d, 0s); }
@keyframes aRise { from { transform: translateY(26px); opacity: .55; } to { transform: translateY(0); opacity: 1; } }
.a-jump { animation: aJump 2.2s ease-in-out infinite; }
@keyframes aJump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-90px); } }
.a-rotor { transform-origin: 50% 50%; animation: aRotor .12s linear infinite; }
@keyframes aRotor { 50% { transform: scaleX(.2); } }
.a-beam { transform-box: view-box !important; animation: aBeam var(--dur, 10s) ease-in-out infinite alternate; }
@keyframes aBeam { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.a-neon { animation: aNeon 4s infinite; }
@keyframes aNeon { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .25; } }
.glitch .g1 { animation: gl1 6s steps(1) infinite; } .glitch .g2 { animation: gl1 4.3s steps(1) infinite reverse; }
@keyframes gl1 { 0%, 100% { transform: translateY(0); } 20% { transform: translateY(-160px); } 40% { transform: translateY(220px); } 60% { transform: translateY(-60px); } 80% { transform: translateY(120px); } }
html[data-motion=off] #bg *, html[data-motion=off] .tp * { animation-play-state: paused !important; }
html[data-motion=lite] #bg .grain { animation: none; }
@media (prefers-reduced-motion: reduce) { #bg .grain { animation: none; } }

/* ═══════════ القشرة ═══════════ */
#app { position: relative; z-index: 5; min-height: 100vh; }
html.gated #app { display: none; }
#view { max-width: var(--wrap); margin: 0 auto; padding: calc(var(--head) + 26px) var(--gut) 80px; min-height: 100vh; }
#view.view-in > .page { animation: pageIn .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.boot-spin { display: grid; place-items: center; min-height: 60vh; }
.page { display: flex; flex-direction: column; gap: 30px; }

#hd { position: fixed; inset-inline: 0; top: 0; z-index: 50; height: var(--head); display: flex; align-items: center; gap: 18px; padding: 0 var(--gut);
  background: linear-gradient(180deg, rgba(8, 6, 20, .92), rgba(8, 6, 20, .72)); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
#hd::after { content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--acc), var(--acc2), transparent); opacity: .55; }
html:not(.authed) #hd, html:not(.authed) #tabbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo-mark { width: 46px; height: 46px; filter: drop-shadow(0 4px 14px rgba(255, 180, 80, .35)); transition: transform .4s; }
.brand:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.brand-word { font-family: var(--fd); font-weight: 400; font-size: 34px; line-height: 1; color: #ffe2a0; text-shadow: 0 0 22px rgba(255, 190, 90, .45), 0 2px 0 rgba(0, 0, 0, .4); letter-spacing: 0; padding-top: 6px; }
.tabs { flex: 1 1 auto; display: flex; justify-content: center; gap: 6px; min-width: 0; }
.tab { position: relative; display: flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 14px; font-size: 16.5px; font-weight: 600; color: var(--ink2); transition: .25s; white-space: nowrap; }
.tab-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, .06); transition: .25s; }
.tab-ic svg { width: 21px; height: 21px; }
.tab:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.tab:hover .tab-ic { transform: translateY(-2px) rotate(-6deg); }
.tab.on { color: var(--acc-ink); background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 70%, var(--acc2))); box-shadow: 0 8px 26px -8px var(--acc), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
.tab.on .tab-ic { background: rgba(0, 0, 0, .18); color: var(--acc-ink); }
.tab--tr .tab-ic { color: #ff6b7a; } .tab--anime .tab-ic { color: #c3a6ff; } .tab--calendar .tab-ic { color: #7cc8ff; } .tab--library .tab-ic { color: #8ff0c0; } .tab--home .tab-ic { color: #ffd27a; }
.tab.on .tab-ic { color: var(--acc-ink); }
.hd-end { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hbtn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-weight: 600; font-size: 15px; transition: .2s; white-space: nowrap; }
.hbtn svg { width: 21px; height: 21px; }
.hbtn:hover { background: rgba(255, 255, 255, .12); border-color: var(--line2); transform: translateY(-1px); }
.hbtn--ico { width: 46px; padding: 0; justify-content: center; }
.hbtn--search { color: var(--ink2); min-width: 170px; }
.hbtn--search kbd { margin-inline-start: auto; font: 600 11px var(--f); padding: 2px 7px; border-radius: 7px; background: rgba(255, 255, 255, .1); color: var(--mut); direction: ltr; }
.hbtn--set { padding: 0 16px; font-size: 15.5px; }
.hbtn--crown { color: #ffd700; border-color: rgba(255, 215, 0, .35); background: rgba(255, 215, 0, .08); }
.hbtn .badge { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: var(--bad); color: #fff; font: 700 12px/21px var(--f); text-align: center; box-shadow: 0 0 0 3px #0b0820; }
#hBell.ring svg { animation: bellRing 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bellRing { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(16deg); } 80% { transform: rotate(-14deg); } 86% { transform: rotate(10deg); } 92% { transform: rotate(-6deg); } }
.me-chip { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 6px 0 16px; padding-inline: 6px 16px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: .2s; }
.me-chip:hover { background: rgba(255, 255, 255, .11); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.me-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-t b { font-size: 16.5px; font-weight: 700; max-width: 150px; white-space: nowrap; overflow: hidden; }
.me-t small { color: var(--mut); font-size: 12.5px; direction: ltr; text-align: end; }
#tabbar { display: none; }

/* ═══════════ الأزرار والمدخلات ═══════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 15.5px; white-space: nowrap; background: rgba(255, 255, 255, .08); border: 1px solid var(--line2); transition: transform .18s, box-shadow .25s, background .25s, border-color .25s; position: relative; }
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .13); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--acc { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 72%, #fff)); color: var(--acc-ink); border-color: transparent; box-shadow: 0 10px 28px -10px var(--acc); }
.btn--acc:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 90%, #fff), var(--acc)); box-shadow: 0 14px 34px -10px var(--acc); }
.btn--glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.btn--ghost { background: transparent; border-color: var(--line2); color: var(--ink2); }
.btn--danger { background: linear-gradient(135deg, #ff4060, #d81b45); color: #fff; border-color: transparent; }
.btn--lg { height: 52px; padding: 0 24px; font-size: 16.5px; border-radius: 16px; }
.btn--xl { height: 58px; padding: 0 28px; font-size: 18px; border-radius: 18px; }
.btn--sm { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 22%, transparent); color: #dfffee; }
.busy { pointer-events: none; }
.busy::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(0, 0, 0, .35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23fff' stroke-width='3' stroke-dasharray='40 20'/%3E%3C/svg%3E") center / 22px no-repeat; animation: spinBg .8s linear infinite; }
@keyframes spinBg { to { background-position: center; transform: none; } }
.favbtn.on { background: linear-gradient(135deg, #ff4d7a, #ff2e63); color: #fff; border-color: transparent; box-shadow: 0 10px 28px -10px #ff4d7a; }
.favbtn.on svg { animation: heartPop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes heartPop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); transition: .2s; }
.iconbtn:hover { background: rgba(255, 255, 255, .14); }
.iconbtn[disabled] { opacity: .35; pointer-events: none; }
.iconbtn--lg { width: 50px; height: 50px; border-radius: 15px; }
.iconbtn svg { width: 20px; height: 20px; }
.linkbtn { color: var(--acc); font-weight: 700; font-size: 14px; padding: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .09); border: 1px solid var(--line); white-space: nowrap; }
.chip svg { width: 15px; height: 15px; }
.chip--gold { background: linear-gradient(135deg, #ffcf4a, #ffa62e); color: #2a1800; border-color: transparent; font-weight: 800; }
.chip--gold small { opacity: .7; font-weight: 600; }
.chip--acc { background: color-mix(in srgb, var(--acc) 22%, transparent); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.chip--airing { background: rgba(47, 211, 138, .18); border-color: rgba(47, 211, 138, .55); color: #b8ffd9; }
.chip--ended { background: rgba(160, 160, 190, .16); }
.chip--upcoming { background: rgba(79, 168, 255, .18); border-color: rgba(79, 168, 255, .5); color: #cfe6ff; }
.chip--paused { background: rgba(255, 176, 46, .16); border-color: rgba(255, 176, 46, .5); }
.dotlive { width: 8px; height: 8px; border-radius: 50%; background: #2fd38a; box-shadow: 0 0 0 0 rgba(47, 211, 138, .7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(47, 211, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 138, 0); } }
.inp { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1.5px solid var(--line2); transition: .2s; }
.inp:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent); }
.inp input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; font-size: 15.5px; }
.inp svg { color: var(--mut); width: 19px; height: 19px; }
.inp--grow { flex: 1 1 280px; }
.fld { display: flex; flex-direction: column; gap: 8px; }
.fl { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14.5px; color: var(--ink2); }
.fl small { color: var(--mut); font-weight: 500; }
.fld > input, .fld textarea, .pw input { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; background: rgba(0, 0, 0, .32); border: 1.5px solid var(--line2); outline: 0; font-size: 16px; transition: .2s; }
.fld textarea { height: auto; padding: 12px 16px; resize: vertical; line-height: 1.7; }
.fld > input:focus, .fld textarea:focus, .pw input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent); }
input[type=time] { direction: ltr; text-align: center; font-weight: 700; color-scheme: dark; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.frow--end { justify-content: flex-end; }
.hint { color: var(--mut); font-size: 13.5px; line-height: 1.7; }
.toggle { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line2); font-weight: 700; transition: .2s; }
.toggle i { width: 46px; height: 26px; border-radius: 13px; background: rgba(255, 255, 255, .15); position: relative; transition: .25s; flex-shrink: 0; }
.toggle i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .25s; }
.toggle.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.toggle.on i { background: var(--ok); }
.toggle.on i::after { inset-inline-start: 23px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--ink2); transition: .2s; position: relative; }
.seg button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.seg button.on { background: var(--sc, var(--acc)); color: #0c0a14; box-shadow: 0 8px 22px -8px var(--sc, var(--acc)); }
.seg button em { font-style: normal; font-size: 12px; background: rgba(0, 0, 0, .2); border-radius: 8px; padding: 0 6px; }
.seg--sm button { height: 36px; padding: 0 12px; font-size: 14px; }
.seg--lg button { height: 48px; padding: 0 20px; font-size: 16px; }
.center { display: flex; justify-content: center; }

/* ═══════════ الألواح ═══════════ */
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)), var(--plate); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh); }
.ph { display: flex; align-items: center; gap: 9px; font-size: 16.5px; margin-bottom: 12px; }
.ph svg { color: var(--acc); width: 21px; height: 21px; }
.ph a { margin-inline-start: auto; font-size: 13.5px; color: var(--acc); font-weight: 700; }
.note { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: linear-gradient(90deg, rgba(255, 176, 46, .16), rgba(255, 176, 46, .04)), var(--plate); }
.note > svg { width: 30px; height: 30px; color: var(--warn); }
.note > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.note span { color: var(--ink2); font-size: 14.5px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 46px 20px; color: var(--ink2); }
.empty > svg { width: 46px; height: 46px; color: var(--acc); opacity: .85; }
.empty b { font-size: 19px; color: #fff; }
.empty--sm { padding: 26px 14px; flex-direction: row; gap: 12px; }
.empty--sm > svg { width: 26px; height: 26px; }
.empty--err > svg { color: var(--bad); }
.al-empty { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--mut); font-size: 14px; line-height: 1.7; }
.al-empty svg { width: 26px; height: 26px; color: var(--acc); flex-shrink: 0; }
.spin { width: 38px; height: 38px; margin: 26px auto; border-radius: 50%; border: 3.5px solid rgba(255, 255, 255, .12); border-top-color: var(--acc); border-inline-end-color: var(--acc2); animation: spin .8s linear infinite; }
.spin--sm { display: inline-block; width: 22px; height: 22px; margin: 0; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skl { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .14), rgba(255, 255, 255, .06)); background-size: 200% 100%; animation: skl 1.3s infinite; }
@keyframes skl { to { background-position: -200% 0; } }

/* ═══════════ الصفوف ═══════════ */
.row { display: flex; flex-direction: column; gap: 16px; }
.rh { display: flex; align-items: center; gap: 14px; }
.rh-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, var(--tone, var(--acc)), color-mix(in srgb, var(--tone, var(--acc)) 45%, #000)); box-shadow: 0 10px 24px -10px var(--tone, var(--acc)), 0 0 0 1px rgba(255, 255, 255, .2) inset; }
.rh-ic svg { width: 25px; height: 25px; }
.rh-t { display: flex; flex-direction: column; min-width: 0; }
.rh h2 { font-size: 23px; font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.rh small { color: var(--ink2); font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.rh-n { display: grid; place-items: center; min-width: 36px; height: 30px; padding: 0 10px; border-radius: 10px; background: color-mix(in srgb, var(--tone, var(--acc)) 26%, rgba(0, 0, 0, .4)); border: 1px solid color-mix(in srgb, var(--tone, var(--acc)) 60%, transparent); font-weight: 800; font-size: 14px; }
.rh > .btn { margin-inline-start: auto; }
.rg { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cw, 172px), 1fr)); gap: 18px; }
.more { align-self: center; display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 30px; border-radius: 16px; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone, var(--acc)) 30%, rgba(10, 8, 24, .85)), rgba(10, 8, 24, .85)); border: 1.5px solid color-mix(in srgb, var(--tone, var(--acc)) 70%, transparent); box-shadow: 0 10px 30px -14px var(--tone, var(--acc)); transition: .2s; }
.more:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--tone, var(--acc)) 45%, rgba(10, 8, 24, .85)); }
.more svg { transition: transform .3s; }
.more.less svg { transform: rotate(180deg); }
.pop { animation: popIn .45s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }

/* ═══════════ البطاقة ═══════════ */
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.pc { position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--acc)) 35%, #120e26), #0c0a1c); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9); transition: box-shadow .3s, border-color .3s; }
.pc img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.fb { position: absolute; inset: 0; display: grid; place-items: center; font: 400 34px var(--fd); color: rgba(255, 255, 255, .6); background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--acc)) 40%, #1a1438), #0b0920); }
img + .fb { display: none; }
.card:hover { transform: translateY(-7px); }
.card:hover .pc { border-color: color-mix(in srgb, var(--c, var(--acc)) 70%, #fff); box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .9), 0 0 0 2px color-mix(in srgb, var(--c, var(--acc)) 55%, transparent), 0 0 34px -6px color-mix(in srgb, var(--c, var(--acc)) 70%, transparent); }
.card:hover .pc img { transform: scale(1.07); }
.shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%); transform: translateX(-120%); transition: transform .8s; pointer-events: none; }
.card:hover .shine { transform: translateX(120%); }
.kmark { position: absolute; top: 8px; inset-inline-start: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; color: #fff; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .7), 0 0 0 1.5px rgba(255, 255, 255, .35) inset; z-index: 2; }
.kmark svg { width: 20px; height: 20px; }
.kmark--tr { background: linear-gradient(140deg, #ff5a6a, #c3122c); }
.kmark--anime { background: linear-gradient(140deg, #b58cff, #5b2bd6); --icon-hole: #5b2bd6; }
.rate { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: 10px; background: rgba(8, 6, 18, .82); border: 1px solid rgba(255, 207, 74, .45); color: #ffd35a; font-size: 13.5px; z-index: 2; }
.rate svg { width: 14px; height: 14px; }
.rate b { color: #fff; font-weight: 800; }
.favdot { position: absolute; top: 46px; inset-inline-start: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: #ff3d6e; color: #fff; z-index: 2; box-shadow: 0 6px 14px -4px #ff3d6e; }
.favdot svg { width: 17px; height: 17px; }
.rank { position: absolute; bottom: -6px; inset-inline-start: 6px; font: 400 64px/1 var(--fd); color: #fff; -webkit-text-stroke: 2px rgba(0, 0, 0, .55); text-shadow: 0 4px 18px rgba(0, 0, 0, .9), 0 0 24px color-mix(in srgb, var(--acc) 70%, transparent); z-index: 2; }
.epbadge { position: absolute; bottom: 8px; inset-inline-end: 8px; padding: 3px 10px; border-radius: 9px; background: var(--acc); color: var(--acc-ink); font-size: 12.5px; font-weight: 700; z-index: 2; }
.cd { position: absolute; inset-inline: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 10px; background: rgba(8, 6, 18, .86); border: 1px solid color-mix(in srgb, var(--acc) 60%, transparent); color: var(--acc); font-size: 13px; z-index: 2; }
.cd svg { width: 15px; height: 15px; }
.cd b { color: #fff; font-weight: 800; direction: rtl; }
.prog { position: absolute; inset-inline: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .55); z-index: 3; }
.prog::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); background: linear-gradient(90deg, var(--acc), var(--acc2)); box-shadow: 0 0 10px var(--acc); }
.ci { display: flex; flex-direction: column; gap: 2px; padding-inline: 3px; min-width: 0; }
.ct { text-align: right; font-size: 15.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.ci small { color: var(--ink2); font-size: 13px; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.ci .live { font-style: normal; color: #6ff0b0; font-weight: 700; }
.card .as, .card .stag { align-self: flex-start; margin-inline: 3px; padding: 3px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .1); border: 1px solid var(--line2); max-width: 100%; white-space: nowrap; overflow: hidden; }
.stag--watching { background: #4fa8ff; color: #04121f; border-color: transparent; }
.stag--done { background: #2fd38a; color: #03170d; border-color: transparent; }
.stag--plan { background: #ffb02e; color: #1f1300; border-color: transparent; }
.skc .pc { animation: skl 1.3s infinite; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); background-size: 200% 100%; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 20px; }
.grid-cards > .empty, .grid-cards > .spin { grid-column: 1 / -1; }

/* بطاقة الحلقة العريضة */
.ep { position: relative; display: block; height: 176px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); background: #0c0a1c; transition: transform .3s, box-shadow .3s; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .9); }
.ep-bg { position: absolute; inset: 0; }
.ep-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15); transition: transform .8s; }
.ep-bg .fb { font-size: 0; }
.ep::after { content: ''; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(6, 4, 16, .2) 0%, rgba(6, 4, 16, .78) 52%, rgba(6, 4, 16, .94) 100%); }
.ep-in { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; height: 100%; padding: 14px; }
.ep-poster { position: relative; width: 92px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; flex-shrink: 0; box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .9); border: 1.5px solid rgba(255, 255, 255, .25); }
.ep-poster img { width: 100%; height: 100%; object-fit: cover; }
.ep-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ep-k { display: flex; align-items: center; gap: 8px; }
.ep-k .kmark { position: static; width: 26px; height: 26px; border-radius: 9px; }
.ep-k .kmark svg { width: 16px; height: 16px; }
.ep-k em { font-style: normal; font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 8px; background: var(--ok); color: #03170d; }
.ep--up .ep-k em { background: #4fa8ff; color: #04121f; }
.ep-n { font: 400 30px/1.15 var(--fd); color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.ep-n i { font-style: normal; color: var(--acc); }
.ep-t { font-weight: 700; font-size: 15px; color: var(--ink); text-align: right; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.ep-when { display: flex; align-items: center; gap: 6px; color: var(--ink2); font-size: 13px; }
.ep-when svg { width: 15px; height: 15px; color: var(--acc); }
.ep:hover { transform: translateY(-5px); box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .95), 0 0 0 2px color-mix(in srgb, var(--c, var(--acc)) 60%, transparent); }
.ep:hover .ep-bg img { transform: scale(1.08); }

/* صفّ الترتيب */
.rk { display: grid; grid-template-columns: 54px 52px 1fr; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 16px; transition: .2s; }
.rk:hover { background: rgba(255, 255, 255, .07); }
.rk-n { font: 400 44px/1 var(--fd); text-align: center; color: transparent; -webkit-text-stroke: 1.6px color-mix(in srgb, var(--tone, var(--acc)) 85%, #fff); }
.rk:nth-child(1) .rk-n { color: #ffd35a; -webkit-text-stroke: 0; text-shadow: 0 0 18px rgba(255, 200, 70, .6); }
.rk:nth-child(2) .rk-n { color: #e2e6ef; -webkit-text-stroke: 0; }
.rk:nth-child(3) .rk-n { color: #ffab6b; -webkit-text-stroke: 0; }
.rk-p { position: relative; width: 52px; aspect-ratio: 2 / 3; border-radius: 9px; overflow: hidden; }
.rk-p img { width: 100%; height: 100%; object-fit: cover; }
.rk-p .fb { font-size: 16px; }
.rk-t { display: flex; flex-direction: column; min-width: 0; }
.rk-t b { font-size: 15.5px; text-align: right; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.rk-t small { color: var(--mut); font-size: 12.5px; }
.rk-r { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: #ffd35a; font-weight: 800; }
.rk-r svg { width: 14px; height: 14px; }
.rk-r b { color: #fff; }
.mini { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; width: 100%; text-align: start; transition: .2s; position: relative; }
.mini:hover { background: rgba(255, 255, 255, .08); }
.mini-p { position: relative; width: 46px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.mini-p img { width: 100%; height: 100%; object-fit: cover; }
.mini-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mini-t b { text-align: right; }
.mini-t small { color: var(--mut); }
.mini .kmark { position: static; width: 28px; height: 28px; }

/* ═══════════ الإشعارات المنبثقة ═══════════ */
#toasts { position: fixed; top: calc(var(--head) + 14px); inset-inline-start: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; overflow: hidden; pointer-events: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent), rgba(14, 10, 32, .96); border: 1.5px solid color-mix(in srgb, var(--tc, var(--ok)) 65%, transparent); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .9), 0 0 24px -8px var(--tc, var(--ok));
  transform: translateX(40px) scale(.96); opacity: 0; transition: transform .38s cubic-bezier(.2, .9, .3, 1.2), opacity .3s; }
.toast.in { transform: none !important; opacity: 1; }
.toast.out { opacity: 0; transform: translateY(-10px) scale(.96) !important; }
.toast--ok { --tc: #2fd38a; } .toast--err { --tc: #ff4060; } .toast--info { --tc: #4fa8ff; } .toast--ep { --tc: var(--acc); }
.toast--click { cursor: pointer; }
.toast img { width: 48px; height: 64px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.toast .ti { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--tc); color: #0a0a14; flex-shrink: 0; }
.toast .ti svg { width: 22px; height: 22px; }
.toast .tx { display: flex; flex-direction: column; min-width: 0; font-size: 14.5px; }
.toast .tx b { font-size: 15px; color: #fff; }
.toast .tx span { color: var(--ink2); }
.toast .tbar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--tc); transform-origin: right; animation: tbar var(--ms) linear forwards; }
@keyframes tbar { to { transform: scaleX(0); } }

/* ═══════════ النوافذ ═══════════ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.m-back { position: absolute; inset: 0; background: rgba(4, 3, 12, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.m-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 26px; background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 40%), var(--plate3); border: 1px solid var(--line2); box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(255, 255, 255, .04) inset; transform: translateY(24px) scale(.96); opacity: 0; transition: transform .32s cubic-bezier(.2, .9, .3, 1.15), opacity .25s; }
.m-box--wide { width: min(980px, 100%); }
.modal.in .m-back { opacity: 1; }
.modal.in .m-box { transform: none; opacity: 1; }
.m-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 18px 22px; background: rgba(24, 18, 52, .96); border-bottom: 1px solid var(--line); }
.m-head h3 { flex: 1; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.m-head h3 svg { color: var(--acc); }
.m-x--float { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 5; background: rgba(0, 0, 0, .55); }
.m-body { padding: 22px; }
.m-ask .m-box { width: min(440px, 100%); }
.ask-t { font-size: 17px; font-weight: 600; margin-bottom: 20px; line-height: 1.8; }
.ask-row { display: flex; gap: 10px; }
.ask-row .btn { flex: 1; }
/* المشغّل */
.m-player .m-box { width: min(1180px, 100%); background: #000; }
.m-player .m-body { padding: 0; }
.pl-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pl-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pl-blocked { position: absolute; inset: 0; display: grid; place-items: center; background-size: cover; background-position: center; }
.pl-blocked > div { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px; border-radius: 20px; background: rgba(0, 0, 0, .78); text-align: center; }
.pl-cap { display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: var(--plate3); }
.pl-cap > div { flex: 1; display: flex; flex-direction: column; }
.pl-cap small { color: var(--ink2); }
/* وش أشوف الليلة */
.m-tonight .m-box { width: min(760px, 100%); }
.tn { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; }
.tn-slot { position: relative; aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden; border: 2px solid var(--acc); box-shadow: 0 0 40px -10px var(--acc); }
.tn-reel { position: absolute; inset-inline: 0; top: 0; }
.tn-face { position: relative; aspect-ratio: 2 / 3; }
.tn-face img { width: 100%; height: 100%; object-fit: cover; }
.tn-reel.go { animation: reel .9s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes reel { from { transform: translateY(0); } to { transform: translateY(-87.5%); } }
.tn-info { display: flex; flex-direction: column; gap: 12px; }
.tn-k { display: flex; align-items: center; gap: 8px; color: var(--acc); font-weight: 700; }
.tn-k .kmark { position: static; }
.tn-info h3 { font: 400 36px/1.2 var(--fd); }
.tn-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ═══════════ اللوحة المربّعة ═══════════ */
.picker { position: fixed; z-index: 260; width: min(420px, calc(100vw - 20px)); max-height: min(70vh, 560px); overflow: auto; padding: 14px; border-radius: 20px; background: var(--plate3); border: 1px solid var(--line2); box-shadow: 0 30px 70px -20px #000; opacity: 0; transform: translateY(-8px) scale(.97); transition: .18s; }
.picker--wide { width: min(720px, calc(100vw - 20px)); }
.picker.in { opacity: 1; transform: none; }
.pk-h { font-weight: 800; margin-bottom: 10px; color: var(--acc); }
.pk-g { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 8px; }
.pk-o { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line); font-weight: 700; text-align: center; transition: .15s; }
.pk-o:hover { background: rgba(255, 255, 255, .12); border-color: var(--line2); }
.pk-o small { color: var(--mut); font-size: 12px; }
.pk-o.on { background: color-mix(in srgb, var(--oc, var(--acc)) 26%, transparent); border-color: var(--oc, var(--acc)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oc, var(--acc)) 25%, transparent); }
.pk-o em { position: absolute; top: -8px; inset-inline-end: -4px; font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 7px; background: var(--oc, var(--acc)); color: #0c0a14; font-weight: 800; }
.pk-o .tp { width: 100%; }
.pk-o .sw { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) inset; }

/* ═══════════ الصورة الشخصية والألقاب ═══════════ */
.av { position: relative; display: inline-grid; place-items: center; width: var(--av); height: var(--av); flex-shrink: 0; }
.av-in { position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(135deg, var(--acc), var(--acc2)); display: grid; place-items: center; }
.av-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.av-in .fb { position: static; background: none; font-size: calc(var(--av) * .44); color: #fff; }
.av-in img + .fb { display: none; }
.av--circle .av-in { border-radius: 50%; }
.av--square .av-in { border-radius: 14%; }
.av--round .av-in { border-radius: 30%; }
.av--hex .av-in { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.av--diamond .av-in { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.av--shield .av-in { clip-path: polygon(50% 0, 96% 14%, 92% 62%, 50% 100%, 8% 62%, 4% 14%); }
/* الحلقة اللي تلفّ الصورة بلون اللقب */
.av--ring::before { content: ''; position: absolute; inset: calc(var(--av) * -.07); border-radius: inherit; background: conic-gradient(from var(--rot, 0deg), var(--t1), var(--t2), var(--t3), var(--t1)); animation: avRing 5s linear infinite; z-index: -1; }
.av--ring.av--circle::before { border-radius: 50%; }
.av--ring.av--square::before { border-radius: 18%; }
.av--ring.av--round::before { border-radius: 34%; }
.av--ring.av--hex::before { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.av--ring.av--diamond::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.av--ring.av--shield::before { clip-path: polygon(50% 0, 96% 14%, 92% 62%, 50% 100%, 8% 62%, 4% 14%); }
.av { isolation: isolate; }
@property --rot { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes avRing { to { --rot: 360deg; } }
.ts--royal { --t1: #fff1b8; --t2: #ffc23a; --t3: #b8740c; }
.ts--fire { --t1: #ffe08a; --t2: #ff6a2a; --t3: #c3121e; }
.ts--ice { --t1: #ffffff; --t2: #8fdcff; --t3: #3a7bff; }
.ts--neon { --t1: #19f0ff; --t2: #ff2bd6; --t3: #8a5cff; }
.ts--shadow { --t1: #d4b8ff; --t2: #7b3dff; --t3: #1a0b3a; }
.ts--blood { --t1: #ff9a9a; --t2: #e3122c; --t3: #4a0510; }
.ts--leaf { --t1: #caffde; --t2: #2ee59d; --t3: #0b6a42; }
.ts--plain { --t1: var(--acc); --t2: var(--acc2); --t3: var(--acc); }
.tbadge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 800; white-space: nowrap; color: #160d02;
  background: linear-gradient(110deg, var(--t3), var(--t2) 30%, var(--t1) 50%, var(--t2) 70%, var(--t3)); background-size: 220% 100%; animation: tShine 4s linear infinite; box-shadow: 0 4px 14px -4px var(--t2), 0 0 0 1px rgba(255, 255, 255, .3) inset; }
.tbadge svg { width: 15px; height: 15px; }
.tbadge.ts--shadow, .tbadge.ts--blood, .tbadge.ts--neon { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
@keyframes tShine { to { background-position: -220% 0; } }
.tbadge--xs { height: 21px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; }
.tbadge--xs svg { width: 12px; height: 12px; }
.owner-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 9px; font-size: 12px; font-weight: 900; letter-spacing: 1px; color: #2a1800; background: linear-gradient(135deg, #fff3b0, #ffc23a); vertical-align: middle; }
.ban-tag { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 7px; background: var(--bad); color: #fff; }

/* ═══════════ صندوق التنبيهات ═══════════ */
.inbox { position: fixed; z-index: 240; max-height: min(72vh, 620px); display: flex; flex-direction: column; border-radius: 22px; background: var(--plate3); border: 1px solid var(--line2); box-shadow: 0 30px 70px -20px #000; opacity: 0; transform: translateY(-8px); transition: .2s; overflow: hidden; }
.inbox.in { opacity: 1; transform: none; }
.ib-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ib-h b { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.ib-h b svg { color: var(--acc); }
.ib-l { overflow: auto; padding: 8px; }
.ib-i { position: relative; display: flex; gap: 12px; padding: 10px; border-radius: 16px; transition: .15s; }
.ib-i:hover { background: rgba(255, 255, 255, .07); }
.ib-i.new { background: color-mix(in srgb, var(--acc) 10%, transparent); }
.ib-p { position: relative; width: 74px; height: 50px; border-radius: 11px; overflow: hidden; flex-shrink: 0; background: rgba(255, 255, 255, .08); }
.ib-p img { width: 100%; height: 100%; object-fit: cover; }
.ib-k { position: absolute; bottom: 3px; inset-inline-start: 3px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: #fff; }
.ib-k svg { width: 14px; height: 14px; }
.ib-k--episode { background: var(--tr); } .ib-k--trailer { background: var(--acc); color: var(--acc-ink); } .ib-k--system { background: #4fa8ff; }
.ib-t { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.ib-t b { font-size: 14.5px; }
.ib-t span { color: var(--ink2); }
.ib-t small { color: var(--mut); }
.ib-dot { position: absolute; top: 14px; inset-inline-end: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }

/* ═══════════ المؤشّر ═══════════ */
#cur-dot, #cur-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none; will-change: transform; }
#cur-trail { position: fixed; inset: 0; z-index: 9998; pointer-events: none; display: none; }
html.cur-live[data-cursor=ring] #cur-dot, html.cur-live[data-cursor=ring] #cur-ring, html.cur-live[data-cursor=glow] #cur-dot, html.cur-live[data-cursor=glow] #cur-ring, html.cur-live[data-cursor=blade] #cur-dot { display: block; }
html[data-cursor=blade] #cur-trail { display: block; }
html.cur-live[data-cursor=ring], html.cur-live[data-cursor=ring] *, html.cur-live[data-cursor=glow], html.cur-live[data-cursor=glow] *, html.cur-live[data-cursor=blade], html.cur-live[data-cursor=blade] * { cursor: none !important; }
html[data-cursor] input, html[data-cursor] textarea { cursor: text !important; }
#cur-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc), 0 0 2px #fff; }
#cur-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--acc) 80%, #fff); transition: width .2s, height .2s, margin .2s, border-color .2s, background .2s, transform .06s linear; }
html.cur-hover #cur-ring { border-color: var(--acc2); background: color-mix(in srgb, var(--acc2) 14%, transparent); }
html[data-cursor=glow] #cur-ring { width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 0; background: radial-gradient(circle, color-mix(in srgb, var(--acc) 45%, transparent), transparent 65%); mix-blend-mode: screen; }
html[data-cursor=blade] #cur-dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; box-shadow: 0 0 14px var(--acc), 0 0 4px var(--acc); }
html.cur-down #cur-dot { transform-origin: center; }

/* ═══════════ البوّابة ═══════════ */
#gate { position: fixed; inset: 0; z-index: 100; overflow: auto; display: grid; place-items: center; padding: 30px 20px; }
.g-wrap { display: grid; grid-template-columns: 1fr minmax(380px, 470px); align-items: center; gap: 60px; width: min(1100px, 100%); }
.g-brand { display: flex; flex-direction: column; gap: 16px; animation: gIn .9s cubic-bezier(.2, .8, .2, 1) both; }
.g-logo .logo-mark { width: 110px; height: 110px; animation: logoFloat 5s ease-in-out infinite; filter: drop-shadow(0 10px 40px rgba(255, 180, 80, .55)); }
@keyframes logoFloat { 50% { transform: translateY(-10px) rotate(-6deg); } }
.g-brand .brand-word { font-size: 110px; line-height: .9; padding: 0; }
.g-brand p { font-size: 20px; color: var(--ink2); max-width: 470px; line-height: 1.8; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.g-feats { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-feats li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; }
.g-feats svg { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--acc); border: 1px solid var(--line2); }
.g-card { position: relative; padding: 30px; border-radius: 30px; background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)), rgba(12, 9, 30, .86); border: 1px solid var(--line2); box-shadow: 0 40px 90px -30px #000, 0 0 60px -30px var(--acc); animation: gIn .9s .12s cubic-bezier(.2, .8, .2, 1) both; backdrop-filter: blur(14px); }
.g-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--acc), transparent 35%, transparent 65%, var(--acc2)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes gIn { from { opacity: 0; transform: translateY(26px) scale(.97); } }
.g-card.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.g-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 18px; background: rgba(0, 0, 0, .35); margin-bottom: 24px; }
.g-tabs button { position: relative; z-index: 1; height: 48px; border-radius: 14px; font-weight: 700; font-size: 16px; color: var(--ink2); transition: color .3s; }
.g-tabs button.on { color: var(--acc-ink); }
.g-ink { position: absolute; top: 5px; bottom: 5px; inset-inline-start: 5px; width: calc(50% - 5px); border-radius: 14px; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 70%, var(--acc2))); box-shadow: 0 8px 22px -8px var(--acc); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.g-tabs[data-at=signup] .g-ink { transform: translateX(-100%); }
.g-form { display: none; flex-direction: column; gap: 18px; }
.g-form.on { display: flex; animation: gIn .4s both; }
.g-form .fld > input, .pw input { height: 56px; font-size: 17px; letter-spacing: .5px; }
.pw { position: relative; display: block; }
.pw input { padding-inline-end: 52px; }
.eye { position: absolute; top: 50%; inset-inline-end: 8px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--mut); }
.eye:hover { color: #fff; background: rgba(255, 255, 255, .08); }
/* شريط اسم المستخدم: خطّ ناعم برأس مضيء */
.ubar { position: relative; display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); margin-top: -2px; }
.ubar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--p, 0) * 100%); border-radius: 4px; background: linear-gradient(90deg, var(--acc2), var(--acc)); transition: width .25s cubic-bezier(.3, 1.3, .5, 1); }
.ubar i::after { content: ''; position: absolute; inset-inline-end: -5px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--acc), 0 0 4px #fff; opacity: calc(var(--p, 0) * 40); }
.ubar.full i { background: linear-gradient(90deg, #ff9a3c, #ff4060); animation: ufull .8s ease-in-out infinite alternate; }
@keyframes ufull { to { filter: brightness(1.5); } }
/* شريط كلمة السر: ٣٠ خانة تولّع وحدة وحدة ولونها يتدرّج */
.pbar { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; direction: ltr; margin-top: 2px; }
.pbar i { height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .08); transition: background .2s, box-shadow .2s; }
.pbar i.on { background: hsl(calc(260 - var(--k, 0) * 9) 90% 64%); box-shadow: 0 0 8px hsl(calc(260 - var(--k, 0) * 9) 90% 60% / .8); }
.pbar i.pop { animation: segPop .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes segPop { from { transform: scaleY(2.2); } }
.pbar.full i { animation: segFull 1s ease-in-out infinite alternate; }
@keyframes segFull { to { box-shadow: 0 0 16px #fff; } }
.pbar--sm i { height: 6px; }
.pbar i:nth-child(1) { --k: 0 } .pbar i:nth-child(2) { --k: 1 } .pbar i:nth-child(3) { --k: 2 } .pbar i:nth-child(4) { --k: 3 } .pbar i:nth-child(5) { --k: 4 } .pbar i:nth-child(6) { --k: 5 } .pbar i:nth-child(7) { --k: 6 } .pbar i:nth-child(8) { --k: 7 } .pbar i:nth-child(9) { --k: 8 } .pbar i:nth-child(10) { --k: 9 }
.pbar i:nth-child(11) { --k: 10 } .pbar i:nth-child(12) { --k: 11 } .pbar i:nth-child(13) { --k: 12 } .pbar i:nth-child(14) { --k: 13 } .pbar i:nth-child(15) { --k: 14 } .pbar i:nth-child(16) { --k: 15 } .pbar i:nth-child(17) { --k: 16 } .pbar i:nth-child(18) { --k: 17 } .pbar i:nth-child(19) { --k: 18 } .pbar i:nth-child(20) { --k: 19 }
.pbar i:nth-child(21) { --k: 20 } .pbar i:nth-child(22) { --k: 21 } .pbar i:nth-child(23) { --k: 22 } .pbar i:nth-child(24) { --k: 23 } .pbar i:nth-child(25) { --k: 24 } .pbar i:nth-child(26) { --k: 25 } .pbar i:nth-child(27) { --k: 26 } .pbar i:nth-child(28) { --k: 27 } .pbar i:nth-child(29) { --k: 28 } .pbar i:nth-child(30) { --k: 29 }
.g-err { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 64, 96, .16); border: 1.5px solid rgba(255, 64, 96, .6); color: #ffd6de; font-weight: 600; }
.g-err svg { color: var(--bad); width: 22px; height: 22px; }
.g-go { margin-top: 4px; }
.g-go svg { transition: transform .25s; }
.g-go:hover svg { transform: translateX(-5px); }
.g-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--mut); font-size: 13.5px; }
/* حركة الدخول (< ثانية) */
#gate.leaving .g-card { animation: gOut .4s cubic-bezier(.6, 0, .8, .4) forwards; }
#gate.leaving .g-brand { animation: gOut .4s .04s cubic-bezier(.6, 0, .8, .4) forwards; }
@keyframes gOut { to { opacity: 0; transform: scale(.88) translateY(-12px); filter: blur(6px); } }
.warp { position: fixed; inset: 0; z-index: 400; pointer-events: none; display: grid; place-items: center; }
.warp i { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--acc) 40%, transparent 70%); animation: warp .95s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes warp { 0% { transform: scale(0); opacity: 1; } 45% { opacity: .9; } 100% { transform: scale(160); opacity: 0; } }
