/* ==========================================================
   NEON GRID RUSH - Cyber-Arcade / synthwave HUD
   Sadece transform / opacity / filter animasyonu (oyun içi).
   ========================================================== */
:root {
  --bg: #0B0F19;
  --cyan: #22F5FF;
  --green: #3BFFA8;
  --gold: #FFC83D;
  --magenta: #FF3DCB;
  --red: #FF3B5C;
  --purple: #A66BFF;
  --blue: #4d7cff;
  --text: #e6f1ff;
  --muted: #7d8ba8;
  --glass: rgba(14, 20, 38, .66);
  --line: rgba(34, 245, 255, .3);
  --line-soft: rgba(34, 245, 255, .16);
  --r: 14px;
  --r-s: 10px;
  --brk: 9px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  /* izgara: genişlik ve yüksekliğe göre sınırlı en büyük kare */
  --board: min(calc(100vw - 24px - var(--sal) - var(--sar)), calc(100vh - 168px - var(--sat) - var(--sab)), 560px);
}
@supports (height: 100dvh) {
  :root { --board: min(calc(100vw - 24px - var(--sal) - var(--sar)), calc(100dvh - 168px - var(--sat) - var(--sab)), 560px); }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font);
  touch-action: manipulation; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body[data-state="countdown"], body[data-state="playing"], body[data-state="paused"] { overflow: hidden; }
.hidden { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

/* ---------------- arka plan ---------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #04050d 0%, #0B0F19 50%, #190a30 100%); }
.bg-aurora { position: absolute; inset: 0;
  background: radial-gradient(70% 38% at 50% 58%, rgba(255, 61, 203, .28), transparent 72%),
              radial-gradient(48% 30% at 18% 24%, rgba(34, 245, 255, .1), transparent 72%),
              radial-gradient(44% 30% at 85% 30%, rgba(166, 107, 255, .13), transparent 72%); }
.bg-tint { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.bg-tint-od { background: radial-gradient(75% 45% at 50% 60%, rgba(255, 200, 61, .34), rgba(255, 61, 203, .2) 55%, transparent 80%); }
.bg-tint-late { background: radial-gradient(80% 50% at 50% 55%, rgba(255, 59, 92, .36), transparent 78%); }
body.od .bg-tint-od, body.late .bg-tint-late { opacity: 1; }

.bg-stars { position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 0 50%, transparent 62%); mask-image: linear-gradient(#000 0 50%, transparent 62%); }
.stars { position: absolute; left: 0; right: 0; top: -240px; bottom: 0; }
.stars-a { background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(34,245,255,.8) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,61,203,.75) 0 1.2px, transparent 1.8px);
  background-size: 240px 240px, 240px 240px, 240px 240px;
  background-position: 30px 40px, 150px 130px, 210px 20px;
  animation: drift 46s linear infinite; }
.stars-b { background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 0 .8px, transparent 1.3px),
    radial-gradient(circle, rgba(166,107,255,.7) 0 1.1px, transparent 1.7px);
  background-size: 160px 160px, 160px 160px;
  background-position: 90px 70px, 20px 120px;
  opacity: .8; animation: drift2 70s linear infinite; }
@keyframes drift { to { transform: translate3d(0, 240px, 0); } }
@keyframes drift2 { to { transform: translate3d(0, 160px, 0); } }
body.od .stars-a { animation-duration: 16s; }
body.od .stars-b { animation-duration: 26s; }

.bg-sun { position: absolute; left: 50%; top: 58%; width: min(54vmin, 340px); height: min(54vmin, 340px); border-radius: 50%;
  transform: translate(-50%, -100%); opacity: .42; transition: opacity .6s ease;
  background: linear-gradient(180deg, #FFC83D 0%, #FF7A59 45%, #FF3DCB 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 66%, transparent 66% 71%, #000 71% 80%, transparent 80% 86%, #000 86% 100%);
  mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 66%, transparent 66% 71%, #000 71% 80%, transparent 80% 86%, #000 86% 100%); }
body[data-state="playing"] .bg-sun, body[data-state="paused"] .bg-sun, body[data-state="countdown"] .bg-sun { opacity: .2; }

.bg-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; perspective: 360px; perspective-origin: 50% 0; overflow: hidden;
  transition: filter .6s ease;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 38%); mask-image: linear-gradient(180deg, transparent 0, #000 38%); }
.bg-floor::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--magenta), var(--cyan), var(--magenta), transparent); box-shadow: 0 0 14px var(--magenta); opacity: .8; }
.floor-plane { position: absolute; left: -100%; width: 300%; top: 0; height: 100%; transform-origin: 50% 0; transform: rotateX(72deg); }
.floor-grid { position: absolute; left: 0; right: 0; top: -64px; bottom: 0;
  background-image: linear-gradient(rgba(34, 245, 255, .7) 2px, transparent 2px), linear-gradient(90deg, rgba(34, 245, 255, .7) 2px, transparent 2px);
  background-size: 64px 64px; animation: floormove 3.4s linear infinite; }
@keyframes floormove { to { transform: translate3d(0, 64px, 0); } }
body.od .bg-floor { filter: hue-rotate(132deg) saturate(1.35); }
body.od .floor-grid { animation-duration: 1.3s; }
body.late .bg-floor { filter: hue-rotate(168deg) saturate(1.3); }
body.late .floor-grid { animation-duration: 2.2s; }
body.od.late .floor-grid { animation-duration: 1.1s; }

.bg-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, transparent 52%, rgba(0, 0, 0, .66) 100%); }
.bg-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px); opacity: .35; }
.bg-noise { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 59, 92, .08) 25%, rgba(255, 59, 92, .8) 100%); }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 45; width: 100%; height: 100%; pointer-events: none; }

/* ---------------- iskelet ---------------- */
.app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(54px + var(--sat)) calc(12px + var(--sar)) calc(18px + var(--sab)) calc(12px + var(--sal)); }
@supports (height: 100dvh) { .app { min-height: 100dvh; } }
body[data-state="countdown"] .app, body[data-state="playing"] .app, body[data-state="paused"] .app { height: 100vh; overflow: hidden; }
@supports (height: 100dvh) {
  body[data-state="countdown"] .app, body[data-state="playing"] .app, body[data-state="paused"] .app { height: 100dvh; }
}
.screen { display: none; width: 100%; max-width: 900px; flex-direction: column; align-items: center; gap: 12px; }
.screen.active { display: flex; animation: scrin .34s cubic-bezier(.2, .8, .2, 1) backwards; }
.screen.leaving { animation: scrout .18s ease-in forwards; pointer-events: none; }
@keyframes scrin { from { opacity: 0; transform: scale(.94); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes scrout { to { opacity: 0; transform: scale(1.05); filter: blur(7px); } }
.screen.active .st { animation: stin .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms + 90ms); }
@keyframes stin { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.97); } to { opacity: 1; transform: none; } }

