/* QALMAQAL — gecə karnavalı arenası: qalın konturlar, şirəli düymələr, neon ziyalar.
   Layout: tam ekran oyun; menyular 3D səhnənin üstündə üzən kartlar kimi. */
:root {
  --ink: #1a0f33;
  --night: #160c3a;
  --deep: #24135e;
  --violet: #3b1f9e;
  --panel: #2a1868;
  --panel-hi: #3d26a0;
  --line: #5a43c4;
  --gold: #ffcc1f;
  --gold-dk: #e08a00;
  --sky: #2ec8ff;
  --sky-dk: #1477d6;
  --mint: #34f0a0;
  --mint-dk: #0f9e60;
  --hot: #ff3d71;
  --hot-dk: #c2124a;
  --pink: #ff4fd8;
  --text: #ffffff;
  --muted: #c4b8ff;
  --ally: #3ab4ff;
  --enemy: #ff4b5c;
  --self: #5dff6a;
  --font: 'Baloo 2', 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --stroke: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 1.5px 1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 0 4px 0 var(--ink);
  --stroke-sm: 0 1.5px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 0 -1.5px 0 var(--ink), 0 3px 0 var(--ink);
  --pad-l: max(16px, env(safe-area-inset-left, 0px));
  --pad-r: max(16px, env(safe-area-inset-right, 0px));
  --pad-t: max(12px, env(safe-area-inset-top, 0px));
  --pad-b: max(12px, env(safe-area-inset-bottom, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: radial-gradient(120% 90% at 50% 42%, #5a2ad0 0%, #2b1474 42%, #140a35 82%) fixed, var(--night);
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* iOS: uzun basanda menyu/böyüdücü çıxmasın */
  -webkit-text-size-adjust: 100%;
  touch-action: none;
  overscroll-behavior: none;
}
/* iOS WebKit-də user-select irsən keçir — yazı sahələri kilidlənməsin */
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; touch-action: manipulation; }
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
button:disabled { cursor: default; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.ico { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; }
.ico svg, .mb-ico svg { width: 100%; height: 100%; }
svg { display: block; }

/* ---------- Fon ---------- */
#bgFx { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-rays {
  position: absolute; left: 50%; top: 44%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.055) 0deg 9deg, transparent 9deg 22.5deg);
  animation: spin 90s linear infinite;
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
}
.bg-stripes {
  position: absolute; inset: -50%;
  background: repeating-linear-gradient(135deg, rgba(255, 79, 216, 0.06) 0 22px, transparent 22px 64px);
  animation: slide 14s linear infinite;
}
.bg-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(2px 2px at 78% 12%, #ffe9a8, transparent),
    radial-gradient(1.5px 1.5px at 33% 72%, #fff, transparent), radial-gradient(2px 2px at 88% 64%, #a8f0ff, transparent),
    radial-gradient(1.5px 1.5px at 58% 28%, #fff, transparent), radial-gradient(2.5px 2.5px at 22% 48%, #ffd0f4, transparent),
    radial-gradient(1.5px 1.5px at 68% 86%, #fff, transparent), radial-gradient(2px 2px at 45% 9%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes slide { to { transform: translate(64px, 64px); } }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }
body[data-screen="scrGame"] #bgFx, body[data-screen="scrResult"] #bgFx { display: none; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; touch-action: none; }
#app { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.screen { position: absolute; inset: 0; display: none; pointer-events: none; }
.screen.on { display: block; animation: scrIn 0.28s cubic-bezier(.2, .8, .3, 1.2); }
.screen.on > * { pointer-events: auto; }
@keyframes scrIn { from { opacity: 0; transform: scale(1.03); } }

/* ---------- Düymələr ---------- */
.btn {
  --b1: #4fd2ff; --b2: #1a8ae6;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 20px;
  font: 800 18px/1 var(--font); letter-spacing: 0.02em; color: #fff; text-shadow: var(--stroke-sm);
  background: linear-gradient(180deg, var(--b1), var(--b2));
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 4px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 1px 0 var(--ink); }
.btn:disabled { filter: grayscale(0.8) brightness(0.75); }
.btn.gold { --b1: #ffe766; --b2: #ffb000; }
.btn.green { --b1: #6dff9e; --b2: #14b865; }
.btn.red { --b1: #ff7a98; --b2: #e0204f; }
.btn.ghost { --b1: #5b46c9; --b2: #3a2794; }
.btn.sm { min-height: 36px; padding: 4px 14px; font-size: 15px; border-radius: 11px; }
.btn.big { min-height: 58px; padding: 10px 34px; font-size: 24px; }
.btn .pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 9px; background: rgba(0, 0, 0, 0.25); font-size: 15px; }
.btn .pill svg { width: 18px; height: 18px; }
.btn svg { width: 20px; height: 20px; }
.btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center; padding: 7px;
  background: linear-gradient(180deg, #5b46c9, #3a2794); border: 3px solid var(--ink); border-radius: 13px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 3px 0 var(--ink);
}
.icon-btn:active { transform: translateY(2px); }
.back-btn {
  width: 48px; height: 48px; display: grid; place-items: center; padding: 10px; flex: none;
  background: linear-gradient(180deg, #ff7a98, #e0204f); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 var(--ink);
}
.back-btn:active { transform: translateY(2px); }

/* ---------- Yükləmə ---------- */
#scrLoading { background: radial-gradient(circle at 50% 45%, #4b22b8, #160c3a 75%); display: none; }
#scrLoading.on { display: grid; place-items: center; }
.load-wrap { text-align: center; padding-inline: var(--pad-l) var(--pad-r); }
.logo { margin: 0; font-size: clamp(54px, 12vw, 128px); line-height: 0.9; font-weight: 800; letter-spacing: 0.01em; display: flex; justify-content: center; }
.logo span {
  display: inline-block; color: var(--gold);
  text-shadow: 0 4px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 -4px 0 var(--ink), 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink), 0 10px 0 var(--ink), 0 14px 18px rgba(0, 0, 0, 0.5);
  animation: letter 1.4s cubic-bezier(.3, 1.6, .5, 1) both;
}
.logo span:nth-child(even) { color: #ff6fd8; }
.logo span:nth-child(1) { animation-delay: 0s; } .logo span:nth-child(2) { animation-delay: .05s; }
.logo span:nth-child(3) { animation-delay: .1s; } .logo span:nth-child(4) { animation-delay: .15s; }
.logo span:nth-child(5) { animation-delay: .2s; } .logo span:nth-child(6) { animation-delay: .25s; }
.logo span:nth-child(7) { animation-delay: .3s; } .logo span:nth-child(8) { animation-delay: .35s; }
@keyframes letter { 0% { transform: translateY(-80px) scale(0.3) rotate(-20deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.logo-sub { font-size: clamp(18px, 3vw, 28px); font-weight: 800; letter-spacing: 0.6em; padding-left: 0.6em; color: #9ff3ff; text-shadow: var(--stroke-sm); margin-top: 8px; }
.load-bar { width: min(360px, 80vw); height: 22px; margin: 34px auto 12px; border: 3px solid var(--ink); border-radius: 12px; background: #2a1868; overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe766, #ffb000); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5); transition: width 0.3s; }
.load-tip { color: var(--muted); font-size: 16px; margin: 0; }
.load-err { color: #ff8a9a; }

/* ---------- Lobbi ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: var(--pad-t) var(--pad-r) 0 var(--pad-l);
}
.profile {
  display: flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; min-width: 0;
  background: linear-gradient(180deg, rgba(61, 38, 160, 0.95), rgba(42, 24, 104, 0.95)); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 3px 0 var(--ink);
}
.profile img { width: 46px; height: 46px; border-radius: 11px; border: 3px solid var(--ink); background: radial-gradient(circle at 50% 35%, #7a5cff, #2a1868); object-fit: cover; }
.pf-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; min-width: 0; }
.pf-txt > b { font-size: 17px; font-weight: 800; text-shadow: var(--stroke-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.pf-tr { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
.pf-tr .ico { width: 20px; height: 20px; }
.currencies { display: flex; align-items: center; gap: 8px; }
.cur {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 4px; min-width: 96px;
  background: rgba(26, 15, 51, 0.82); border: 3px solid var(--ink); border-radius: 13px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.cur .ico { width: 30px; height: 30px; margin-left: -12px; filter: drop-shadow(0 2px 0 var(--ink)); }
.cur b { font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
.bump { animation: bump 0.4s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 40% { transform: scale(1.25); } }

.side-menu {
  position: absolute; left: var(--pad-l); top: 50%; transform: translateY(-46%);
  display: flex; flex-direction: column; gap: 10px;
}
.menu-btn {
  position: relative; display: flex; align-items: center; gap: 10px; width: 188px; height: 58px; padding: 0 14px 0 8px;
  background: linear-gradient(180deg, rgba(76, 52, 196, 0.96), rgba(46, 27, 122, 0.96)); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 4px 0 var(--ink);
  transition: transform 0.1s;
  font-size: 17px; font-weight: 800; text-shadow: var(--stroke-sm);
}
.menu-btn:hover { transform: translateX(4px); }
.menu-btn:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 0 var(--ink); }
.mb-ico { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.3)); }
.menu-btn.glow { animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 4px 0 var(--ink), 0 0 22px 4px rgba(255, 204, 31, 0.6); } }
.badge {
  position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center;
  font: 800 15px/1 var(--font); font-style: normal; color: #fff; text-shadow: var(--stroke-sm);
  background: linear-gradient(180deg, #ff6b8b, #e3164a); border: 3px solid var(--ink); border-radius: 13px;
  animation: badge 1.8s ease-in-out infinite;
}
@keyframes badge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.pass-chip {
  position: absolute; right: var(--pad-r); top: calc(var(--pad-t) + 64px);
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 79, 216, 0.9), rgba(160, 30, 150, 0.92)); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 4px 0 var(--ink);
}
.pc-ring {
  --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--ink);
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), #3a1150 0);
}
.pc-ring b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); font-size: 17px; font-weight: 800; }
.pc-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-shadow: var(--stroke-sm); }
.pc-txt b { font-size: 16px; font-weight: 800; }
.pc-txt small { font-size: 13px; color: #ffe0f8; }

.hero-plate {
  position: absolute; left: 50%; bottom: 11vh; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center;
  padding: 4px 22px 8px; border-radius: 18px; transition: transform 0.15s;
}
.hero-plate:hover { transform: translateX(-50%) scale(1.04); }
.hp-rar { --rc: #8fd3ff; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); background: var(--rc); border: 2.5px solid var(--ink); border-radius: 9px; padding: 1px 10px; }
.hp-name { font-size: clamp(34px, 5vw, 50px); font-weight: 800; line-height: 1; margin-top: 4px; text-shadow: var(--stroke); }
.hp-title { font-size: 16px; color: var(--muted); text-shadow: var(--stroke-sm); }
.hp-meta { display: flex; gap: 10px; margin-top: 6px; }
.hp-tr, .hp-lvl { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px; border: 3px solid var(--ink); border-radius: 11px; font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm); }
.hp-tr { background: rgba(26, 15, 51, 0.85); color: var(--gold); }
.hp-tr .ico { width: 20px; height: 20px; }
.hp-lvl { background: linear-gradient(180deg, #8f6bff, #5b3fd6); }

.tok-wrap { position: absolute; left: var(--pad-l); bottom: var(--pad-b); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tok-bar { display: flex; align-items: center; gap: 4px; }
.tok-bar > .ico { width: 54px; height: 54px; z-index: 1; filter: drop-shadow(0 3px 0 var(--ink)); animation: chestBob 2.2s ease-in-out infinite; }
@keyframes chestBob { 50% { transform: translateY(-4px) rotate(-4deg); } }
.tok-track { position: relative; width: 170px; height: 28px; margin-left: -18px; border: 3px solid var(--ink); border-radius: 0 12px 12px 0; background: rgba(26, 15, 51, 0.85); overflow: hidden; }
.tok-track i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #7fe0ff, #1f9de6); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45); transition: width 0.6s; }
.tok-track b { position: relative; display: block; text-align: center; font-size: 15px; font-weight: 800; line-height: 22px; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; padding-left: 12px; }
.first-win { font-size: 14px; color: #c4f7ff; text-shadow: var(--stroke-sm); padding-left: 4px; }
.first-win b { color: var(--gold); }

.play-zone { position: absolute; right: var(--pad-r); bottom: var(--pad-b); display: flex; align-items: stretch; gap: 12px; }
.mode-card {
  --mc: #ff4f6d;
  position: relative; display: flex; align-items: center; gap: 10px; width: 250px; padding: 8px 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 72%, #fff 0%), color-mix(in srgb, var(--mc) 55%, #1a0f33));
  border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.3), inset 0 -5px 0 rgba(0, 0, 0, 0.2), 0 5px 0 var(--ink);
  text-align: left; transition: transform 0.1s;
}
.mode-card:active { transform: translateY(3px); }
.mode-card > .ico { width: 54px; height: 54px; filter: drop-shadow(0 3px 0 rgba(26, 15, 51, 0.6)); }
.mc-txt { display: flex; flex-direction: column; line-height: 1.05; flex: 1; min-width: 0; }
.mc-txt b { font-size: 20px; font-weight: 800; text-shadow: var(--stroke-sm); }
.mc-txt small { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1.5px 0 var(--ink); }
.mc-change { position: absolute; right: 8px; top: -14px; font-size: 13px; font-weight: 800; padding: 1px 10px; background: var(--ink); border-radius: 9px; color: #fff; }
.mc-day-flag { position: absolute; left: -10px; top: -14px; font-size: 14px; font-weight: 800; padding: 2px 9px; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); border-radius: 10px; transform: rotate(-8deg); animation: badge 1.6s infinite; }
.btn-play {
  position: relative; overflow: hidden; width: 210px; min-height: 92px;
  font: 800 44px/1 var(--font); letter-spacing: 0.04em; color: #fff; text-shadow: var(--stroke);
  background: linear-gradient(180deg, #ffef7a 0%, #ffc300 50%, #ff9d00 100%);
  border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: inset 0 -8px 0 rgba(176, 80, 0, 0.45), inset 0 4px 0 rgba(255, 255, 255, 0.6), 0 7px 0 var(--ink), 0 0 40px rgba(255, 200, 30, 0.45);
  animation: playGlow 2s ease-in-out infinite;
  transition: transform 0.08s;
}
.btn-play::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 50%; left: -70%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg); animation: shine 3.2s ease-in-out infinite;
}
.btn-play span { position: relative; z-index: 1; }
.btn-play:active { transform: translateY(5px); box-shadow: inset 0 -4px 0 rgba(176, 80, 0, 0.45), inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 2px 0 var(--ink); }
@keyframes shine { 0%, 55% { left: -70%; } 85%, 100% { left: 130%; } }
@keyframes playGlow { 50% { box-shadow: inset 0 -8px 0 rgba(176, 80, 0, 0.45), inset 0 4px 0 rgba(255, 255, 255, 0.6), 0 7px 0 var(--ink), 0 0 64px rgba(255, 200, 30, 0.75); } }

.streak-chip { position: absolute; right: 0; bottom: calc(100% + 12px); display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; background: linear-gradient(180deg, #ff9a3d, #e0451f); border: 3px solid var(--ink); border-radius: 13px; box-shadow: 0 3px 0 var(--ink); text-shadow: var(--stroke-sm); white-space: nowrap; animation: badge 1.6s ease-in-out infinite; }
.streak-chip svg { width: 24px; height: 24px; }
.streak-chip b { font-size: 15px; font-weight: 800; }
.streak-chip span { font-size: 13px; color: #fff3d6; }
.rx.next { background: rgba(255, 204, 31, 0.16); border-color: var(--gold); animation-delay: 1.5s; }

/* ---------- Panel ekranları ---------- */
.panel-screen { background: radial-gradient(120% 80% at 50% 0%, #34197f, #1a0d45 60%, #140a35); display: none; }
.panel-screen.on { display: flex; flex-direction: column; }
.ps-head { display: flex; align-items: center; gap: 14px; padding: var(--pad-t) var(--pad-r) 10px var(--pad-l); flex: none; }
.ps-head h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; text-shadow: var(--stroke); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-head h2 small { font-size: 0.6em; color: var(--muted); }
.ps-right { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); }
.ps-right .ico { width: 28px; height: 28px; }
.ps-right.ends { font-size: 16px; color: #ffd6f6; }
.ps-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px var(--pad-r) var(--pad-b) var(--pad-l); touch-action: pan-y; }
.ps-foot { margin: 0; padding: 8px var(--pad-r) var(--pad-b) var(--pad-l); color: var(--muted); font-size: 15px; text-align: center; }

/* Qəhrəman şəbəkəsi */
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; padding: 6px 0 20px; }
.hcard {
  --rc: #8fd3ff; position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 0 10px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 55%, #2a1868), #2a1868 70%);
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 5px 0 var(--ink);
  transition: transform 0.12s;
}
.hcard:hover { transform: translateY(-4px) rotate(-1deg); }
.hcard.sel { outline: 4px solid var(--gold); outline-offset: 2px; }
.hc-img { width: 100%; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.35), transparent 65%); }
.hc-img img { width: 100%; height: 100%; object-fit: cover; }
.hc-rar { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--rc); border: 2px solid var(--ink); border-radius: 7px; padding: 0 6px; }
.hc-name { font-size: 22px; font-weight: 800; text-shadow: var(--stroke-sm); margin-top: -6px; }
.hc-meta { display: flex; gap: 8px; font-size: 14px; font-weight: 800; }
.hc-meta span { display: inline-flex; align-items: center; gap: 3px; }
.hc-meta svg { width: 18px; height: 18px; }
.hc-tr { color: var(--gold); text-shadow: var(--stroke-sm); }
.hc-lvl { background: var(--ink); border-radius: 7px; padding: 0 7px; }
.hc-meta.locked { color: var(--gold); text-shadow: var(--stroke-sm); align-items: center; gap: 4px; }
.hcard.locked .hc-img img { filter: brightness(0) drop-shadow(0 0 2px rgba(255, 255, 255, 0.4)); opacity: 0.7; }
.hcard.locked { background: linear-gradient(180deg, #3a2a6e, #22154f 70%); }
.hc-up { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; animation: badge 1.5s infinite; }

/* Qəhrəman detalları */
.hero-detail { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 22px; max-width: 1100px; margin: 0 auto; padding-bottom: 20px; }
.hd-left {
  --rc: #8fd3ff; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 16px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 50%, #2a1868), #24135e 75%);
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 6px 0 var(--ink);
}
.hd-portrait { width: min(280px, 70vw); aspect-ratio: 1; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.4), transparent 62%); }
.hd-portrait img { width: 100%; height: 100%; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hd-rar { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--rc); border: 2.5px solid var(--ink); border-radius: 9px; padding: 0 10px; }
.hd-name { margin: 4px 0 0; font-size: 44px; line-height: 1; font-weight: 800; text-shadow: var(--stroke); }
.hd-title { color: var(--muted); font-size: 17px; text-shadow: var(--stroke-sm); }
.hd-lore { max-width: 34ch; margin: 10px 0 0; font-size: 15px; font-weight: 600; color: #e6deff; line-height: 1.35; }
.hd-tr { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 14px; background: rgba(26, 15, 51, 0.7); border: 3px solid var(--ink); border-radius: 12px; }
.hd-tr svg { width: 26px; height: 26px; }
.hd-tr b { font-size: 22px; color: var(--gold); text-shadow: var(--stroke-sm); }
.hd-tr span { font-size: 14px; color: var(--muted); }
.hd-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hd-power { display: flex; align-items: baseline; gap: 8px; padding: 6px 16px; align-self: flex-start; background: linear-gradient(180deg, #8f6bff, #5b3fd6); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); text-shadow: var(--stroke-sm); }
.hd-power span { font-size: 15px; font-weight: 800; letter-spacing: 0.1em; }
.hd-power b { font-size: 34px; line-height: 1; font-weight: 800; }
.hd-power small { font-size: 16px; color: #e0d6ff; }
.hd-stats { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: rgba(26, 15, 51, 0.55); border: 3px solid var(--ink); border-radius: 16px; }
.st-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.st-l { font-size: 15px; color: var(--muted); font-weight: 700; }
.st-bar { height: 14px; border: 2.5px solid var(--ink); border-radius: 8px; background: #2a1868; overflow: hidden; }
.st-bar i { display: block; height: 100%; background: linear-gradient(180deg, #7dffb0, #1cc46e); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.st-row b { font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-row b em { font-style: normal; font-size: 14px; color: var(--self); margin-left: 6px; }
.st-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.st-chips span { display: flex; flex-direction: column; align-items: center; padding: 4px 6px; background: rgba(90, 67, 196, 0.35); border: 2px solid var(--ink); border-radius: 11px; font-size: 15px; font-weight: 800; text-align: center; }
.st-chips small { font-size: 12px; color: var(--muted); font-weight: 700; }
.hd-abil { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: rgba(26, 15, 51, 0.55); border: 3px solid var(--ink); border-radius: 16px; }
.hd-abil b { font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); }
.hd-abil p { margin: 2px 0 0; font-size: 15px; color: #e6deff; line-height: 1.3; }
.ab-ico { width: 46px; height: 46px; padding: 6px; flex: none; border: 3px solid var(--ink); border-radius: 12px; }
.ab-ico.atk { background: linear-gradient(180deg, #4fd2ff, #1a8ae6); }
.ab-ico.sup { background: linear-gradient(180deg, #ffe766, #ffb000); }
.hd-skins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.skin { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 4px 8px; background: rgba(26, 15, 51, 0.6); border: 3px solid var(--ink); border-radius: 14px; font-size: 14px; font-weight: 800; transition: transform 0.1s; }
.skin:hover:not(:disabled) { transform: translateY(-3px); }
.skin img { width: 76%; aspect-ratio: 1; }
.skin.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--ink), 0 0 16px rgba(255, 204, 31, 0.5); }
.skin em { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 12px; display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 8px; background: var(--ink); }
.skin em svg { width: 14px; height: 14px; }
.skin .sk-on { background: var(--gold); color: var(--ink); }
.skin.buy img { filter: saturate(0.6) brightness(0.85); }
.hd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hd-actions .btn { flex: 1; min-width: 160px; }
.hd-locked { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(26, 15, 51, 0.6); border: 3px dashed var(--line); border-radius: 14px; font-size: 16px; }
.hd-locked svg { width: 34px; height: 34px; flex: none; }
.hd-locked b { color: var(--gold); }

/* İzlər (kubok + mövsüm yolu) */
.track-scroll { position: relative; flex: 1; overflow-x: auto; overflow-y: hidden; padding: 30px var(--pad-r) 20px var(--pad-l); touch-action: pan-x; display: flex; align-items: center; scrollbar-width: thin; }
.track { position: relative; display: flex; gap: 18px; align-items: center; padding: 0 40px; z-index: 1; }
.track-line { position: absolute; left: var(--pad-l); top: 50%; height: 16px; margin-top: -8px; width: calc(var(--n, 27) * 158px + 80px); border: 3px solid var(--ink); border-radius: 10px; background: #2a1868; z-index: 0; }
.track-line i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #ffe766, #ffb000); border-radius: 6px; transition: width 0.8s; }
.track-line.pass i { background: linear-gradient(180deg, #ff9ce8, #ff2fcf); }
#scrRoad .track-line { --n: 27; }
#scrPass .track-line { --n: 30; width: calc(30 * 138px + 80px); }
.node, .tier { position: relative; width: 140px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tier { width: 120px; }
.nd-t, .tr-n { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 800; padding: 1px 10px; background: var(--ink); border-radius: 10px; color: var(--gold); }
.tr-n { color: #ffd6f6; min-width: 34px; justify-content: center; }
.nd-t svg { width: 18px; height: 18px; }
.nd-card, .tr-card {
  width: 100%; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; text-align: center;
  background: linear-gradient(180deg, #4c34c4, #2e1b7a); border: 3px solid var(--ink); border-radius: 18px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 5px 0 var(--ink);
}
.nd-card > svg, .tr-card > svg, .ri-chest svg { width: 58px; height: 58px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.nd-card .ri-hero, .tr-card .ri-hero { width: 84px; height: 84px; }
.nd-card span, .tr-card span { font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm); line-height: 1.05; }
.nd-card small, .tr-card small { font-size: 12px; color: var(--muted); }
.node.big .nd-card { background: linear-gradient(180deg, #ff9a3d, #c2124a); }
.tier.big .tr-card { background: linear-gradient(180deg, #ff6fd8, #8a1aa0); }
.node:not(.reached) .nd-card, .tier:not(.reached) .tr-card { filter: saturate(0.4) brightness(0.7); }
.node.claimed .nd-card, .tier.claimed .tr-card { opacity: 0.6; }
.node.claim .nd-card, .tier.claim .tr-card { animation: claimGlow 1.2s ease-in-out infinite; }
@keyframes claimGlow { 50% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 5px 0 var(--ink), 0 0 26px 6px rgba(255, 204, 31, 0.65); transform: translateY(-4px); } }
.nd-ok, .nd-lock { width: 36px; height: 36px; padding: 5px; border: 3px solid var(--ink); border-radius: 50%; background: var(--mint-dk); }
.nd-lock { background: #3a2a6e; padding: 4px; }
.ri-chest { display: inline-flex; }
.ri-chest.k-big svg path:nth-child(2) { fill: #b36bff; } .ri-chest.k-big svg path:first-child { fill: #8a3fe0; }
.ri-chest.k-mega svg path:nth-child(2) { fill: #ffd84d; } .ri-chest.k-mega svg path:first-child { fill: #f0a400; }
.ri-hero { border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.4), transparent 70%); }

.pass-top { display: flex; align-items: center; gap: 16px; padding: 4px var(--pad-r) 0 var(--pad-l); flex-wrap: wrap; }
.pass-lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 74px; height: 74px; border: 4px solid var(--ink); border-radius: 50%; background: radial-gradient(circle at 50% 35%, #ff9ce8, #b0158f); box-shadow: 0 4px 0 var(--ink); }
.pass-lvl small { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; margin-bottom: -6px; }
.pass-lvl b { font-size: 32px; font-weight: 800; text-shadow: var(--stroke-sm); }
.pass-xp { flex: 1; min-width: 180px; max-width: 420px; display: flex; flex-direction: column; gap: 4px; }
.pass-xpbar { height: 22px; border: 3px solid var(--ink); border-radius: 12px; background: #2a1868; overflow: hidden; }
.pass-xpbar i { display: block; height: 100%; background: linear-gradient(180deg, #ff9ce8, #ff2fcf); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45); transition: width 0.6s; }
.pass-xp span { font-size: 15px; color: #ffd6f6; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Matç axtarışı / VS ---------- */
#scrMatch { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--mc, #ff4f6d) 45%, #2a1470), #140a35 78%); }
#scrMatch.on { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mm-mode { position: absolute; top: var(--pad-t); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 18px 6px 8px; background: rgba(26, 15, 51, 0.7); border: 3px solid var(--ink); border-radius: 14px; font-size: 20px; text-shadow: var(--stroke-sm); white-space: nowrap; }
.mm-mode svg { width: 36px; height: 36px; }
.mm-search { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-inline: var(--pad-l) var(--pad-r); }
.mm-search h2 { margin: 0; font-size: clamp(26px, 4vw, 40px); font-weight: 800; text-shadow: var(--stroke); }
.mm-count { font-size: 56px; line-height: 1; font-weight: 800; color: var(--gold); text-shadow: var(--stroke); font-variant-numeric: tabular-nums; }
.mm-dots { display: flex; gap: 8px; }
.mm-dots i { width: 22px; height: 22px; border: 3px solid var(--ink); border-radius: 50%; background: #3a2a6e; transition: background 0.2s, transform 0.2s; }
.mm-dots i.on { background: var(--gold); transform: scale(1.15); }
.mm-spinner { position: relative; width: 110px; height: 110px; }
.mm-spinner i { position: absolute; inset: 0; border: 8px solid transparent; border-top-color: var(--gold); border-radius: 50%; animation: spin2 1s linear infinite; }
.mm-spinner i:nth-child(2) { inset: 14px; border-top-color: var(--pink); animation-duration: 1.4s; animation-direction: reverse; }
.mm-spinner i:nth-child(3) { inset: 28px; border-top-color: var(--sky); animation-duration: 0.8s; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.mm-vs { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px var(--pad-r) 20px var(--pad-l); }
.vs-map { display: flex; flex-direction: column; align-items: center; text-shadow: var(--stroke-sm); }
.vs-map b { font-size: 26px; font-weight: 800; }
.vs-map span { font-size: 16px; color: var(--muted); }
.vs-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.vs-x { font-size: clamp(54px, 9vw, 90px); line-height: 0.9; font-weight: 800; color: var(--gold); text-shadow: var(--stroke); animation: vsPop 0.6s cubic-bezier(.3, 1.8, .5, 1) 0.3s both; }
@keyframes vsPop { from { transform: scale(3) rotate(-20deg); opacity: 0; } }
.vs-card {
  --rc: #8fd3ff; width: 150px; display: flex; flex-direction: column; align-items: center; padding: 0 6px 8px; text-align: center;
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); overflow: hidden;
  animation: vsIn 0.5s cubic-bezier(.2, 1.4, .4, 1) var(--d) both;
}
.vs-card.ally { background: linear-gradient(180deg, #4fbaff, #1d5fc2); }
.vs-card.enemy { background: linear-gradient(180deg, #ff6b7d, #b5163b); }
.vs-card.me { outline: 4px solid var(--gold); outline-offset: 2px; }
.vs-card img { width: 110px; height: 110px; }
.vs-card b { font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-card span { font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.vs-card em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); }
.vs-card em svg { width: 16px; height: 16px; }
.vs-row#vsA .vs-card { --from: -120px; } .vs-row#vsB .vs-card { --from: 120px; }
@keyframes vsIn { from { transform: translateX(var(--from, 0)) scale(0.6); opacity: 0; } }
.mm-vs.ffa .vs-x { font-size: 40px; }
.mm-vs.ffa .vs-x::after { content: " · " attr(data-n) " OYUNÇU"; font-size: 0.5em; }
.mm-vs.ffa .vs-card { width: 120px; }
.mm-vs.ffa .vs-card img { width: 86px; height: 86px; }
.mm-vs.ffa.many .vs-row { gap: 8px; }
.mm-vs.ffa.many .vs-card { width: 96px; }
.mm-vs.ffa.many .vs-card img { width: 66px; height: 66px; }
.mm-vs.ffa.many .vs-card b { font-size: 13px; }
/* komandalı Sağ Qalan: rəqib komandalar rəng çaları ilə qruplaşır */
.vs-card.enemy.sq1 { background: linear-gradient(180deg, #ff9a5c, #b5521a); }
.vs-card.enemy.sq2 { background: linear-gradient(180deg, #d77bff, #6d1fb5); }
.vs-card.enemy.sq3 { background: linear-gradient(180deg, #ffd25c, #b58a1a); }
/* boss kartı */
.vs-card.boss { width: 210px; background: linear-gradient(180deg, #ff5fa2, #6d0f3f); box-shadow: 0 5px 0 var(--ink), 0 0 40px #ff3d8b88; }
.vs-card.boss img { width: 170px; height: 170px; }
.vs-card.boss b { font-size: 20px; }
.vs-card.boss em { color: #fff; background: #ff3d8b; padding: 0 8px; border: 2px solid var(--ink); border-radius: 8px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#overlay { position: absolute; inset: 0; }
#hurtVignette { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(255, 30, 60, 0.6) 100%); transition: opacity 0.08s; }
#hurtVignette.poison { background: radial-gradient(ellipse at center, transparent 50%, rgba(80, 255, 90, 0.5) 100%); }
.hud-top { position: absolute; top: var(--pad-t); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; }
.ht-team b { display: grid; place-items: center; min-width: 64px; height: 50px; padding: 0 12px; font-size: 34px; font-weight: 800; text-shadow: var(--stroke); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); font-variant-numeric: tabular-nums; }
.ht-team.ally b { background: linear-gradient(180deg, #5cc6ff, #1a7ae0); }
.ht-team.enemy b { background: linear-gradient(180deg, #ff7a8c, #d01b45); }
.ht-mid { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.ht-timer { font-size: 30px; line-height: 1; font-weight: 800; text-shadow: var(--stroke); font-variant-numeric: tabular-nums; padding: 4px 14px; background: rgba(26, 15, 51, 0.75); border: 3px solid var(--ink); border-radius: 12px; }
.ht-timer.urgent { color: #ff6b7d; animation: badge 0.5s infinite; }
.ht-sub { margin-top: 3px; font-size: 13px; font-weight: 800; text-shadow: var(--stroke-sm); white-space: nowrap; }
.ht-zone { position: relative; width: clamp(110px, 18vw, 180px); height: 36px; border: 3px solid var(--ink); border-radius: 12px; background: rgba(26, 15, 51, 0.8); overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.ht-zone .zfill { position: absolute; top: 0; bottom: 0; width: 0; transition: width 0.2s; }
.ht-zone.ally .zfill { right: 0; background: linear-gradient(180deg, #5cc6ff, #1a7ae0); }
.ht-zone.enemy .zfill { left: 0; background: linear-gradient(180deg, #ff7a8c, #d01b45); }
.ht-zone b { position: relative; display: block; text-align: center; font-size: 20px; line-height: 30px; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
/* boss can zolağı */
.ht-boss { display: grid; gap: 3px; width: clamp(200px, 34vw, 420px); }
.hb-name { font-size: 15px; font-weight: 800; color: #ffd6e8; text-shadow: var(--stroke-sm); text-align: center; letter-spacing: 0.02em; }
.hb-bar { position: relative; height: 22px; border: 3px solid var(--ink); border-radius: 11px; background: rgba(26, 15, 51, 0.85); overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.hb-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 0 6px 6px 0; }
.hb-lag { background: #fff3; }
.hb-fill { background: linear-gradient(180deg, #ff6fa8, #e0216b); transition: width 0.15s; }
.hb-bar b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; text-shadow: var(--stroke-sm); }
.hud-top.boss-rage .hb-fill { background: linear-gradient(180deg, #ff8a3d, #ff2d2d); animation: hbRage 0.6s ease-in-out infinite alternate; }
.hud-top.boss-rage .hb-name { color: #ff8a8a; }
@keyframes hbRage { to { filter: brightness(1.35); } }
@media (prefers-reduced-motion: reduce) { .hud-top.boss-rage .hb-fill { animation: none; } }
.ht-br { display: flex; align-items: center; gap: 6px; padding: 4px 14px 4px 6px; background: rgba(26, 15, 51, 0.8); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.ht-br b { font-size: 28px; line-height: 1; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
.ht-br small { font-size: 13px; color: var(--muted); font-weight: 800; }
.ht-ico { width: 30px; height: 30px; border-radius: 8px; border: 2.5px solid var(--ink); }
.ht-ico.skull { background: radial-gradient(circle at 35% 45%, var(--ink) 3px, transparent 3.5px), radial-gradient(circle at 65% 45%, var(--ink) 3px, transparent 3.5px), #eef1ff; border-radius: 50% 50% 40% 40%; }
.ht-ico.cube { background: linear-gradient(135deg, #a8ff8f, #3ec92b); transform: rotate(12deg); }
.hud-pause { position: absolute; top: var(--pad-t); right: var(--pad-r); width: 46px; height: 46px; padding: 9px; pointer-events: auto; background: rgba(26, 15, 51, 0.75); border: 3px solid var(--ink); border-radius: 13px; }
#killfeed { position: absolute; top: calc(var(--pad-t) + 56px); right: var(--pad-r); display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.kf { display: flex; align-items: center; gap: 5px; padding: 3px 10px 3px 4px; background: rgba(26, 15, 51, 0.78); border: 2.5px solid var(--ink); border-radius: 11px; font-size: 14px; font-weight: 800; animation: kfIn 0.3s cubic-bezier(.2, 1.4, .4, 1); transition: opacity 0.4s, transform 0.4s; }
.kf.out { opacity: 0; transform: translateX(30px); }
.kf img { width: 28px; height: 28px; border-radius: 7px; background: rgba(255, 255, 255, 0.12); }
.kf-n { text-shadow: var(--stroke-sm); max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf-n.self { color: var(--self); } .kf-n.ally { color: var(--ally); } .kf-n.enemy { color: var(--enemy); } .kf-n.poison { color: #8dff6a; }
.kf-x { width: 16px; height: 16px; background: linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%); }
@keyframes kfIn { from { transform: translateX(40px); opacity: 0; } }
#announce { position: absolute; left: 0; right: 0; top: 22%; display: flex; justify-content: center; text-align: center; }
.ann { --c: #ffd23f; animation: ann 2.2s cubic-bezier(.2, 1.4, .4, 1) both; }
.ann-t { font-size: clamp(30px, 5vw, 48px); font-weight: 800; color: var(--c); text-shadow: var(--stroke); line-height: 1; }
.ann.big .ann-t { font-size: clamp(44px, 8vw, 84px); }
.ann-s { font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); margin-top: 4px; }
@keyframes ann { 0% { transform: scale(2.4); opacity: 0; } 12% { transform: scale(0.92); opacity: 1; } 20% { transform: scale(1); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.9) translateY(-20px); } }
#countdown { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: clamp(80px, 16vw, 160px); line-height: 1; font-weight: 800; color: var(--gold); text-shadow: var(--stroke), 0 10px 0 var(--ink); opacity: 0; }
#countdown.pop { animation: cd 0.95s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes cd { 0% { transform: scale(3); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: scale(0.7); opacity: 0; } }
#miniToast { --c: #ffd23f; position: absolute; left: 50%; top: calc(var(--pad-t) + 80px); transform: translateX(-50%); font-size: 18px; font-weight: 800; color: var(--c); text-shadow: var(--stroke-sm); opacity: 0; white-space: nowrap; }
#miniToast.show { animation: mt 1.8s ease both; }
@keyframes mt { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#respawnMsg { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); padding: 8px 20px; font-size: 22px; font-weight: 800; text-shadow: var(--stroke-sm); background: rgba(26, 15, 51, 0.8); border: 3px solid var(--ink); border-radius: 14px; white-space: nowrap; }
#respawnMsg b { color: var(--gold); font-size: 28px; }
#tutorial { position: absolute; left: 50%; bottom: calc(var(--pad-b) + 100px); transform: translateX(-50%); width: min(720px, calc(100% - 32px)); padding: 10px 18px; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.4; background: rgba(26, 15, 51, 0.85); border: 3px solid var(--ink); border-radius: 14px; animation: kfIn 0.4s; }
#tutorial b { color: var(--gold); }
#superMeter { position: absolute; left: 50%; bottom: var(--pad-b); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; background: rgba(26, 15, 51, 0.78); border: 3px solid var(--ink); border-radius: 40px; }
.sm-ring { --p: 0; width: 62px; height: 62px; border-radius: 50%; padding: 5px; border: 3px solid var(--ink); background: conic-gradient(var(--gold) calc(var(--p) * 1%), #3a2a6e 0); }
#superMeter { --p: 0; }
#superMeter .sm-ring { background: conic-gradient(var(--gold) calc(var(--p) * 1%), #3a2a6e 0); }
.sm-icon { width: 100%; height: 100%; border-radius: 50%; background: #2a1868 center / 130% no-repeat; border: 2px solid var(--ink); filter: grayscale(0.7) brightness(0.7); }
.sm-txt { display: flex; flex-direction: column; line-height: 1.1; }
.sm-txt b { font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm); }
.sm-txt small { font-size: 12px; color: var(--muted); }
kbd { font-family: inherit; font-size: 11px; padding: 0 5px; border: 2px solid var(--muted); border-radius: 5px; }
#superMeter.ready { animation: superReady 0.9s ease-in-out infinite; border-color: var(--gold); }
#superMeter.ready .sm-icon { filter: none; }
@keyframes superReady { 50% { box-shadow: 0 0 26px 6px rgba(255, 210, 63, 0.7); } }

/* Toxunma idarəetməsi */
#touchUI { position: absolute; inset: 0; }
#touchMove { position: absolute; left: 0; top: 18%; bottom: 0; width: 48%; pointer-events: auto; touch-action: none; }
.stick { position: absolute; width: 128px; height: 128px; margin: -64px 0 0 -64px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.35); background: rgba(26, 15, 51, 0.35); opacity: 0; transition: opacity 0.15s; pointer-events: none; left: 22%; top: 72%; }
.stick.on { opacity: 1; }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); border: 3px solid var(--ink); }
.aim-btn { position: absolute; border-radius: 50%; border: 4px solid var(--ink); pointer-events: auto; touch-action: none; display: grid; place-items: center; }
.aim-btn.attack { right: calc(var(--pad-r) + 26px); bottom: calc(var(--pad-b) + 26px); width: 118px; height: 118px; background: radial-gradient(circle at 50% 35%, rgba(255, 120, 140, 0.9), rgba(200, 20, 60, 0.85)); box-shadow: 0 5px 0 var(--ink); }
.aim-btn.attack .stick-knob { background: #fff; width: 50px; height: 50px; margin: -25px 0 0 -25px; }
.aim-btn.super { --p: 0; right: calc(var(--pad-r) + 160px); bottom: calc(var(--pad-b) + 40px); width: 92px; height: 92px; background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(58, 42, 110, 0.9) 0); box-shadow: 0 5px 0 var(--ink); }
.aim-btn.super span { position: absolute; bottom: -24px; font-size: 13px; font-weight: 800; text-shadow: var(--stroke-sm); }
.aim-btn.super .stick-knob { background: radial-gradient(circle, #fff3a0, #ffb000); width: 50px; height: 50px; margin: -25px 0 0 -25px; }
.aim-btn.super.empty .stick-knob { filter: grayscale(1) brightness(0.6); }
.aim-btn.super.ready { animation: superReady 0.9s ease-in-out infinite; }
.aim-btn.held { transform: scale(1.08); }

/* ---------- Nəticə ---------- */
#scrResult { background: linear-gradient(180deg, rgba(22, 12, 58, 0.55), rgba(22, 12, 58, 0.92) 40%); }
#scrResult.on { display: flex; justify-content: center; overflow-y: auto; touch-action: pan-y; }
.res-wrap { width: min(980px, 100%); min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l); }
.res-title { margin: 6px 0 0; font-size: clamp(48px, 9vw, 92px); line-height: 1; font-weight: 800; color: var(--gold); text-shadow: var(--stroke), 0 10px 0 var(--ink); animation: resIn 0.7s cubic-bezier(.2, 1.6, .4, 1) both; text-align: center; }
.res-lose .res-title { color: #ff8396; }
.res-draw .res-title { color: #cfc6ff; }
@keyframes resIn { from { transform: scale(2.6) rotate(-6deg); opacity: 0; } }
.res-sub { font-size: 20px; font-weight: 800; text-shadow: var(--stroke-sm); text-align: center; }
.res-sub .a { color: var(--ally); } .res-sub .e { color: var(--enemy); }
.res-board { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; animation: kfIn 0.5s 0.2s both; }
.res-board.ffa .rb-row { padding-block: 2px; }
.res-board.ffa .rb-row img { width: 32px; height: 32px; }
.rb-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rb-row { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 3px solid var(--ink); border-radius: 13px; font-size: 15px; font-weight: 800; min-width: 0; }
.rb-row.ally { background: linear-gradient(90deg, rgba(58, 180, 255, 0.55), rgba(26, 15, 51, 0.7)); }
.rb-row.enemy { background: linear-gradient(90deg, rgba(255, 75, 92, 0.5), rgba(26, 15, 51, 0.7)); }
.rb-row.me { outline: 3px solid var(--gold); }
.rb-row img { width: 40px; height: 40px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); flex: none; }
.rb-row b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--stroke-sm); }
.rb-rank { font-size: 18px; color: var(--gold); text-shadow: var(--stroke-sm); width: 34px; text-align: center; }
.rb-mvp { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink); background: var(--gold); padding: 0 6px; border-radius: 8px; border: 2px solid var(--ink); }
.rb-mvp svg { width: 16px; height: 16px; }
.rb-s { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.rb-s svg { width: 18px; height: 18px; }
.rb-s.dmg { color: #ffd6a0; min-width: 52px; justify-content: flex-end; }
.res-rewards { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rw { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(26, 15, 51, 0.8); border: 3px solid var(--ink); border-radius: 16px; animation: rwIn 0.5s cubic-bezier(.2, 1.5, .4, 1) calc(0.5s + var(--d)) both; min-width: 0; }
@keyframes rwIn { from { transform: translateY(30px) scale(0.8); opacity: 0; } }
.rw > svg { width: 38px; height: 38px; flex: none; }
.rw b { font-size: 26px; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
.rw em { font-style: normal; font-size: 22px; font-weight: 800; text-shadow: var(--stroke-sm); margin-left: auto; }
.rw.up em { color: var(--self); } .rw.down em { color: #ff7a8c; }
.rw small { position: absolute; left: 12px; bottom: -11px; font-size: 12px; font-weight: 800; padding: 0 8px; border-radius: 8px; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); white-space: nowrap; }
.rw small.streak { background: #ff9a3d; }
.rw-xp small { background: #ff9ce8; }
.rw-bar { flex: 1; height: 18px; border: 3px solid var(--ink); border-radius: 10px; background: #2a1868; overflow: hidden; min-width: 50px; }
.rw-bar i { display: block; height: 100%; background: linear-gradient(180deg, #7fe0ff, #1f9de6); transition: width 0.9s cubic-bezier(.3, 0, .2, 1); }
.rw-bar.xp i { background: linear-gradient(180deg, #ff9ce8, #ff2fcf); }
.res-extras { width: 100%; display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin-top: 6px; }
.rx { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: rgba(52, 240, 160, 0.16); border: 3px solid var(--ink); border-radius: 13px; font-size: 15px; animation: rwIn 0.5s cubic-bezier(.2, 1.5, .4, 1) 1.2s both; }
.rx > svg { width: 28px; height: 28px; flex: none; }
.rx.quest > svg { background: var(--mint-dk); border-radius: 50%; padding: 4px; border: 2px solid var(--ink); }
.rx b { color: var(--gold); }
.rx em { margin-left: auto; font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; white-space: nowrap; }
.rx em svg { width: 18px; height: 18px; }
.res-actions { position: sticky; bottom: 0; z-index: 2; width: 100%; display: flex; gap: 14px; margin-top: auto; padding: 18px 0 2px; flex-wrap: wrap; justify-content: center; background: linear-gradient(180deg, transparent, rgba(22, 12, 58, 0.96) 40%); }

/* ---------- Modal ---------- */
#modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l); background: rgba(10, 5, 28, 0.7); backdrop-filter: blur(4px); }
#modal.in { animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; touch-action: pan-y;
  padding: 18px 18px 20px; background: linear-gradient(180deg, #3d26a0, #24135e); border: 4px solid var(--ink); border-radius: 24px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.2), 0 8px 0 var(--ink), 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: pop 0.35s cubic-bezier(.2, 1.5, .4, 1);
}
.modal-card.small { width: min(440px, 100%); }
.modal-card.wide { width: min(820px, 100%); }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
.m-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; padding: 8px; background: linear-gradient(180deg, #ff7a98, #e0204f); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); z-index: 2; }
.m-title { margin: 0 44px 8px 0; font-size: 28px; font-weight: 800; text-shadow: var(--stroke); }
.m-sub { margin: 0 0 12px; color: #e6deff; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-sub svg { width: 20px; height: 20px; }
.m-text { font-size: 17px; text-align: center; }
.m-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.m-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.m-skin { width: 160px; margin: 0 auto; }
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mcard {
  --mc: #ff4f6d; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; text-align: left;
  background: linear-gradient(170deg, var(--mc), color-mix(in srgb, var(--mc) 40%, #1a0f33)); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.3), 0 5px 0 var(--ink); transition: transform 0.1s;
}
.mcard:hover:not(:disabled) { transform: translateY(-4px); }
.mcard.sel { outline: 4px solid var(--gold); outline-offset: 2px; }
.mcard.locked { filter: grayscale(0.85) brightness(0.7); }
.mc-ico { width: 56px; height: 56px; }
.mc-body b { display: block; font-size: 22px; font-weight: 800; text-shadow: var(--stroke-sm); }
.mc-body small { font-size: 14px; font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.mc-body p { margin: 6px 0 0; font-size: 14px; line-height: 1.3; color: #fff; text-shadow: 0 1px 0 var(--ink); }
.mc-day { position: absolute; top: -12px; right: 10px; font-size: 12px; font-weight: 800; padding: 2px 8px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 9px; }
.mc-lock { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); flex-wrap: wrap; }
.mc-lock svg { width: 22px; height: 22px; }
.mc-lock em { font-style: normal; font-size: 13px; color: #fff; width: 100%; }
.quests { display: flex; flex-direction: column; gap: 10px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 10px; background: rgba(26, 15, 51, 0.6); border: 3px solid var(--ink); border-radius: 16px; }
.quest.done { background: rgba(52, 240, 160, 0.18); }
.q-ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border: 2.5px solid var(--ink); overflow: hidden; }
.q-ico svg { width: 38px; height: 38px; }
.quest.done .q-ico { background: var(--mint-dk); }
.q-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-body b { font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm); }
.q-bar { position: relative; height: 22px; border: 2.5px solid var(--ink); border-radius: 11px; background: #2a1868; overflow: hidden; }
.q-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #7dffb0, #1cc46e); }
.q-bar span { position: relative; display: block; text-align: center; font-size: 13px; line-height: 17px; font-weight: 800; text-shadow: var(--stroke-sm); font-variant-numeric: tabular-nums; }
.q-rew { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 800; }
.q-rew span { display: inline-flex; align-items: center; gap: 3px; }
.q-rew svg { width: 20px; height: 20px; }
.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: rgba(26, 15, 51, 0.6); border: 3px solid var(--ink); border-radius: 14px; text-align: center; }
.day small { font-size: 12px; color: var(--muted); font-weight: 800; }
.day > svg, .day .ri-chest svg { width: 42px; height: 42px; }
.day b { font-size: 14px; font-weight: 800; line-height: 1.1; }
.day.big { grid-column: span 2; background: linear-gradient(180deg, rgba(255, 204, 31, 0.35), rgba(26, 15, 51, 0.6)); }
.day.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--ink), 0 0 18px rgba(255, 204, 31, 0.6); animation: badge 1.4s infinite; }
.day.past { opacity: 0.55; }
.d-ok { position: absolute; inset: auto 4px 4px auto; width: 24px; height: 24px; padding: 3px; background: var(--mint-dk); border: 2px solid var(--ink); border-radius: 50%; }
.set { display: flex; flex-direction: column; gap: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: rgba(26, 15, 51, 0.55); border: 3px solid var(--ink); border-radius: 14px; font-size: 16px; font-weight: 800; }
.set-row input[type="range"] { width: 52%; accent-color: var(--gold); }
.set-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--gold); }
.set-row input[type="text"], .name-row input { width: 55%; padding: 8px 10px; font: 800 17px var(--font); color: #fff; background: #1a0f33; border: 3px solid var(--line); border-radius: 11px; user-select: text; -webkit-user-select: text; }
.seg { display: flex; border: 3px solid var(--ink); border-radius: 11px; overflow: hidden; }
.seg button { padding: 5px 12px; font-size: 14px; font-weight: 800; background: #2a1868; }
.seg button.on { background: var(--gold); color: var(--ink); }
.danger { margin-top: 16px; text-align: center; }
.danger p { font-size: 15px; color: #ffb3c0; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; width: auto; font-size: 20px; }
.pause-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pause-actions p { text-align: center; font-size: 15px; color: #ffb3c0; margin: 4px 0 0; }
.pf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 44px; }
.pf-head img { width: 72px; height: 72px; border-radius: 16px; border: 3px solid var(--ink); background: rgba(255, 255, 255, 0.12); }
.pf-head h3 { margin: 0; font-size: 26px; font-weight: 800; text-shadow: var(--stroke-sm); }
.pf-head span { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 800; }
.pf-head span svg { width: 20px; height: 20px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-stat { display: flex; flex-direction: column; padding: 8px 12px; background: rgba(26, 15, 51, 0.55); border: 3px solid var(--ink); border-radius: 13px; }
.pf-stat small { font-size: 13px; color: var(--muted); font-weight: 700; }
.pf-stat b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-stat em { font-style: normal; font-size: 14px; color: var(--self); }
.chest-list { display: flex; flex-direction: column; gap: 10px; }
.chest-pick { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: rgba(26, 15, 51, 0.6); border: 3px solid var(--ink); border-radius: 16px; font-size: 18px; font-weight: 800; text-align: left; }
.chest-pick b { flex: 1; }
.chest-pick span { color: var(--gold); }
.mini-chest { width: 56px; height: 56px; }
.chest-pick.k-big .mini-chest svg path:nth-child(2) { fill: #b36bff; } .chest-pick.k-big .mini-chest svg path:first-child { fill: #8a3fe0; }
.chest-pick.k-mega .mini-chest svg path:nth-child(2) { fill: #ffd84d; } .chest-pick.k-mega .mini-chest svg path:first-child { fill: #f0a400; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; color: #e6deff; }
.empty-state svg { width: 70px; height: 70px; opacity: 0.6; }
.tok-info { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tok-info > svg { width: 30px; height: 30px; }
.tok-info .tok-bar { flex: 1; height: 18px; border: 3px solid var(--ink); border-radius: 10px; background: #2a1868; overflow: hidden; }
.tok-info .tok-bar i { display: block; height: 100%; background: linear-gradient(180deg, #7fe0ff, #1f9de6); }

/* ---------- Sandıq açılışı ---------- */
#chestLayer { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(circle at 50% 50%, #4b22b8, #0d0624 75%); overflow: hidden; --c1: #3aa0ff; --c2: #1d5fc2; }
#chestLayer.k-big { --c1: #c38bff; --c2: #7a2fd0; }
#chestLayer.k-mega { --c1: #ffd84d; --c2: #e08a00; }
.ch-rays { position: absolute; left: 50%; top: 46%; width: 200vmax; height: 200vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(color-mix(in srgb, var(--c1) 40%, transparent) 0 8deg, transparent 8deg 20deg); opacity: 0.35; animation: spin 24s linear infinite; mask-image: radial-gradient(circle, #000, transparent 50%); -webkit-mask-image: radial-gradient(circle, #000, transparent 50%); }
#chestLayer.burst .ch-rays { opacity: 0.9; animation-duration: 9s; }
#chestLayer.legend .ch-rays { background: repeating-conic-gradient(rgba(255, 216, 77, 0.7) 0 8deg, transparent 8deg 20deg); opacity: 1; }
.ch-title { position: relative; font-size: clamp(30px, 5vw, 46px); font-weight: 800; text-shadow: var(--stroke); }
.ch-stage { position: relative; height: 230px; display: grid; place-items: end center; }
.chest3d { position: relative; width: 200px; height: 170px; animation: chestDrop 0.7s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
@keyframes chestDrop { from { transform: translateY(-400px) scale(0.6); } }
.chest3d.shake { animation: chestShake 0.26s; }
@keyframes chestShake { 20% { transform: rotate(-7deg) scale(1.05, 0.95); } 50% { transform: rotate(6deg) scale(0.96, 1.06); } 80% { transform: rotate(-3deg); } }
.chest3d .base { position: absolute; left: 0; right: 0; bottom: 0; height: 100px; background: linear-gradient(180deg, var(--c1), var(--c2)); border: 5px solid var(--ink); border-radius: 10px 10px 18px 18px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.25), inset 0 5px 0 rgba(255, 255, 255, 0.35); }
.chest3d .band { position: absolute; top: 0; bottom: 0; left: 26px; width: 22px; background: linear-gradient(180deg, #ffe58a, #c98a00); border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); }
.chest3d .band.b2 { left: auto; right: 26px; }
.chest3d .lid { position: absolute; left: -6px; right: -6px; bottom: 92px; height: 80px; background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 80%, #fff), var(--c1)); border: 5px solid var(--ink); border-radius: 60px 60px 10px 10px; transform-origin: 50% 100%; transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.4); z-index: 2; }
.chest3d .lock { position: absolute; left: 50%; bottom: -22px; width: 38px; height: 44px; margin-left: -19px; background: linear-gradient(180deg, #ffe58a, #e0a000); border: 4px solid var(--ink); border-radius: 10px; }
.chest3d.open .lid { transform: translateY(-90px) rotate(-28deg); }
.chest3d.open::after { content: ""; position: absolute; left: 50%; bottom: 90px; width: 300px; height: 300px; margin-left: -150px; background: radial-gradient(circle, #fff 0%, color-mix(in srgb, var(--c1) 70%, transparent) 30%, transparent 65%); animation: flash 0.8s ease-out both; }
@keyframes flash { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.6); opacity: 0.5; } }
.ch-shadow { position: absolute; bottom: -12px; width: 220px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.4); z-index: -1; }
#chestLayer.burst .ch-stage { opacity: 0.25; transform: scale(0.8); transition: 0.4s; height: 120px; }
.ch-reveal { position: relative; min-height: 120px; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.ri { display: flex; flex-direction: column; align-items: center; text-align: center; animation: riIn 0.55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes riIn { from { transform: scale(0.2) translateY(80px); opacity: 0; } }
.ri-big { width: 120px; height: 120px; filter: drop-shadow(0 6px 0 var(--ink)); animation: float 2s ease-in-out infinite; }
.ri-big svg { width: 100%; height: 100%; }
.ri-amt { font-size: 52px; line-height: 1; font-weight: 800; text-shadow: var(--stroke); }
.ri-lbl { font-size: 20px; font-weight: 800; text-shadow: var(--stroke-sm); color: var(--muted); }
.ri.lucky .ri-lbl { color: var(--gold); animation: badge 0.6s infinite; }
.ri .ri-hero { --rc: #fff; width: min(260px, 60vw); height: min(260px, 60vw); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 70%, #fff) 0%, transparent 68%); animation: float 2.4s ease-in-out infinite; }
.ri-new { font-size: 22px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); letter-spacing: 0.1em; animation: badge 1s infinite; }
.ri-desc { max-width: 36ch; font-size: 15px; color: #e6deff; margin: 8px 0 14px; padding-inline: 16px; }
.ch-hint { position: relative; font-size: 18px; font-weight: 800; color: var(--muted); text-shadow: var(--stroke-sm); animation: twinkle 0.9s ease-in-out infinite alternate; }
.ch-left { position: absolute; right: var(--pad-r); bottom: var(--pad-b); width: 54px; height: 54px; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: var(--hot); border: 3px solid var(--ink); border-radius: 50%; text-shadow: var(--stroke-sm); }
.ch-summary { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; padding-inline: 16px; }
.cs-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 110px; padding: 10px; background: rgba(26, 15, 51, 0.7); border: 3px solid var(--ink); border-radius: 16px; animation: riIn 0.4s cubic-bezier(.2, 1.6, .4, 1) both; }
.cs-item svg, .cs-item img { width: 60px; height: 60px; }
.cs-item b { font-size: 20px; font-weight: 800; text-shadow: var(--stroke-sm); }

/* ---------- Bildirişlər / uçan ikonlar ---------- */
#toasts { position: fixed; top: calc(var(--pad-t) + 64px); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(480px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 16px; font-weight: 700; background: rgba(42, 24, 104, 0.96); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); animation: toastIn 0.35s cubic-bezier(.2, 1.5, .4, 1); transition: opacity 0.4s, transform 0.4s; text-shadow: 0 1px 0 var(--ink); }
.toast svg { width: 26px; height: 26px; flex: none; }
.toast b { color: var(--gold); }
.toast.good { background: rgba(15, 120, 75, 0.96); }
.toast.bad { background: rgba(170, 20, 60, 0.96); }
.toast.out { opacity: 0; transform: translateY(-16px); }
@keyframes toastIn { from { transform: translateY(-30px) scale(0.8); opacity: 0; } }
.flyer { position: fixed; left: 0; top: 0; width: 26px; height: 26px; z-index: 50; pointer-events: none; filter: drop-shadow(0 2px 0 var(--ink)); }
.flyer svg { width: 100%; height: 100%; }
.confetti { position: fixed; left: 0; top: 0; width: 10px; height: 14px; border-radius: 2px; z-index: 50; pointer-events: none; }


/* ---------- Dostlarla (onlayn) ---------- */
.play-zone { display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 10px; align-items: stretch; }
.play-zone .mode-card { grid-column: 1; grid-row: 2; }
.play-zone .btn-play { grid-column: 2; grid-row: 2; }
.friends-btn {
  grid-column: 2; grid-row: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 12px 0 8px;
  background: linear-gradient(180deg, #6dff9e, #13a95b); border: 3px solid var(--ink); border-radius: 15px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 4px 0 var(--ink);
  font-size: 19px; font-weight: 800; text-shadow: var(--stroke-sm); transition: transform 0.1s;
}
.friends-btn:hover { transform: translateY(-2px); }
.friends-btn:active { transform: translateY(3px); }
.friends-btn > .ico { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(26, 15, 51, 0.5)); }
.friends-btn em { font-style: normal; font-size: 11px; letter-spacing: 0.08em; padding: 1px 6px; color: var(--ink); text-shadow: none; background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; white-space: nowrap; }
/* ---------- Ranqlı (açıq matç) ---------- */
.play-zone .ranked-btn { grid-column: 1; grid-row: 1; }
.ranked-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 12px 0 8px;
  background: linear-gradient(180deg, #ffdf7a, #e0841c); border: 3px solid var(--ink); border-radius: 15px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 4px 0 var(--ink);
  font-size: 19px; font-weight: 800; text-shadow: var(--stroke-sm); transition: transform 0.1s;
}
.ranked-btn:hover { transform: translateY(-2px); }
.ranked-btn:active { transform: translateY(3px); }
.ranked-btn em { font-style: normal; font-size: 11px; letter-spacing: 0.06em; padding: 1px 6px; color: #fff; text-shadow: none; background: var(--ink); border-radius: 8px; white-space: nowrap; }
.rk-badge {
  --tc: #d08a4e; position: relative; z-index: 0; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px;
  font-style: normal; font-weight: 800; font-size: 15px; line-height: 1; color: var(--ink); text-shadow: none;
}
.rk-badge::before {
  content: ""; position: absolute; inset: 4px; z-index: -1; transform: rotate(45deg);
  background: radial-gradient(circle at 35% 30%, #fff9, transparent 60%), var(--tc); border: 3px solid var(--ink); border-radius: 6px;
}
.rk-badge.big { width: 58px; height: 58px; font-size: 26px; }
.rk-badge.big::before { inset: 8px; border-radius: 10px; }
.rk-card { --tc: #d08a4e; display: flex; align-items: center; gap: 18px; padding: 14px 16px; margin: 6px 0 10px; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 30%, #2a1d57), #2a1d57); }
.rk-card .rk-badge { margin: 0 4px; }
.rk-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rk-info b { font-size: 22px; text-shadow: var(--stroke-sm); }
.rk-info small { color: var(--muted); font-size: 13px; }
.rk-bar { height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: #1a0f33; overflow: hidden; }
.rk-bar i { display: block; height: 100%; background: var(--tc); }
.rk-hero { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.rk-hero img { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 12px; background: #3a2a6e; }
.rk-hero span { flex: 1; }
.rk-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rk-mode { display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 75%, #fff), var(--mc)); box-shadow: 0 4px 0 var(--ink); color: #fff; transition: transform 0.1s; }
.rk-mode:hover { transform: translateY(-2px); }
.rk-mode:active { transform: translateY(3px); }
.rk-mode svg { width: 38px; height: 38px; }
.rk-mode b { font-size: 16px; text-shadow: var(--stroke-sm); }
.rk-mode small { font-size: 12px; color: var(--ink); font-weight: 800; }
.m-note.warn { color: #ffd23f; }
.m-note .link { color: #5ff6ff; text-decoration: underline; font-weight: 800; }
.mm-online.ranked { background: var(--gold); }
.mm-info { margin: 0; min-height: 1.3em; font-size: 16px; font-weight: 700; color: var(--muted); text-align: center; }
.mm-info b { color: var(--gold); }
.mm-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; }
.mm-players span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 2px solid var(--ink); border-radius: 12px; background: #2a1d57; font-weight: 800; font-size: 14px; animation: toastIn 0.3s; }
.mm-players img { width: 28px; height: 28px; border-radius: 8px; background: #3a2a6e; }
.rw-rank { --tc: var(--gold); }
.rw-rank .rk-badge { width: 30px; height: 30px; }
.rw-rank.up em { color: #6dff9e; }
.rw-rank.down em { color: #ff6b7a; }
.rw-rank.guest small { color: var(--gold); }
.top-filter .rk { padding: 0 12px; font-weight: 800; }
.top-row .rk-badge { width: 26px; height: 26px; font-size: 13px; margin: 0 6px; }
@media (max-width: 640px) {
  /* kiçik ekranda "Ranqlı" — "Dostlar" kimi yığcam kvadrat, OYNA-nın yanında */
  .play-zone .ranked-btn { grid-column: 1; grid-row: 2; flex-direction: column; gap: 2px; width: 78px; height: auto; padding: 8px 4px 4px; border-radius: 16px; font-size: 13px; }
  .play-zone #btnPlay { grid-column: 2; grid-row: 2; }
  .ranked-btn em { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-4deg); display: block !important; }
  .rk-modes { gap: 6px; }
  .rk-mode b { font-size: 13px; }
  .rk-mode small { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .ranked-btn { height: 40px; font-size: 17px; padding: 0 8px 0 4px; gap: 6px; }
  .ranked-btn em { display: none; }
  .rk-badge { width: 24px; height: 24px; font-size: 13px; }
}
.fr-create { width: 100%; }
.fr-create svg { width: 30px; height: 30px; }
.fr-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--muted); font-size: 14px; font-weight: 800; }
.fr-or::before, .fr-or::after { content: ""; flex: 1; height: 3px; border-radius: 2px; background: rgba(196, 184, 255, 0.25); }
.fr-join input { min-width: 0; text-align: center; text-transform: uppercase; letter-spacing: 0.32em; font-size: 26px; }
.fr-join input::placeholder { color: rgba(196, 184, 255, 0.45); letter-spacing: 0.2em; }
#frErr { color: #ffb3c0; font-weight: 800; }

.room-screen .ps-head { flex-wrap: wrap; }
.room-code {
  padding: 4px 14px; font: 800 26px/1.2 var(--font); letter-spacing: 0.18em; color: var(--gold); text-shadow: var(--stroke-sm);
  background: rgba(26, 15, 51, 0.85); border: 3px dashed var(--gold); border-radius: 13px; font-variant-numeric: tabular-nums;
}
.room-code:hover { background: rgba(26, 15, 51, 1); }
.room-body { display: flex; flex-direction: column; gap: 14px; max-width: 980px; width: 100%; margin: 0 auto; padding-bottom: 12px; }
.room-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.room-modes { display: flex; gap: 8px; flex-wrap: wrap; }
.rmode {
  --mc: #ff4f6d; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; font-size: 16px; font-weight: 800; text-shadow: var(--stroke-sm);
  background: linear-gradient(170deg, color-mix(in srgb, var(--mc) 60%, #2a1868), #2a1868); border: 3px solid var(--ink); border-radius: 13px; box-shadow: 0 3px 0 var(--ink); opacity: 0.7;
}
.rmode .ico { width: 30px; height: 30px; }
.rmode.sel { opacity: 1; outline: 3px solid var(--gold); outline-offset: 1px; }
.rmode:disabled { cursor: default; }
.rmode:not(:disabled):hover { opacity: 1; }
.room-diff { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--muted); }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: 0.6; }

.rteams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.rteam { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 3px solid var(--ink); border-radius: 18px; background: rgba(26, 15, 51, 0.55); }
.rteam.t0 { box-shadow: inset 0 0 0 2px rgba(46, 200, 255, 0.35); }
.rteam.t1 { box-shadow: inset 0 0 0 2px rgba(255, 154, 61, 0.4); }
.rteam h4 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: 0.04em; text-shadow: var(--stroke-sm); }
.rteam.t0 h4 { color: #8fe3ff; } .rteam.t1 h4 { color: #ffc58f; }
.rteam-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rvs { font-size: 34px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke); }
.rffa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* komandalı Sağ Qalan: komanda qrupları */
.rsquads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.rsquad { padding: 8px; border: 3px solid var(--ink); border-radius: 16px; background: rgba(26, 15, 51, 0.55); }
.rsquad h5 { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.rsquad-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.rsquad:first-child { border-color: #3ab4ff; }
/* boss tərəfi */
.rteam.boss { border-color: #ff3d8b; background: linear-gradient(180deg, rgba(255, 61, 139, 0.25), rgba(26, 15, 51, 0.55)); }
.rteam.boss .rteam-slots { grid-template-columns: minmax(0, 1fr); }
.rs-boss .rs-bot svg { width: 40px; height: 40px; }
.rteam-slots:has(> :nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
.rteam-slots:has(> :only-child) { grid-template-columns: minmax(0, 160px); justify-content: center; }
.rslot {
  --rc: #8fd3ff; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 4px 8px; min-width: 0; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 45%, #2a1868), #2a1868 75%); border: 3px solid var(--ink); border-radius: 15px; box-shadow: 0 4px 0 var(--ink);
}
.rslot.fresh { animation: slotIn 0.4s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes slotIn { from { transform: scale(0.6); } }
.rslot img { width: 72px; height: 72px; }
.rslot b { max-width: 100%; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--stroke-sm); }
.rslot small { font-size: 12px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.rslot.me { outline: 3px solid var(--gold); outline-offset: 1px; }
.rslot.bot { background: rgba(26, 15, 51, 0.5); border-style: dashed; box-shadow: none; opacity: 0.75; }
.rs-bot { width: 72px; height: 72px; display: grid; place-items: center; font-size: 18px; font-weight: 800; color: var(--muted); border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 3px dashed rgba(196, 184, 255, 0.35); }
.rs-host { position: absolute; top: -10px; left: -8px; width: 30px; height: 30px; transform: rotate(-14deg); filter: drop-shadow(0 2px 0 var(--ink)); }
.rs-me, .rs-wait { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 7px; border: 2px solid var(--ink); }
.rs-me { background: var(--gold); color: var(--ink); }
.rs-wait { top: auto; bottom: 30px; right: 50%; transform: translateX(50%); background: #ff9a3d; color: var(--ink); white-space: nowrap; }
.rs-extra { font-size: 13px; color: var(--muted); }
.room-wait { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 0; font-size: 20px; text-shadow: var(--stroke-sm); }
.room-h { margin: 4px 0 0; font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); }
.room-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.rpick {
  --rc: #8fd3ff; position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 6px; min-width: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 45%, #2a1868), #2a1868 80%); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); transition: transform 0.1s;
}
.rpick:not(:disabled):hover { transform: translateY(-3px); }
.rpick.sel { outline: 4px solid var(--gold); outline-offset: 1px; transform: translateY(-3px); }
.rpick:disabled { opacity: 0.55; }
.rpick img { width: 100%; max-width: 76px; aspect-ratio: 1; }
.rpick b { font-size: 13px; font-weight: 800; text-shadow: var(--stroke-sm); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpick em { position: absolute; top: 3px; right: 3px; font-style: normal; font-size: 9px; letter-spacing: 0.05em; font-weight: 800; padding: 0 4px; border-radius: 6px; background: var(--mint); color: var(--ink); border: 2px solid var(--ink); }
.room-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px var(--pad-r) var(--pad-b) var(--pad-l); background: linear-gradient(180deg, rgba(20, 10, 53, 0), rgba(20, 10, 53, 0.95) 30%); }
.room-status { flex: 1; min-width: 0; font-size: 16px; color: #e6deff; text-shadow: var(--stroke-sm); }
.room-link { display: inline; padding: 1px 8px; margin: 0 2px; font: inherit; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); background: rgba(26, 15, 51, 0.7); border: 2px solid var(--ink); border-radius: 8px; cursor: pointer; user-select: all; -webkit-user-select: all; word-break: break-all; }
.room-link:hover { background: rgba(26, 15, 51, 1); }
.room-foot .btn.big { min-width: 200px; }
.net-ping { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.net-ping::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #8a80b8; border: 2px solid var(--ink); }
.net-ping[data-q="good"]::before { background: var(--self); }
.net-ping[data-q="ok"]::before { background: var(--gold); }
.net-ping[data-q="bad"]::before { background: var(--enemy); }
.hud-ping { position: absolute; top: calc(var(--pad-t) + 54px); right: var(--pad-r); padding: 2px 8px; background: rgba(26, 15, 51, 0.7); border-radius: 9px; text-shadow: none; }
#netStall { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 10px 20px; font-size: 18px; font-weight: 800; text-shadow: var(--stroke-sm); background: rgba(26, 15, 51, 0.88); border: 3px solid var(--gold); border-radius: 14px; white-space: nowrap; animation: badge 1.4s infinite; }
#netBanner { position: fixed; z-index: 40; top: calc(var(--pad-t) + 4px); left: 50%; transform: translateX(-50%); padding: 6px 16px; font-size: 15px; font-weight: 800; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
.mm-online { margin-left: 4px; font-size: 13px; padding: 1px 8px; border-radius: 8px; background: var(--mint); color: var(--ink); text-shadow: none; }
.vs-card.bot { filter: saturate(0.6) brightness(0.88); }
.vs-card.bot em { color: var(--muted); }
.rb-row.friend b::after { content: " · dost"; font-size: 12px; color: #9dffc9; }
.rw-tr.friendly b { font-size: 20px; }

/* ============ Cihaz uyğunluğu: tam ekran, FPS, düymə düzəni ============ */
.hud-full { position: absolute; top: var(--pad-t); right: calc(var(--pad-r) + 56px); width: 46px; height: 46px; padding: 9px; pointer-events: auto; background: rgba(26, 15, 51, 0.75); border: 3px solid var(--ink); border-radius: 13px; color: #fff; }
.hud-full svg { width: 100%; height: 100%; display: block; }
#fpsMeter { position: fixed; left: calc(var(--pad-l) + 2px); bottom: 4px; z-index: 60; font: 700 11px/1 ui-monospace, monospace; color: #c9ffcf; background: rgba(0, 0, 0, 0.55); padding: 3px 6px; border-radius: 6px; pointer-events: none; }
.aim-btn { scale: var(--ctl-scale, 1); }
#touchUI.lefty #touchMove { left: auto; right: 0; }
/* idarəetmə redaktoru */
#ctlEdit { position: fixed; inset: 0; z-index: 80; background: rgba(12, 6, 30, 0.82); touch-action: none; }
#ctlEdit .ce-zone { position: absolute; top: 18%; bottom: 0; width: 48%; border: 3px dashed rgba(255, 255, 255, 0.25); border-radius: 18px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.5); font-weight: 800; }
#ctlEdit .ce-btn { position: absolute; translate: -50% -50%; border-radius: 50%; border: 4px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; text-shadow: var(--stroke-sm); cursor: grab; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35); }
#ctlEdit .ce-btn.atk { width: 118px; height: 118px; background: radial-gradient(circle at 50% 35%, rgba(255, 120, 140, 0.95), rgba(200, 20, 60, 0.9)); }
#ctlEdit .ce-btn.sup { width: 92px; height: 92px; background: radial-gradient(circle, #fff3a0, #ffb000); color: #3a2400; text-shadow: none; }
#ctlEdit .ce-bar { position: absolute; top: var(--pad-t); left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; background: rgba(26, 15, 51, 0.95); border: 3px solid var(--ink); border-radius: 16px; padding: 10px 14px; max-width: calc(100% - 24px); }
#ctlEdit .ce-bar label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
#ctlEdit .ce-bar input[type=range] { width: 120px; }
#ctlEdit .ce-hint { position: absolute; bottom: calc(var(--pad-b) + 6px); left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.7); font-weight: 700; font-size: 14px; text-align: center; width: 90%; }
.set-row .seg button { padding: 6px 9px; }
.set-group { margin: 14px 0 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }

/* ============ Söhbət və döyüşdə ünsiyyət ============ */
.room-chat {
  position: absolute; z-index: 6; right: var(--pad-r); bottom: 84px; width: min(340px, calc(100% - 24px)); height: min(430px, 60vh);
  display: none; flex-direction: column; background: rgba(22, 12, 58, 0.97); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink), 0 10px 40px rgba(0, 0, 0, 0.4); overflow: hidden;
}
.room-screen.chat-open .room-chat { display: flex; animation: rcIn 0.18s ease-out; }
@keyframes rcIn { from { transform: translateY(14px); opacity: 0; } }
.rc-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: rgba(255, 255, 255, 0.06); border-bottom: 2px solid rgba(0, 0, 0, 0.3); }
.rc-head b { font-size: 16px; text-shadow: var(--stroke-sm); }
.rc-close { width: 30px; height: 30px; font-size: 22px; line-height: 1; color: #fff; border-radius: 9px; background: rgba(255, 255, 255, 0.08); }
.rc-log { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; touch-action: pan-y; overscroll-behavior: contain; }
.rc-msg { max-width: 88%; align-self: flex-start; padding: 5px 10px 6px; font-size: 14px; line-height: 1.3; background: rgba(255, 255, 255, 0.09); border-radius: 12px 12px 12px 4px; word-wrap: break-word; overflow-wrap: anywhere; }
.rc-msg b { display: block; font-size: 12px; color: #9fe2ff; cursor: pointer; }
.rc-msg.me { align-self: flex-end; background: rgba(255, 210, 63, 0.18); border-radius: 12px 12px 4px 12px; }
.rc-msg.me b { color: var(--gold); }
.rc-msg.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 0; }
.rc-quick { display: flex; gap: 6px; overflow-x: auto; padding: 6px 8px 0; scrollbar-width: none; touch-action: pan-x; }
.rc-quick button { flex: none; white-space: nowrap; font-size: 13px; font-weight: 800; color: #fff; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(0, 0, 0, 0.35); }
.rc-quick button:hover { background: rgba(255, 255, 255, 0.18); }
.rc-form { display: flex; gap: 6px; padding: 8px; }
.rc-form input { flex: 1; min-width: 0; font: 700 15px var(--font); color: #fff; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(196, 184, 255, 0.35); border-radius: 11px; padding: 6px 10px; }
.rc-form input:focus { outline: none; border-color: var(--gold); }
.room-chat-btn { position: relative; padding: 5px 10px; display: inline-flex; align-items: center; }
.room-chat-btn svg { display: block; }
.room-chat-btn .badge { position: absolute; top: -9px; right: -9px; }
@media (min-width: 1240px) { .room-chat { top: 84px; bottom: 96px; height: auto; } }

/* döyüşdə sürətli söhbət */
.hud-quick { position: absolute; left: var(--pad-l); top: calc(var(--pad-t) + 64px); width: 50px; height: 50px; padding: 0; font-size: 24px; pointer-events: auto; background: rgba(26, 15, 51, 0.78); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
@media (pointer: coarse) { .hud-quick kbd { display: none; } }
.hud-quick kbd { position: absolute; bottom: -8px; right: -8px; font-size: 10px; padding: 0 4px; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); border-radius: 5px; }
#qcWheel { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(12, 6, 30, 0.45); pointer-events: auto; }
.qc-card { width: min(560px, calc(100% - 24px)); padding: 12px; background: rgba(26, 15, 51, 0.96); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); animation: rcIn 0.14s ease-out; }
.qc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qc-grid button { position: relative; padding: 10px 6px; font-size: 15px; font-weight: 800; color: #fff; text-shadow: var(--stroke-sm); background: linear-gradient(180deg, color-mix(in srgb, var(--qc) 40%, #2a1868), #2a1868); border: 3px solid var(--ink); border-radius: 13px; box-shadow: 0 3px 0 var(--ink); }
.qc-grid button i { position: absolute; top: 2px; left: 5px; font-style: normal; font-size: 10px; opacity: 0.7; }
.qc-grid button small { display: block; font-size: 10px; opacity: 0.65; font-weight: 700; }
.qc-emotes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.qc-emotes button { aspect-ratio: 1; padding: 6px; background: rgba(255, 255, 255, 0.08); border: 3px solid var(--ink); border-radius: 14px; }
.qc-emotes button img { width: 100%; height: 100%; display: block; }
.qc-emotes button.pingb { font-size: 12px; font-weight: 800; color: #5ff6ff; display: grid; place-items: center; }
.qc-hint { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
#qcLog { position: absolute; left: var(--pad-l); top: calc(var(--pad-t) + 124px); display: flex; flex-direction: column; gap: 4px; pointer-events: none; max-width: 46%; }
#qcLog div { font-size: 13px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: rgba(26, 15, 51, 0.7); text-shadow: var(--stroke-sm); animation: rcIn 0.15s ease-out; transition: opacity 0.4s; }
@media (max-height: 520px) {
  .hud-quick { width: 42px; height: 42px; font-size: 20px; top: calc(var(--pad-t) + 52px); }
  .qc-grid button { padding: 7px 4px; font-size: 13px; }
  .qc-emotes { margin-top: 6px; gap: 6px; }
  .qc-card { padding: 8px; width: min(520px, calc(100% - 16px)); }
  #qcLog { top: calc(var(--pad-t) + 100px); }
}

/* ============ Sosial mərkəz: profil, hesab, tarixçə, dostlar, reytinq ============ */
.m-card.hub-modal { width: min(640px, calc(100% - 20px)); padding: 12px 14px 16px; }
.hub-tabs { display: flex; gap: 6px; margin: 0 34px 10px 0; overflow-x: auto; scrollbar-width: none; }
.hub-tabs button { position: relative; flex: none; padding: 7px 14px; font-size: 15px; font-weight: 800; color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 3px solid var(--ink); border-radius: 12px; }
.hub-tabs button.on { color: var(--ink); background: var(--gold); }
.hub-tabs .badge { position: absolute; top: -8px; right: -8px; }
.hub-body { max-height: min(62vh, 560px); overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; padding-right: 2px; }
.hub-h { margin: 14px 0 6px; font-size: 14px; font-weight: 800; letter-spacing: 0.04em; color: #cfc6ff; text-transform: uppercase; }
.hub-sub { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 700; }
.empty { padding: 16px; text-align: center; color: var(--muted); font-weight: 700; }
.empty.big { padding: 30px 10px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.acc-box { margin: 10px 0; padding: 12px; background: rgba(255, 255, 255, 0.06); border: 3px solid var(--ink); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.acc-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.acc-row > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acc-row small { color: var(--muted); font-weight: 700; font-size: 12px; }
.acc-ok { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--mint, #5dff9b); color: var(--ink); font-weight: 900; flex: none; }
.acc-code { font-size: 20px; letter-spacing: 0.16em; color: var(--gold); text-shadow: var(--stroke-sm); }
.acc-note { margin: 0; font-size: 14px; line-height: 1.4; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mastery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; }
.ms-row img { width: 44px; height: 44px; }
.ms-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-row b { font-size: 14px; } .ms-row b em { font-style: normal; font-size: 11px; color: var(--gold); margin-left: 4px; }
.ms-row small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ms-bar { height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff9a3d); }
.au-tabs { margin: 0 0 12px; }
.au-form { display: flex; flex-direction: column; gap: 10px; }
.au-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.au-form input { font: 700 17px var(--font); color: #fff; padding: 8px 12px; background: rgba(0, 0, 0, 0.3); border: 3px solid rgba(196, 184, 255, 0.35); border-radius: 12px; min-width: 0; }
.au-form input:focus { outline: none; border-color: var(--gold); }
#auErr { color: #ffb3c0; font-weight: 800; }
.au-hint { font-size: 12px; }
.rec-code { margin: 10px 0 14px; padding: 12px; text-align: center; font: 800 26px/1.2 var(--font); letter-spacing: 0.12em; color: var(--gold); background: rgba(0, 0, 0, 0.35); border: 3px dashed var(--gold); border-radius: 14px; user-select: all; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.cf-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; color: #fff; background: rgba(255, 255, 255, 0.07); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.cf-opt:hover { background: rgba(255, 210, 63, 0.15); }
.cf-opt span { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 800; } .cf-opt span svg { width: 22px; height: 22px; }
.cf-opt small { color: var(--muted); font-weight: 700; }
.lg-list { display: flex; flex-direction: column; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(255, 255, 255, 0.05); border-left: 5px solid #8a80b8; border-radius: 12px; }
.lg-row.win { border-left-color: #5dff6a; } .lg-row.lose { border-left-color: #ff4b5c; } .lg-row.draw { border-left-color: #ffd23f; }
.lg-row img { width: 48px; height: 48px; flex: none; }
.lg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lg-main b { font-size: 15px; } .lg-main b small { font-size: 12px; color: var(--muted); margin-left: 4px; }
.lg-main span, .lg-main > small { font-size: 12px; color: #d6cffb; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-main > small { color: var(--muted); }
.lg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lg-side em { font-style: normal; font-weight: 800; font-size: 14px; } .lg-side em.up { color: #5dff6a; } .lg-side em.down { color: #ff6b7a; } .lg-side .lg-fr { color: var(--muted); font-size: 11px; }
.lg-side .btn { padding: 3px 10px; font-size: 13px; }
.fr-add { margin-bottom: 8px; } .fr-add input { min-width: 0; font-size: 16px; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; margin-bottom: 6px; }
.fr-row img { width: 42px; height: 42px; }
.fr-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .fr-row small { font-size: 12px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.fr-row small svg { width: 13px; height: 13px; }
.fr-dot { width: 12px; height: 12px; border-radius: 50%; background: #6a6390; border: 2px solid var(--ink); flex: none; } .fr-dot.on { background: #5dff6a; box-shadow: 0 0 8px #5dff6a; }
.fr-row .btn { padding: 4px 10px; font-size: 13px; } .fr-wait { color: var(--gold); }
.top-filter { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; }
.top-filter button { flex: none; } .top-filter img { width: 26px; height: 26px; display: block; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); margin-bottom: 5px; }
.top-row img { width: 36px; height: 36px; }
.top-row b { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; } .top-row b small { font-size: 11px; color: var(--muted); }
.top-n { width: 30px; text-align: center; font-weight: 800; font-size: 17px; color: var(--muted); }
.top-row.r1 .top-n { color: #ffd23f; } .top-row.r2 .top-n { color: #e3e8ff; } .top-row.r3 .top-n { color: #ff9a5c; }
.top-row.me { outline: 3px solid var(--gold); background: rgba(255, 210, 63, 0.12); }
.top-row.sticky { position: sticky; bottom: 0; background: #2a1868; }
.top-t { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; } .top-t svg { width: 18px; height: 18px; }
.profile { position: relative; } #pfBadge { position: absolute; top: -6px; right: -6px; }
.train-btn { width: 100%; margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.train-btn small { font-size: 12px; opacity: 0.75; font-weight: 700; }
#trainTag { position: absolute; top: calc(var(--pad-t) + 62px); left: 50%; transform: translateX(-50%); padding: 3px 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink); background: #5ff6ff; border: 3px solid var(--ink); border-radius: 10px; }
/* təkrar (replay) paneli */
#replayBar { position: fixed; z-index: 45; left: 50%; bottom: max(10px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(760px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: rgba(26, 15, 51, 0.92); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); }
#replayBar .rb-top { display: flex; align-items: center; gap: 8px; }
#replayBar .rb-tag { font-weight: 800; font-size: 13px; color: #ff6b7a; letter-spacing: 0.08em; }
#replayBar input[type=range] { flex: 1; min-width: 0; accent-color: var(--gold); }
#replayBar .rb-time { font: 800 13px/1 ui-monospace, monospace; color: #e6deff; white-space: nowrap; }
#replayBar .rb-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#replayBar button { padding: 4px 10px; font-size: 14px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.08); border: 2px solid var(--ink); border-radius: 10px; }
#replayBar button.on { background: var(--gold); color: var(--ink); }
#replayBar .rb-cam { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#replayBar .rb-close { margin-left: auto; background: #c8203f; }

/* ============ QALMAQAL hadisəsi və qəhrəman təkamülü ============ */
#qeBar { position: absolute; top: calc(var(--pad-t) + 74px); left: 50%; transform: translateX(-50%); min-width: 230px; padding: 5px 14px 7px; text-align: center; background: rgba(26, 15, 51, 0.85); border: 3px solid var(--qc, #ffd23f); border-radius: 14px; box-shadow: 0 0 22px color-mix(in srgb, var(--qc, #ffd23f) 55%, transparent); animation: qeIn 0.35s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none; }
#qeBar b { display: block; font-size: 15px; letter-spacing: 0.04em; color: var(--qc, #ffd23f); text-shadow: var(--stroke-sm); }
#qeBar i { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
#qeBar s { display: block; height: 100%; width: 100%; background: var(--qc, #ffd23f); border-radius: 3px; text-decoration: none; }
@keyframes qeIn { from { transform: translateX(-50%) scale(0.4); opacity: 0; } }
#evoCards { position: absolute; left: 50%; bottom: calc(var(--pad-b) + 96px); transform: translateX(-50%); display: flex; gap: 10px; pointer-events: auto; animation: qeIn 0.3s cubic-bezier(.2, 1.5, .4, 1); }
#evoCards .ev-head { position: absolute; left: 0; right: 0; top: -26px; text-align: center; font-size: 15px; font-weight: 800; color: var(--gold); text-shadow: var(--stroke-sm); white-space: nowrap; }
#evoCards button { position: relative; width: 132px; padding: 8px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--ec) 45%, #2a1868), #1d1050); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink), 0 0 16px color-mix(in srgb, var(--ec) 40%, transparent); }
#evoCards button:hover { transform: translateY(-3px); }
#evoCards .ev-ico { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 0 #1b1033); }
#evoCards b { font-size: 16px; text-shadow: var(--stroke-sm); }
#evoCards small { font-size: 11.5px; font-weight: 700; line-height: 1.25; }
#evoCards small.cons { color: #ffb3c0; }
#evoCards kbd { position: absolute; top: 4px; left: 6px; font-size: 10px; padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.4); }
#evoCards .rec { position: absolute; top: -9px; right: -6px; font-size: 9.5px; font-weight: 800; padding: 1px 5px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; }
@media (max-height: 520px) {
  #qeBar { top: calc(var(--pad-t) + 58px); min-width: 190px; padding: 3px 10px 5px; }
  #qeBar b { font-size: 13px; }
  #evoCards { bottom: calc(var(--pad-b) + 76px); gap: 6px; }
  #evoCards button { width: 112px; padding: 5px 6px 7px; }
  #evoCards .ev-ico { font-size: 20px; }
  #evoCards b { font-size: 14px; }
  #evoCards small { font-size: 10.5px; }
}
@media (pointer: coarse) { #evoCards kbd { display: none; } }

/* ============ Telefon: çevirmə ekranı və tam ekran bələdçisi ============ */
#rotateHint { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: rgba(14, 7, 36, 0.94); }
#rotateHint b { font-size: 24px; text-shadow: var(--stroke-sm); }
#rotateHint small { font-size: 15px; color: var(--muted); font-weight: 700; max-width: 280px; }
.rh-phone { width: 64px; height: 108px; border: 6px solid #fff; border-radius: 14px; position: relative; animation: rhTurn 2.2s ease-in-out infinite; box-shadow: 0 0 30px rgba(159, 243, 255, 0.4); }
.rh-phone::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 18px; height: 4px; margin-left: -9px; border-radius: 2px; background: #fff; }
@keyframes rhTurn { 0%, 20% { transform: rotate(0deg); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
.a2hs-steps { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; text-align: left; }
.a2hs-steps div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255, 255, 255, 0.07); border-radius: 12px; font-size: 15px; font-weight: 700; }
.a2hs-steps em { flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--ink); background: var(--gold); border-radius: 50%; }
.a2hs-steps svg { flex: none; width: 26px; height: 26px; }

/* ---------- Ekran ölçüləri ---------- */
@media (max-width: 900px) {
  .menu-btn { width: 64px; height: 64px; padding: 0; justify-content: center; }
  .menu-btn span { display: none; }
  .mb-ico { width: 42px; height: 42px; }
  .btn-play { width: 170px; min-height: 80px; font-size: 38px; }
  .mode-card { width: 210px; }
  .hero-detail { grid-template-columns: minmax(0, 1fr); }
  .hd-left { flex-direction: row; flex-wrap: wrap; text-align: left; align-items: center; justify-content: center; gap: 4px 14px; }
  .hd-portrait { width: 150px; }
}
@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .profile { padding-right: 10px; }
  .profile img { width: 38px; height: 38px; }
  .pf-txt > b { font-size: 15px; max-width: 26vw; }
  .cur { min-width: 0; height: 34px; padding-right: 9px; }
  .cur .ico { width: 26px; height: 26px; margin-left: -10px; }
  .cur b { font-size: 15px; }
  .icon-btn { width: 40px; height: 40px; padding: 6px; }
  .side-menu { flex-direction: row; top: calc(var(--pad-t) + 60px); transform: none; left: var(--pad-l); right: var(--pad-r); justify-content: space-between; }
  .menu-btn { width: 56px; height: 56px; border-radius: 14px; }
  .mb-ico { width: 36px; height: 36px; }
  .pass-chip { top: calc(var(--pad-t) + 126px); bottom: auto; right: var(--pad-r); padding: 4px 10px 4px 4px; }
  .pc-ring { width: 38px; height: 38px; } .pc-ring b { width: 26px; height: 26px; font-size: 14px; }
  .pc-txt b { font-size: 14px; } .pc-txt small { font-size: 12px; }
  .hero-plate { bottom: calc(var(--pad-b) + 168px); }
  .hp-name { font-size: 34px; }
  .play-zone { left: var(--pad-l); right: var(--pad-r); flex-direction: column; gap: 10px; }
  .streak-chip { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(100% + 8px); }
  .streak-chip span { display: none; }
  .mode-card { width: 100%; }
  .btn-play { width: 100%; min-height: 74px; font-size: 38px; }
  .tok-wrap { top: calc(var(--pad-t) + 132px); bottom: auto; }
  .tok-track { width: 120px; }
  .first-win { display: none; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hc-name { font-size: 19px; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day.big { grid-column: span 3; }
  .res-board { grid-template-columns: minmax(0, 1fr); }
  .res-board.ffa { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .res-board.ffa .rb-row b { font-size: 13px; }
  .res-board.ffa .rb-rank { width: 22px; font-size: 15px; }
  .res-board.ffa .rb-mvp { display: none; }
  .res-rewards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw { padding: 6px 8px; }
  .rw b { font-size: 20px; } .rw em { font-size: 18px; }
  .rw > svg { width: 30px; height: 30px; }
  .rb-s.dmg { display: none; }
  .vs-card { width: 100px; } .vs-card img { width: 76px; height: 76px; }
  .mm-vs.ffa .vs-card { width: 80px; } .mm-vs.ffa .vs-card img { width: 60px; height: 60px; }
  .vs-card span { display: none; }
  .hud-top { gap: 6px; }
  .ht-team b { min-width: 48px; height: 42px; font-size: 26px; }
  .ht-timer { font-size: 22px; }
  #killfeed { top: calc(var(--pad-t) + 100px); }
  .kf-n { max-width: 70px; }
  .aim-btn.attack { width: 100px; height: 100px; right: calc(var(--pad-r) + 10px); bottom: calc(var(--pad-b) + 20px); }
  .aim-btn.super { width: 78px; height: 78px; right: calc(var(--pad-r) + 124px); bottom: calc(var(--pad-b) + 28px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .side-menu { gap: 6px; top: 54%; }
  .menu-btn { height: 48px; width: 52px; }
  .mb-ico { width: 32px; height: 32px; }
  .hero-plate { bottom: 8px; }
  .hp-name { font-size: 28px; }
  .hp-title { display: none; }
  .pass-chip { top: calc(var(--pad-t) + 54px); }
  .btn-play { min-height: 66px; width: 150px; font-size: 32px; }
  .mode-card { width: 180px; padding: 6px 8px; }
  .mode-card > .ico { width: 40px; height: 40px; }
  .tok-wrap { display: none; }
  .track-scroll { padding-top: 10px; }
  .nd-card, .tr-card { aspect-ratio: auto; height: 110px; }
  .mc-txt b { font-size: 16px; white-space: nowrap; }
  .mc-txt small { font-size: 12px; white-space: nowrap; }
  .mc-change { display: none; }
  .streak-chip { padding: 2px 10px 2px 4px; bottom: calc(100% + 8px); }
  .streak-chip span { display: none; }
  .streak-chip b { font-size: 13px; }
  .streak-chip svg { width: 20px; height: 20px; }
  /* döyüş HUD-u alçaq ekranda */
  .ht-team b { min-width: 46px; height: 38px; font-size: 24px; }
  .ht-timer { font-size: 20px; padding: 2px 10px; }
  .ht-zone { height: 30px; } .ht-zone b { font-size: 16px; line-height: 24px; }
  .hud-pause { width: 40px; height: 40px; padding: 7px; }
  #tutorial { top: calc(var(--pad-t) + 64px); bottom: auto; font-size: 13px; padding: 6px 12px; }
  #superMeter { transform: translateX(-50%) scale(0.8); transform-origin: 50% 100%; }
  .aim-btn.attack { width: 96px; height: 96px; right: calc(var(--pad-r) + 12px); bottom: calc(var(--pad-b) + 12px); }
  .aim-btn.super { width: 74px; height: 74px; right: calc(var(--pad-r) + 122px); bottom: calc(var(--pad-b) + 22px); }
  #killfeed { top: calc(var(--pad-t) + 48px); }
  .kf { font-size: 12px; } .kf img { width: 22px; height: 22px; }
  #countdown { top: 26%; }
  #announce { top: 16%; }
  .res-title { font-size: 44px; }
  .res-wrap { gap: 8px; }
}
@media (max-width: 900px) {
  .room-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rffa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rslot img, .rs-bot { width: 58px; height: 58px; }
}
@media (max-width: 640px) {
  .play-zone { grid-template-columns: auto minmax(0, 1fr); }
  .play-zone .friends-btn { grid-column: 1; grid-row: 1; flex-direction: column; gap: 0; width: 78px; height: auto; padding: 6px 4px 4px; border-radius: 16px; }
  .play-zone .mode-card { grid-column: 2; grid-row: 1; }
  .play-zone .btn-play { grid-column: 1 / -1; grid-row: 2; }
  .friends-btn > .ico { width: 34px; height: 34px; }
  .friends-btn span { font-size: 13px; }
  .friends-btn em { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-4deg); }
  .mc-day-flag { left: auto; right: 64px; }
  .room-screen .ps-head h2 { font-size: 22px; flex-basis: calc(100% - 64px); }
  .room-screen .ps-head .room-code { margin-left: 62px; }
  .room-code { font-size: 22px; }
  .rteams { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rvs { text-align: center; font-size: 22px; line-height: 1; }
  .rteam { padding: 8px; }
  .rteam-slots { gap: 6px; }
  .rslot img, .rs-bot { width: 50px; height: 50px; }
  .rs-bot { font-size: 14px; }
  .rslot b { font-size: 13px; }
  .rffa { gap: 6px; }
  .rmode { font-size: 14px; padding: 4px 9px 4px 4px; }
  .rmode .ico { width: 24px; height: 24px; }
  .room-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .room-foot { flex-wrap: wrap; gap: 8px; }
  .room-status { flex-basis: 100%; order: -1; font-size: 14px; text-align: center; }
  .room-ping { order: -2; }
  .room-foot .btn { flex: 1; }
  .room-foot .btn.big { min-width: 0; font-size: 20px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .play-zone { row-gap: 8px; }
  .friends-btn { height: 40px; font-size: 17px; padding: 0 8px 0 4px; gap: 6px; }
  .friends-btn > .ico { width: 28px; height: 28px; }
  .friends-btn em { display: none; }
  .mode-card { width: 156px; }
  .hero-plate { left: 41%; }
  .hero-plate:hover { transform: translateX(-50%); }
  .mc-day-flag { left: auto; right: 8px; top: -16px; }
  .room-body { gap: 8px; }
  .rslot img, .rs-bot { width: 44px; height: 44px; }
  .rpick img { max-width: 48px; }
  .room-foot { padding-top: 6px; }
  .room-foot .btn.big { min-height: 48px; font-size: 20px; }
}
/* kiçik üfüqi telefonlar (≤ 430px hündürlük): başlıq və alt panel bir sətirdə */
@media (max-height: 430px) and (orientation: landscape) {
  .room-screen .ps-head { flex-wrap: nowrap; gap: 8px; padding-top: max(6px, env(safe-area-inset-top, 0px)); padding-bottom: 4px; }
  .room-screen .ps-head h2 { font-size: 18px; flex-basis: auto; white-space: nowrap; }
  .room-screen .ps-head .room-code { margin-left: auto; font-size: 18px; padding: 2px 10px; }
  .room-screen .back-btn { width: 40px; height: 40px; }
  .room-foot { flex-wrap: nowrap; gap: 8px; padding-top: 4px; }
  .room-status { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .room-foot .btn { padding-top: 6px; padding-bottom: 6px; white-space: nowrap; font-size: 15px; }
  .room-foot .btn.big { min-width: 0; min-height: 42px; font-size: 18px; padding: 0 18px; }
  .room-foot .net-ping { display: none; }
  .room-chat { bottom: 60px; height: calc(100% - 120px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