/* kontroller */
.ctl { position: fixed; z-index: 60; top: calc(10px + var(--sat)); right: calc(10px + var(--sar)); display: flex; gap: 8px; }
.ctl-btn { position: relative; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: var(--r-s);
  border: 1px solid var(--line); background: rgba(10, 16, 32, .78); color: var(--cyan); cursor: pointer;
  box-shadow: 0 0 12px rgba(34, 245, 255, .22), inset 0 0 8px rgba(34, 245, 255, .08); transition: transform .08s; }
.arcade-btn { position: fixed; z-index: 60; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); width: auto; height: 40px; padding: 0 12px;
  font: 700 12px/1 var(--font); letter-spacing: .12em; text-decoration: none; white-space: nowrap; }
.ctl-btn svg { width: 22px; height: 22px; pointer-events: none; }
.ctl-btn:active { transform: scale(.9); }
.ctl-btn.off { color: var(--muted); box-shadow: none; border-color: rgba(125, 139, 168, .3); }
.ctl-btn.off::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; background: var(--red); border-radius: 2px; transform: rotate(-42deg); box-shadow: 0 0 6px var(--red); }

/* HUD köşe süsü (bracket) */
.brk { position: relative; }
.brk::before { content: ""; position: absolute; inset: -3px; pointer-events: none; z-index: 1;
  --b: var(--cyan);
  background:
    linear-gradient(var(--b), var(--b)) top left / var(--brk) 2px no-repeat,
    linear-gradient(var(--b), var(--b)) top left / 2px var(--brk) no-repeat,
    linear-gradient(var(--b), var(--b)) top right / var(--brk) 2px no-repeat,
    linear-gradient(var(--b), var(--b)) top right / 2px var(--brk) no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / var(--brk) 2px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / 2px var(--brk) no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / var(--brk) 2px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / 2px var(--brk) no-repeat;
  filter: drop-shadow(0 0 3px var(--b)); }
.stat-big.brk::before { --b: var(--gold); }

/* ---------------- logo ---------------- */
.logo { display: flex; flex-direction: column; align-items: center; padding-top: 2px; text-align: center; }
.logo-mark { width: 46px; height: 46px; margin-bottom: 4px; filter: drop-shadow(0 0 8px rgba(34, 245, 255, .7)); }
.screen.active .logo-mark { animation: markin .7s cubic-bezier(.2, 1.2, .3, 1) backwards; }
@keyframes markin { from { opacity: 0; transform: scale(.3) rotate(-90deg); } to { opacity: 1; transform: none; } }
.mark-lit { animation: marklit 1.4s ease-in-out infinite alternate; }
@keyframes marklit { from { opacity: .5; } to { opacity: 1; } }

.title { margin: 0; font-weight: 900; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.tl-row { display: flex; gap: .45em; justify-content: center; }
.tl { position: relative; display: inline-block; }
.tl-a, .tl-b { font-size: clamp(26px, 8.6vw, 52px); letter-spacing: .14em; margin-right: -.14em; color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan), 0 0 22px rgba(34, 245, 255, .55); }
.tl-b { color: #eafffe; text-shadow: 0 0 6px var(--cyan), 0 0 26px rgba(166, 107, 255, .7); }
.tl-c { font-size: clamp(56px, 20vw, 118px); letter-spacing: .05em; margin-right: -.05em; margin-top: -.06em;
  background: linear-gradient(180deg, #fff3b0 0%, var(--gold) 28%, var(--magenta) 72%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 61, 203, .7)) drop-shadow(0 0 28px rgba(255, 200, 61, .35)); }
.tl::before, .tl::after { content: attr(data-text); position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: none; -webkit-text-fill-color: currentColor; text-shadow: none; }
.tl::before { color: var(--red); animation: gl1 5.4s infinite steps(1); }
.tl::after { color: var(--cyan); animation: gl2 5.4s infinite steps(1); }
.tl-b::before, .tl-b::after { animation-delay: 1.3s; }
.tl-c::before, .tl-c::after { animation-delay: 2.6s; }
@keyframes gl1 { 0%, 90%, 100% { opacity: 0; } 91% { opacity: .9; transform: translate(-5px, 0); clip-path: inset(10% 0 62% 0); } 93% { opacity: .9; transform: translate(6px, 1px); clip-path: inset(58% 0 14% 0); }
  95% { opacity: .9; transform: translate(-3px, -1px); clip-path: inset(32% 0 38% 0); } 97% { opacity: 0; } }
@keyframes gl2 { 0%, 91%, 100% { opacity: 0; } 92% { opacity: .9; transform: translate(5px, 1px); clip-path: inset(48% 0 22% 0); } 94% { opacity: .9; transform: translate(-6px, 0); clip-path: inset(6% 0 70% 0); }
  96% { opacity: .9; transform: translate(3px, 0); clip-path: inset(70% 0 6% 0); } 98% { opacity: 0; } }
.screen.active .tl-a { animation: tlin .8s cubic-bezier(.2, .9, .2, 1.1) .08s backwards; }
.screen.active .tl-b { animation: tlin .8s cubic-bezier(.2, .9, .2, 1.1) .2s backwards; }
.screen.active .tl-c { animation: tlin .9s cubic-bezier(.2, .9, .2, 1.15) .34s backwards; }
@keyframes tlin { from { opacity: 0; transform: translate3d(0, -16px, 0) scale(1.35); filter: blur(10px); } to { opacity: 1; transform: none; } }

/* küçük başlık (özet) */
.title.small { display: block; font-size: clamp(24px, 7vw, 40px); letter-spacing: .1em; color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 26px rgba(34, 245, 255, .55), 0 0 46px rgba(166, 107, 255, .45); }
.title.small::before, .title.small::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen; text-shadow: none; }
.title.small::before { color: var(--red); animation: gl1 5.4s infinite steps(1); }
.title.small::after { color: var(--magenta); animation: gl2 5.4s infinite steps(1); }

.tagline { margin: 8px 0 0; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.tagline .cur { color: var(--cyan); margin-left: 2px; text-shadow: 0 0 8px var(--cyan); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.best-chip { margin: 10px 0 0; display: inline-flex; align-items: baseline; gap: 8px; padding: 4px 14px; border-radius: 99px;
  border: 1px solid rgba(255, 200, 61, .5); background: rgba(255, 200, 61, .08); box-shadow: 0 0 14px rgba(255, 200, 61, .22); }
.best-chip span { font-size: 10px; letter-spacing: .22em; color: var(--gold); }
.best-chip b { font: 900 16px var(--mono); color: var(--gold); text-shadow: 0 0 8px var(--gold); font-variant-numeric: tabular-nums; }

/* ---------------- paneller ---------------- */
.menu-cols { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 760px) { .menu-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; width: 100%;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 22px rgba(34, 245, 255, .1), inset 0 0 18px rgba(34, 245, 255, .05); }
.panel-h { margin: 14px 0 8px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 8px rgba(34, 245, 255, .6); }
.panel > .panel-h:first-child { margin-top: 0; }
.label { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input { width: 100%; padding: 12px 14px; font: 600 18px var(--mono); color: var(--text); background: rgba(0, 0, 0, .45);
  border: 1px solid var(--line); border-radius: var(--r-s); outline: none; user-select: text; -webkit-user-select: text; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 14px rgba(34, 245, 255, .5), inset 0 0 10px rgba(34, 245, 255, .12); }
.err { min-height: 18px; margin: 6px 0; color: var(--red); font-size: 13px; text-shadow: 0 0 8px rgba(255, 59, 92, .6); }
.muted { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 10px 0 0; }

/* ---------------- butonlar ---------------- */
.btn { position: relative; overflow: hidden; font: 800 16px var(--font); letter-spacing: .1em; text-transform: uppercase; padding: 13px 22px; border-radius: var(--r-s); cursor: pointer;
  color: var(--cyan); background: rgba(34, 245, 255, .08); border: 1px solid var(--cyan);
  box-shadow: 0 0 12px rgba(34, 245, 255, .3), inset 0 0 12px rgba(34, 245, 255, .1);
  transition: transform .09s ease; user-select: none; -webkit-user-select: none; }
.btn:active { transform: scale(.94); }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -50%; width: 36%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); transform: translate3d(-100%, 0, 0) skewX(-22deg); }
.btn-primary { width: 100%; color: #04101a; background: linear-gradient(90deg, var(--cyan), var(--green)); border-color: transparent;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .25); animation: btnglow 1.7s ease-in-out infinite alternate; }
.btn-primary::after { animation: shine 3.4s ease-in-out 1.2s infinite; }
@keyframes btnglow { from { filter: drop-shadow(0 0 5px rgba(34, 245, 255, .55)); } to { filter: drop-shadow(0 0 16px rgba(59, 255, 168, .95)); } }
@keyframes shine { 0% { opacity: 1; transform: translate3d(-100%, 0, 0) skewX(-22deg); } 30%, 100% { opacity: 1; transform: translate3d(480%, 0, 0) skewX(-22deg); } }
.btn:active::after { animation: shine .45s ease-out; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 560px; }
.btn-row .btn { flex: 1 1 140px; white-space: nowrap; }
@media (max-width: 420px) { .btn-row .btn { letter-spacing: .05em; padding-left: 12px; padding-right: 12px; font-size: 15px; } }

/* ---------------- lejant ---------------- */
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.legend li { display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 10px; font-size: 13px; }
.legend i { color: var(--muted); font-style: normal; text-align: right; }
.chip { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.chip svg { width: 100%; height: 100%; }
.c-std { filter: drop-shadow(0 0 6px var(--cyan)); }
.c-gold { filter: drop-shadow(0 0 7px var(--gold)); }
.c-virus { filter: drop-shadow(0 0 6px var(--red)); }
.c-time { filter: drop-shadow(0 0 6px var(--cyan)); }
.timebar-fill.over { background: linear-gradient(90deg, var(--cyan), var(--gold)); box-shadow: 0 0 16px var(--gold); }
.c-crystal { filter: drop-shadow(0 0 7px var(--purple)); }

/* ---------------- leaderboard ---------------- */
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb li { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .035); font-size: 14px; border: 1px solid transparent;
  animation: lbin .45s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms + 200ms); }
@keyframes lbin { from { opacity: 0; transform: translate3d(-26px, 0, 0); } to { opacity: 1; transform: none; } }
.lb .r { font-family: var(--mono); color: var(--muted); font-weight: 700; text-align: center; }
.lb li.m1 .r, .lb li.m2 .r, .lb li.m3 .r { width: 28px; height: 28px; line-height: 28px; border-radius: 50%; color: #1a1200; font-size: 12px; font-weight: 900; }
.lb li.m1 { border-color: rgba(255, 200, 61, .35); background: linear-gradient(90deg, rgba(255, 200, 61, .13), rgba(255, 255, 255, .03)); }
.lb li.m2 { border-color: rgba(207, 216, 230, .28); background: linear-gradient(90deg, rgba(207, 216, 230, .1), rgba(255, 255, 255, .03)); }
.lb li.m3 { border-color: rgba(224, 145, 90, .3); background: linear-gradient(90deg, rgba(224, 145, 90, .11), rgba(255, 255, 255, .03)); }
.lb li.m1 .r { background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 60%, #c47a00); box-shadow: 0 0 10px rgba(255, 200, 61, .7); }
.lb li.m2 .r { background: radial-gradient(circle at 35% 30%, #ffffff, #cfd8e6 60%, #8a96a8); box-shadow: 0 0 9px rgba(207, 216, 230, .5); }
.lb li.m3 .r { background: radial-gradient(circle at 35% 30%, #ffd2a8, #e0915a 60%, #9a5224); box-shadow: 0 0 9px rgba(224, 145, 90, .5); }
.lb .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .n small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 11px; }
.lb .s { font-family: var(--mono); font-weight: 800; color: var(--cyan); font-variant-numeric: tabular-nums; }
.lb li.m1 .s { color: var(--gold); }
.lb li.m2 .s { color: #dfe7f3; }
.lb li.m3 .s { color: #f0a877; }
.lb li.me { border-color: var(--gold); background: rgba(255, 200, 61, .1); }
.lb li.me::after { content: ""; position: absolute; inset: -1px; border-radius: 9px; pointer-events: none; box-shadow: 0 0 16px rgba(255, 200, 61, .7), inset 0 0 12px rgba(255, 200, 61, .25); animation: mepulse 1.1s ease-in-out infinite alternate; }
@keyframes mepulse { from { opacity: .25; } to { opacity: 1; } }
.lb li.me .n, .lb li.me .s { color: var(--gold); }
.lb li.sep { grid-template-columns: 1fr; text-align: center; color: var(--muted); background: none; padding: 0; animation: none; }

/* ---------------- HUD ---------------- */
.game-shell { display: grid; grid-template-columns: var(--board); justify-content: center; gap: 8px; width: 100%; }
.hud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; min-height: 54px; }
.hud-box { display: flex; flex-direction: column; min-width: 0; }
.hud-mid { position: relative; align-items: center; }
.hud-l { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hud-v { font: 900 clamp(22px, 7vw, 32px)/1.1 var(--mono); color: var(--cyan); text-shadow: 0 0 10px rgba(34, 245, 255, .7); font-variant-numeric: tabular-nums; display: inline-block; transform-origin: left center; }
.hud-mid .hud-v { transform-origin: center; }
#hud-score.bump { animation: bump .28s ease-out; }
@keyframes bump { 40% { transform: scale(1.2); color: #fff; } }
.game-shell[data-heat="2"] #hud-score, .game-shell[data-heat="3"] #hud-score { color: #ffd9a0; text-shadow: 0 0 10px #ff8a2a, 0 0 18px rgba(255, 80, 20, .6); }
.game-shell[data-heat="2"] #hud-score.bump, .game-shell[data-heat="3"] #hud-score.bump { animation: bumphot .3s ease-out; }
@keyframes bumphot { 40% { transform: scale(1.25); color: #fff6d0; text-shadow: 0 0 14px #ffb22e, 0 0 30px #ff4d12, 0 -6px 22px rgba(255, 120, 20, .9); filter: brightness(1.3); } }
#hud-time.bonus { animation: tbonus .5s ease-out; }
#hud-time.penalty { animation: tpenalty .5s ease-out; }
@keyframes tbonus { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.3); color: var(--green); text-shadow: 0 0 18px var(--green); filter: brightness(1.5); } }
@keyframes tpenalty { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.3) translateX(-3px); color: var(--red); text-shadow: 0 0 18px var(--red); filter: brightness(1.4); } 40% { transform: scale(1.2) translateX(3px); } 60% { transform: translateX(-2px); } }
.hud-mid.low { animation: lowpulse .5s ease-in-out infinite alternate; }
.hud-mid.low .hud-v { color: var(--red); text-shadow: 0 0 14px var(--red); }
@keyframes lowpulse { to { transform: scale(1.1); } }
.time-delta { position: absolute; left: 50%; top: 100%; margin-top: -2px; transform: translate(-50%, 0); font: 900 15px var(--mono); opacity: 0; pointer-events: none; white-space: nowrap; }
.time-delta.show-good, .time-delta.show-bad { animation: tdelta .85s ease-out forwards; }
.time-delta.show-good { color: var(--green); text-shadow: 0 0 10px var(--green); }
.time-delta.show-bad { color: var(--red); text-shadow: 0 0 10px var(--red); }
@keyframes tdelta { 0% { opacity: 0; transform: translate(-50%, -8px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, 16px) scale(1); } }

/* kombo rozeti */
.combo-badge { --cc: var(--green); position: relative; width: 54px; height: 54px; display: grid; place-items: center; justify-self: end; }
.combo-badge[data-lv="2"] { --cc: var(--cyan); }
.combo-badge[data-lv="3"] { --cc: #ff8a2a; --f1: #fff2b8; --f2: #ffa62e; --f3: #ff4d12; }
.combo-badge[data-lv="5"] { --cc: #ff5a3c; --f1: #fff6d0; --f2: #ffc83d; --f3: #ff3dcb; }
.combo-badge[data-lv="3"]::before, .combo-badge[data-lv="3"]::after, .combo-badge[data-lv="5"]::before, .combo-badge[data-lv="5"]::after {
  content: ""; position: absolute; pointer-events: none; z-index: -1; transform-origin: 50% 100%; filter: blur(3px); }
.combo-badge[data-lv="3"]::before, .combo-badge[data-lv="5"]::before { left: -22%; right: -22%; top: -30%; bottom: -14%; opacity: .8;
  background: radial-gradient(ellipse 46% 58% at 50% 78%, var(--f1) 0, var(--f2) 42%, var(--f3) 66%, transparent 100%); animation: flick1 .42s ease-in-out infinite alternate; }
.combo-badge[data-lv="3"]::after, .combo-badge[data-lv="5"]::after { left: -26%; right: -26%; top: -42%; bottom: -10%; opacity: .75;
  background:
    radial-gradient(ellipse 12% 34% at 24% 66%, var(--f2), transparent 100%) no-repeat,
    radial-gradient(ellipse 13% 42% at 50% 54%, var(--f1), transparent 100%) no-repeat,
    radial-gradient(ellipse 12% 34% at 76% 66%, var(--f2), transparent 100%) no-repeat;
  animation: flick2 .31s ease-in-out infinite alternate; }
.combo-badge[data-lv="5"]::before, .combo-badge[data-lv="5"]::after { opacity: 1; }
@keyframes flick1 { from { transform: scale(1, .94) translateY(1%); } to { transform: scale(.96, 1.12) translateY(-2%); } }
@keyframes flick2 { from { transform: scale(1.04, .9) skewX(-3deg); opacity: .6; } to { transform: scale(.94, 1.15) skewX(3deg); opacity: 1; } }
.combo-badge.pop { animation: badgepop .6s cubic-bezier(.2, 1.5, .4, 1); }
.combo-badge.drop { animation: badgedrop .35s ease-out; }
@keyframes badgepop { 0% { transform: scale(.6) rotate(0); } 30% { transform: scale(1.4) rotate(-9deg); } 48% { transform: scale(1.3) rotate(8deg); } 64% { transform: scale(1.15) rotate(-5deg); } 80% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes badgedrop { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px) scale(.92); } 60% { transform: translateX(3px); } }
.pips { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pips-base { fill: rgba(8, 12, 24, .8); stroke: rgba(255, 255, 255, .2); stroke-width: 2; }
@supports (color: color-mix(in srgb, red, blue)) { .pips-base { stroke: color-mix(in srgb, var(--cc) 45%, transparent); } }
.seg { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 7; stroke-linecap: round; transition: stroke .12s; }
.seg.on { stroke: var(--cc); filter: drop-shadow(0 0 4px var(--cc)); }
.combo-badge[data-lv="5"] .pips { animation: lv5 .5s ease-in-out infinite alternate; }
@keyframes lv5 { to { transform: scale(1.1); filter: brightness(1.35); } }
.hud-combo { position: relative; font: 900 19px var(--mono); color: var(--cc); text-shadow: 0 0 10px var(--cc); }
.combo-badge[data-lv="5"] .hud-combo { color: #fff0b0; text-shadow: 0 0 8px #ffc83d, 0 0 16px #ff3d3d; }

/* süre çubuğu */
.timebar { position: relative; height: 10px; border-radius: 6px; }
.timebar-clip { height: 100%; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.timebar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--purple), var(--cyan)); transform-origin: left; box-shadow: 0 0 12px var(--cyan); will-change: transform; }
.timebar-fill.low { background: linear-gradient(90deg, var(--red), var(--gold)); box-shadow: 0 0 12px var(--red); animation: lowglow .45s ease-in-out infinite alternate; }
@keyframes lowglow { to { filter: brightness(1.6); } }
.timebar::after { content: ""; position: absolute; inset: -2px; border-radius: 8px; opacity: 0; pointer-events: none; --fc: var(--green); box-shadow: 0 0 18px 4px var(--fc), inset 0 0 8px var(--fc); border: 1px solid var(--fc); }
.timebar.fl-good::after { --fc: var(--green); animation: tbflash .55s ease-out; }
.timebar.fl-bad::after { --fc: var(--red); animation: tbflash .55s ease-out; }
@keyframes tbflash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- ızgara ---------------- */
.board-wrap { position: relative; width: var(--board); height: var(--board); isolation: isolate; }
.board-wrap::before { content: ""; position: absolute; inset: -6px; z-index: 7; pointer-events: none; border-radius: 4px;
  --b: var(--cyan);
  background:
    linear-gradient(var(--b), var(--b)) top left / 16px 2px no-repeat, linear-gradient(var(--b), var(--b)) top left / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) top right / 16px 2px no-repeat, linear-gradient(var(--b), var(--b)) top right / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom left / 16px 2px no-repeat, linear-gradient(var(--b), var(--b)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--b), var(--b)) bottom right / 16px 2px no-repeat, linear-gradient(var(--b), var(--b)) bottom right / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px var(--b)); }
body.od .board-wrap::before { --b: var(--gold); }
body.late .board-wrap::before { --b: var(--red); }
.board-wrap.pulse { animation: boardpulse .42s ease-out; }
@keyframes boardpulse { 0% { transform: scale(1); } 30% { transform: scale(1.04); } 100% { transform: scale(1); } }

.board { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: 2.4%; padding: 2.6%;
  border-radius: 16px; background: linear-gradient(160deg, #0a1122, #070b16); border: 1px solid var(--line);
  box-shadow: 0 0 24px rgba(34, 245, 255, .16), inset 0 0 28px rgba(34, 245, 255, .07);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
body.late .board { border-color: rgba(255, 59, 92, .55); box-shadow: 0 0 24px rgba(255, 59, 92, .25), inset 0 0 28px rgba(255, 59, 92, .09); }
.board.overdrive { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 200, 61, .45), inset 0 0 30px rgba(255, 200, 61, .16); }
.board.kick { animation: kick .07s ease-out; }
@keyframes kick { 0% { transform: translate(var(--kx, 1px), var(--ky, 1px)); } 100% { transform: none; } }
.board.glitch { animation: rgbsplit .42s steps(2) both; }
@keyframes rgbsplit {
  0% { filter: drop-shadow(4px 0 0 rgba(255, 59, 92, .9)) drop-shadow(-4px 0 0 rgba(34, 245, 255, .9)); transform: translateX(3px); }
  25% { filter: drop-shadow(-6px 1px 0 rgba(255, 59, 92, .9)) drop-shadow(6px -1px 0 rgba(34, 245, 255, .9)); transform: translateX(-3px); }
  50% { filter: drop-shadow(5px -1px 0 rgba(255, 59, 92, .9)) drop-shadow(-5px 1px 0 rgba(34, 245, 255, .9)); transform: translateX(2px); }
  75% { filter: drop-shadow(-3px 0 0 rgba(255, 59, 92, .8)) drop-shadow(3px 0 0 rgba(34, 245, 255, .8)); transform: translateX(-1px); }
  100% { filter: none; transform: none; } }
.board.paused .t, .board.paused .t * { animation-play-state: paused !important; }

/* OVERDRIVE: dönen conic kenar */
.od-ring { position: absolute; inset: -5px; z-index: 0; border-radius: 21px; overflow: hidden; opacity: 0; transition: opacity .3s ease; pointer-events: none;
  box-shadow: 0 0 26px rgba(255, 200, 61, .65), 0 0 56px rgba(255, 61, 203, .45); }
.od-ring.on { opacity: 1; }
.od-spin { position: absolute; left: 50%; top: 50%; width: 160%; height: 160%; margin: -80% 0 0 -80%;
  background: conic-gradient(from 0deg, var(--gold), var(--magenta), var(--cyan), transparent 40%, var(--gold) 55%, var(--magenta) 75%, var(--gold));
  animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.od-badge { position: absolute; top: -2px; left: 50%; z-index: 9; padding: 4px 14px; border-radius: 20px; font: 900 13px var(--font); letter-spacing: .25em; white-space: nowrap;
  color: #1a0a00; background: linear-gradient(90deg, var(--gold), var(--magenta)); box-shadow: 0 0 18px var(--gold); opacity: 0; transform: translate(-50%, -50%) scale(.5); pointer-events: none; }
.od-badge.on { opacity: 1; animation: odin .5s cubic-bezier(.2, 1.4, .4, 1) both, odglow .55s .5s ease-in-out infinite alternate; }
@keyframes odin { from { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 60% { transform: translate(-50%, -50%) scale(1.25); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes odglow { to { filter: brightness(1.35); } }

/* hücre */
.cell { position: relative; border-radius: 12px; cursor: pointer; touch-action: manipulation; overflow: visible;
  background: linear-gradient(145deg, rgba(34, 245, 255, .08), rgba(166, 107, 255, .035)); border: 1px solid var(--line-soft);
  box-shadow: inset 0 0 10px rgba(34, 245, 255, .05); transition: transform .06s ease-out; }
.cell:active { transform: scale(.93); }
body.late .cell { border-color: rgba(255, 59, 92, .2); }

/* ---------------- hedefler ---------------- */
.t { --c: var(--cyan); position: absolute; inset: 5%; pointer-events: none; animation: tpop .24s cubic-bezier(.2, 1, .3, 1) backwards; }
@keyframes tpop { 0% { transform: scale(.2); opacity: 0; } 55% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.t.gone { animation: vanish .2s ease-in forwards; }
.t.gone-hit { animation: vanishhit .2s ease-out forwards; }
@keyframes vanish { to { transform: scale(.35); opacity: 0; filter: saturate(0) brightness(.7); } }
@keyframes vanishhit { 0% { transform: scale(1); opacity: 1; filter: brightness(2); } 100% { transform: scale(1.4); opacity: 0; } }
.t-glow { position: absolute; inset: 16%; border-radius: 50%; box-shadow: 0 0 14px 3px var(--c), inset 0 0 12px var(--c); opacity: .75; }
.board.overdrive .t { filter: saturate(1.35) brightness(1.18); }
.board.overdrive .t-glow { opacity: 1; box-shadow: 0 0 22px 8px var(--c), inset 0 0 14px var(--c); }
.t-svg, .t-life { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.lf-track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.lf-bar { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; animation: lifering var(--life, 1200ms) linear forwards; filter: drop-shadow(0 0 2px var(--c)); }
@keyframes lifering { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 100; } }

.t-std { --c: var(--green); }
.t-std .t-svg { animation: breath 1.1s ease-in-out infinite alternate; }
@keyframes breath { from { transform: scale(.95); } to { transform: scale(1.04); } }

.t-gold { --c: var(--gold); }
.t-gold .t-glow { animation: goldglow .32s ease-in-out infinite alternate; }
.t-gold .t-svg { animation: goldpulse .32s ease-in-out infinite alternate; }
.t-rays { position: absolute; inset: -16%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 110, .85) 0 5deg, transparent 5deg 22.5deg);
  -webkit-mask-image: radial-gradient(circle, transparent 36%, #000 44%, transparent 70%); mask-image: radial-gradient(circle, transparent 36%, #000 44%, transparent 70%);
  animation: spin 2.4s linear infinite; }
@keyframes goldpulse { from { transform: scale(.92); } to { transform: scale(1.06); } }
@keyframes goldglow { from { opacity: .5; } to { opacity: 1; } }

.t-virus { --c: var(--red); }
.t-virus .t-svg { animation: jitter .3s steps(1) infinite; }
.t-virus .t-ghost { opacity: .5; mix-blend-mode: screen; filter: hue-rotate(185deg); animation: ghost .45s steps(1) infinite; }
@keyframes jitter { 0% { transform: translate(0, 0); } 25% { transform: translate(-2.5%, 1%) skewX(-4deg); } 50% { transform: translate(2%, -1.5%); } 75% { transform: translate(.5%, .5%) skewX(3deg); } }
@keyframes ghost { 0% { transform: translate(3%, 0); } 33% { transform: translate(-3%, 1%); } 66% { transform: translate(0, -1%); } }

.t-crystal { --c: var(--purple); perspective: 220px; }
.t-gem { position: absolute; inset: 0; animation: gemspin 2.6s ease-in-out infinite; }
.t-gem .t-svg { animation: gemglow .6s ease-in-out infinite alternate; }
@keyframes gemspin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes gemglow { to { filter: brightness(1.35) hue-rotate(25deg); } }
.t-shine { position: absolute; inset: 0; overflow: hidden; clip-path: polygon(30% 14%, 70% 14%, 90% 40%, 50% 92%, 10% 40%); }
.t-shine::before { content: ""; position: absolute; top: -20%; left: -40%; width: 30%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent); animation: shimbar 1.5s ease-in-out infinite; }
@keyframes shimbar { 0%, 30% { transform: translate3d(-120%, 0, 0) skewX(-20deg); } 100% { transform: translate3d(520%, 0, 0) skewX(-20deg); } }
.t-tag { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font: 900 11px var(--mono); color: #fff; text-shadow: 0 0 5px #000, 0 0 3px #000; }

/* ---------------- vuruş VFX ---------------- */
.fx-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.fx-layer > div { position: absolute; pointer-events: none; }
.fx-p { width: var(--sz, 5px); height: var(--sz, 5px); margin: calc(var(--sz, 5px) / -2) 0 0 calc(var(--sz, 5px) / -2); border-radius: 50%;
  background: var(--c); box-shadow: 0 0 6px var(--c); animation: fxp var(--d, 560ms) cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes fxp { from { transform: translate3d(0, 0, 0) scale(1.1); opacity: 1; } to { transform: translate3d(var(--dx), var(--dy), 0) scale(.25); opacity: 0; } }
.fx-ring { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 2px solid var(--c);
  box-shadow: 0 0 12px var(--c), inset 0 0 8px var(--c); animation: fxring .5s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes fxring { from { transform: scale(.3); opacity: 1; } to { transform: scale(var(--s, 3)); opacity: 0; } }
.fx-flash { width: var(--w, 56px); height: var(--w, 56px); margin: calc(var(--w, 56px) / -2) 0 0 calc(var(--w, 56px) / -2); border-radius: 12px; background: var(--c); animation: fxflash .3s ease-out forwards; }
@keyframes fxflash { from { opacity: .55; transform: scale(.85); } to { opacity: 0; transform: scale(1.2); } }
.fx-float { font: 900 var(--fs, 18px)/1 var(--mono); color: var(--c); white-space: nowrap; text-shadow: 0 0 10px var(--c), 0 2px 4px #000;
  animation: fxfloat .85s cubic-bezier(.2, .8, .3, 1) forwards; }
.fx-float.small { font-size: 12px; text-shadow: 0 1px 3px #000; animation-duration: .7s; }
@keyframes fxfloat { 0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; } 18% { transform: translate(-50%, -80%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -210%) scale(1); opacity: 0; } }
.fx-tick { width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid #8b95aa; animation: fxtick .32s ease-out forwards; }
@keyframes fxtick { from { transform: scale(.5); opacity: .85; } to { transform: scale(1.4); opacity: 0; } }
.fx-fly { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--c) 60%, transparent 72%); box-shadow: 0 0 12px 3px var(--c);
  animation: fxfly .6s cubic-bezier(.45, 0, .75, .4) forwards; }
@keyframes fxfly { from { transform: translate3d(0, 0, 0) scale(1.4); opacity: 1; } to { transform: translate3d(var(--dx), var(--dy), 0) scale(.4); opacity: .1; } }

.game-shell.shake-strong { animation: shakes .5s; }
@keyframes shakes { 10%, 90% { transform: translate(-3px, 2px); } 20%, 80% { transform: translate(7px, -4px); } 30%, 50%, 70% { transform: translate(-11px, 5px); } 40%, 60% { transform: translate(11px, -5px); } }

/* banner */
.banner { position: absolute; left: 0; right: 0; z-index: 10; text-align: center; pointer-events: none; opacity: 0; white-space: nowrap;
  font: 900 clamp(22px, calc(var(--board) * .1), 54px)/1 var(--font); letter-spacing: .06em; font-style: italic; }
#banner-combo { top: 30%; }
#banner-final { top: 54%; }
.banner.b-combo, .banner.b-fire, .banner.b-od { color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text; padding: 0 .1em; }
.banner.b-combo { background-image: linear-gradient(180deg, #fffbe0 0%, #ffd24a 45%, #ff8a1f 100%);
  filter: drop-shadow(0 0 8px rgba(255, 200, 61, .9)) drop-shadow(0 3px 0 rgba(0, 0, 0, .6)); }
.banner.b-fire { background-image: linear-gradient(180deg, #fff6c0 0%, #ffb22e 38%, #ff4d1a 72%, #c4101c 100%);
  filter: drop-shadow(0 0 10px rgba(255, 110, 20, .95)) drop-shadow(0 0 26px rgba(255, 60, 20, .6)) drop-shadow(0 3px 0 rgba(0, 0, 0, .6)); }
.banner.b-od { background-image: linear-gradient(180deg, #ffffff 0%, #ffe27a 30%, #ff3dcb 68%, #8a3dff 100%); font-size: clamp(22px, calc(var(--board) * .088), 50px);
  filter: drop-shadow(0 0 10px rgba(255, 61, 203, .95)) drop-shadow(0 0 30px rgba(255, 200, 61, .8)) drop-shadow(0 3px 0 rgba(0, 0, 0, .6)); }
.banner.b-final { color: var(--red); font-size: clamp(22px, calc(var(--board) * .095), 60px); text-shadow: 0 0 12px var(--red), 0 0 40px rgba(255, 59, 92, .7), 0 3px 0 rgba(0, 0, 0, .7); }
.banner.show { animation: bannerin .95s cubic-bezier(.2, 1, .3, 1) forwards; }
.banner.b-final.show { animation-duration: 1.4s; }
.banner.b-fire.show, .banner.b-od.show { animation-name: bannerfire; }
.banner.b-od.show { animation-duration: 1.2s; }
@keyframes bannerin { 0% { opacity: 0; transform: scale(2.2); } 16% { opacity: 1; transform: scale(.94); } 28% { transform: scale(1.05); } 40% { transform: scale(1); }
  76% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9) translate3d(0, -14px, 0); } }

@keyframes bannerfire { 0% { opacity: 0; transform: scale(2.6) rotate(-4deg); } 14% { opacity: 1; transform: scale(.92) rotate(2deg); } 24% { transform: scale(1.12) rotate(-2deg); } 36% { transform: scale(1) rotate(0); }
  44% { transform: scale(1.04); } 52% { transform: scale(1); } 80% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0; transform: scale(.9) translate3d(0, -22px, 0); } }

/* canvas ateş katmanı + OVERDRIVE sıcak vinyet */
.fx-canvas { position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.od-vig { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(255, 90, 20, .34) 82%, rgba(255, 40, 120, .5) 100%); }
body.od .od-vig { opacity: .5; }
body.od .od-vig.beat { animation: vigbeat .3s ease-out; }
body.od .od-vig.bar { animation: vigbar .45s ease-out; }
@keyframes vigbeat { from { opacity: .85; } to { opacity: .5; } }
@keyframes vigbar { from { opacity: 1; transform: scale(1.04); } to { opacity: .5; transform: none; } }

/* geri sayım / duraklat */
.overlay { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; border-radius: 16px; background: rgba(6, 9, 20, .62); overflow: hidden; }
.count-num { position: relative; z-index: 1; font: 900 clamp(110px, 40vw, 230px)/1 var(--mono); color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan), 0 0 60px var(--purple), 0 0 100px rgba(255, 61, 203, .4); animation: countpop .85s cubic-bezier(.15, .8, .3, 1) both; }
.count-num.go { font-size: clamp(80px, 30vw, 170px); color: var(--green); text-shadow: 0 0 22px var(--green), 0 0 70px var(--cyan), 0 0 110px var(--gold); animation: gopop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes countpop { 0% { transform: scale(2.6); opacity: 0; filter: blur(10px); } 28% { opacity: 1; filter: blur(0); } 100% { transform: scale(.9); opacity: .85; } }
@keyframes gopop { 0% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1.4); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
.cd-ring { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; margin: -23% 0 0 -23%; border-radius: 50%; border: 4px solid var(--cyan);
  box-shadow: 0 0 22px var(--cyan), inset 0 0 22px var(--cyan); opacity: 0; animation: cdring .85s ease-out both; }
.cd-ring.go { border-color: var(--green); box-shadow: 0 0 30px var(--green), inset 0 0 30px var(--green); animation: cdgo .7s ease-out both; }
@keyframes cdring { 0% { transform: scale(.4); opacity: .95; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes cdgo { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(4.2); opacity: 0; } }
.pause-box { text-align: center; display: grid; gap: 14px; }
.pause-t { margin: 0; font: 900 24px var(--font); letter-spacing: .2em; color: var(--gold); text-shadow: 0 0 12px var(--gold); }

/* ---------------- özet ---------------- */
.badges { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rec-badge { padding: 6px 20px; border-radius: 99px; font: 900 16px var(--font); letter-spacing: .2em; color: #1a0f00;
  background: linear-gradient(90deg, var(--gold), var(--magenta)); box-shadow: 0 0 22px var(--gold); animation: recin .7s cubic-bezier(.2, 1.5, .4, 1) .9s backwards, recglow .7s ease-in-out 1.6s infinite alternate; }
@keyframes recin { from { opacity: 0; transform: scale(.2) rotate(-12deg); } 60% { transform: scale(1.25) rotate(3deg); } to { opacity: 1; transform: none; } }
@keyframes recglow { to { filter: brightness(1.3); } }
.rank-badge { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 6px; border-radius: 99px; border: 1px solid var(--line); background: rgba(10, 16, 32, .8);
  font: 900 14px var(--font); letter-spacing: .14em; animation: recin .6s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.medal { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 900 14px var(--mono); color: #1a1200; }
.rank-badge.r1 { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 18px rgba(255, 200, 61, .5); }
.rank-badge.r1 .medal { background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 60%, #c47a00); box-shadow: 0 0 12px var(--gold); }
.rank-badge.r2 { border-color: #cfd8e6; color: #dfe7f3; box-shadow: 0 0 16px rgba(207, 216, 230, .4); }
.rank-badge.r2 .medal { background: radial-gradient(circle at 35% 30%, #fff, #cfd8e6 60%, #8a96a8); box-shadow: 0 0 10px #cfd8e6; }
.rank-badge.r3 { border-color: #e0915a; color: #f0a877; box-shadow: 0 0 16px rgba(224, 145, 90, .4); }
.rank-badge.r3 .medal { background: radial-gradient(circle at 35% 30%, #ffd2a8, #e0915a 60%, #9a5224); box-shadow: 0 0 10px #e0915a; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 560px; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; }
.stat-big { grid-column: 1 / -1; padding: 14px; border-color: var(--gold); box-shadow: 0 0 22px rgba(255, 200, 61, .25), inset 0 0 20px rgba(255, 200, 61, .06); }
.stat-v { font: 900 clamp(20px, 5.5vw, 28px) var(--mono); color: var(--cyan); text-shadow: 0 0 10px rgba(34, 245, 255, .6); font-variant-numeric: tabular-nums; }
.stat-big .stat-v { font-size: clamp(40px, 12vw, 66px); color: var(--gold); text-shadow: 0 0 16px var(--gold); }
.stat-v.pop { animation: statpop .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes statpop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.best-line { margin-top: 2px; font: 700 11px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.status { min-height: 20px; margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.status.ok { color: var(--green); }
.status.bad { color: var(--red); }
.panel-lb { max-width: 560px; }

/* ---------------- ekran yerleşimleri ---------------- */
@media (max-height: 700px) {
  .logo-mark { width: 36px; height: 36px; }
  .tl-c { font-size: clamp(48px, 16vw, 92px); }
  .hint { display: none; }
  .tagline { margin-top: 5px; }
}
@media (max-height: 600px) { .tagline { display: none; } }

/* yatay telefon: HUD solda, ızgara sağda (yüksekliğe göre) */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --board: min(calc(100vh - 20px - var(--sat) - var(--sab)), calc(100vw - 300px - var(--sal) - var(--sar)), 560px); }
  @supports (height: 100dvh) { :root { --board: min(calc(100dvh - 20px - var(--sat) - var(--sab)), calc(100vw - 300px - var(--sal) - var(--sar)), 560px); } }
  .app { padding-top: calc(10px + var(--sat)); padding-bottom: calc(10px + var(--sab)); padding-right: calc(64px + var(--sar)); padding-left: calc(104px + var(--sal)); }
  .ctl { flex-direction: column; }
  .game-shell { grid-template-columns: minmax(150px, 210px) var(--board); grid-template-rows: auto auto 1fr; column-gap: 22px; align-items: start; align-content: start; justify-content: center; height: var(--board); }
  .hud { grid-column: 1; grid-row: 1; grid-template-columns: 1fr; gap: 10px; }
  .hud .hud-mid, .hud .hud-box { align-items: flex-start; }
  .combo-badge { justify-self: start; }
  .timebar { grid-column: 1; grid-row: 2; }
  .board-wrap { grid-column: 2; grid-row: 1 / span 3; }
  .hud-v { font-size: 26px; }
  .menu-cols { grid-template-columns: 1fr 1fr; align-items: start; }
  .tl-c { font-size: clamp(44px, 12vh, 80px); }
  .tl-a, .tl-b { font-size: clamp(20px, 6vh, 34px); }
  .logo-mark { display: none; }
  .hint { display: none; }
}

/* ---------------- az hareket ---------------- */
@media (prefers-reduced-motion: reduce) {
  .stars, .floor-grid, .tl::before, .tl::after, .title.small::before, .title.small::after, .od-spin, .t-rays, .t-gem, .t-gem .t-svg, .t-shine::before,
  .t-std .t-svg, .t-gold .t-svg, .t-gold .t-glow, .t-virus .t-svg, .t-virus .t-ghost, .mark-lit, .hud-mid.low, .combo-badge[data-lv="5"] .pips,
  .combo-badge::before, .combo-badge::after, .btn-primary, .btn-primary::after, .lb li.me::after, .timebar-fill.low, .od-badge.on, .rec-badge { animation: none !important; }
  .screen.active, .screen.active .st, .lb li, .screen.active .tl, .screen.active .logo-mark { animation-duration: .01s !important; animation-delay: 0s !important; }
  .screen.leaving { animation-duration: .01s !important; }
  .game-shell.shake-strong { animation: shakesoft .3s !important; }
  .board.glitch, .board.kick { animation: none; }
  body.od .od-vig.beat, body.od .od-vig.bar { animation: none; }
  .combo-badge.pop { animation: none; }
  .banner.b-fire.show, .banner.b-od.show { animation-name: bannerin; }
  .board-wrap.pulse { animation: none; }
  .flash.on { animation-duration: .25s; }
  .fx-ring { animation-duration: .3s; }
  .fx-float { animation-duration: .6s; }
  .od-badge.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  .rec-badge { opacity: 1; }
}
@keyframes shakesoft { 50% { transform: translateX(-2px); } }
