/* ClappyWyce – modern glass / dark gaming UI
   Csak megjelenés: minden ID és JS által használt osztály változatlan. */
:root {
  --bg: #0F1017;
  --bg2: #161824;
  --bg3: #1E2030;
  --card: rgba(30,32,48,.62);
  --glass: rgba(30,32,48,.62);
  --glass-hi: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.09);
  --line-hi: rgba(255,255,255,.18);
  --text: #f2f3fa;
  --muted: #8f93ab;
  --red: #ff4d6a;
  --red-dark: #d62f4d;
  --green: #19e68c;
  --mint: #19e68c;
  --sky: #2ea8ff;
  --gold: #ffc93c;
  --blurple: #5865f2;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pixel: 'Press Start 2P', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(700px 500px at 10% -5%, rgba(255,77,106,.16), transparent 60%),
    radial-gradient(760px 560px at 100% 105%, rgba(46,168,255,.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
button, input { font-family: inherit; }
#app { height: 100dvh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Üveg felületek */
.card, .panel, .over-card, .track-row, .board li, .menu-btn, .char-card, .carousel-center, .tb-left, .tb-icon, .coin-chip, .hud-left, .hearts, .btn-back, .toast {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- FELSŐ SÁV (lebegő badge-ek) ---------- */
#topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 4px;
  z-index: 20;
}
.tb-left { display: flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; min-width: 0; }
.tb-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px; color: #04180f;
  background: linear-gradient(135deg, var(--mint), var(--sky));
}
.tb-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
#tb-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#tb-points { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.tb-icon {
  width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: transform .18s var(--ease), border-color .18s;
}
.coin-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 8px 14px;
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}
.coin-ico {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #ffe98a, var(--gold) 60%, #d69a00);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 0 10px rgba(255,201,60,.45);
}

/* ---------- KÉPERNYŐK ---------- */
#screens { position: relative; flex: 1; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: flex; }
#screen-auth::before, #screen-auth::after,
#screen-menu::before, #screen-menu::after,
#screen-chars::before, #screen-chars::after { content: ""; flex: 1 1 0; min-height: 0; }

/* ---------- LOGÓ ---------- */
.logo {
  font-family: var(--pixel); font-weight: 400; text-align: center;
  font-size: clamp(26px, 9vw, 42px); line-height: 1.35; letter-spacing: 2px;
  color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.logo span { display: block; color: var(--red); text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 28px rgba(255,77,106,.6); }
#screen-auth .logo { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.logo.small { font-size: clamp(20px, 6.5vw, 28px); margin: 0 0 24px; }
.subtitle { color: var(--muted); margin: 14px 0 24px; font-size: 15px; }
.foot-note { color: var(--muted); font-size: 12px; padding-top: 18px; opacity: .8; }
.auth-hint { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }

.card { width: 100%; max-width: 380px; border-radius: 24px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }

form label { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
form input {
  width: 100%; margin-top: 6px;
  background: rgba(15,16,23,.6); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); padding: 13px 14px; font-size: 16px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
form input::placeholder { color: #5d6179; }
form input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(25,230,140,.16); }
.error { color: #ff8a9c; font-size: 13px; margin: -4px 0 12px; font-weight: 600; }

/* ---------- GOMBOK ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  padding: 13px 20px; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn-big { width: 100%; font-size: 16px; padding: 15px 20px; }
.btn-small { padding: 10px 14px; font-size: 13px; }
.btn-red { background: linear-gradient(135deg, #ff5f7a, var(--red-dark)); box-shadow: 0 8px 22px rgba(255,77,106,.3); }
.btn-green { background: linear-gradient(135deg, var(--mint), var(--sky)); color: #04180f; box-shadow: 0 8px 24px rgba(25,230,140,.26); }
.btn-gold { background: linear-gradient(135deg, #ffd96b, #f5a300); color: #3a2800; box-shadow: 0 8px 22px rgba(255,185,40,.26); }
.btn-discord { background: var(--blurple); box-shadow: 0 8px 22px rgba(88,101,242,.4); text-decoration: none; margin-top: 8px; }
.btn-ghost { background: var(--glass-hi); border: 1px solid var(--line-hi); color: var(--text); }
.btn-outline-danger { background: transparent; border: 1px solid rgba(255,77,106,.45); color: #ff9aaa; }
.btn:disabled, .btn.selected, .btn.is-selected {
  background: rgba(25,230,140,.12); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(25,230,140,.4); cursor: default;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
  .btn-green:hover { box-shadow: 0 10px 30px rgba(25,230,140,.42); }
  .btn-red:hover { box-shadow: 0 10px 30px rgba(255,77,106,.45); }
  .btn-gold:hover { box-shadow: 0 10px 30px rgba(255,185,40,.4); }
  .btn:disabled:hover, .btn.selected:hover { transform: none; filter: none; }
  .tb-icon:hover { transform: scale(1.08); border-color: var(--line-hi); }
}

/* ---------- SIKER ---------- */
.success-box { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 340px; width: 100%; }
.check-circle {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  display: grid; place-items: center; font-size: 46px; font-weight: 800; color: #04180f;
  box-shadow: 0 0 0 10px rgba(25,230,140,.12), 0 0 50px rgba(25,230,140,.4);
  animation: pop .45s var(--ease);
}
.success-box h2 { font-size: 26px; font-weight: 700; }
.success-box p { color: var(--muted); }
.success-box .btn { margin-top: 10px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- FŐMENÜ ---------- */
.menu-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; }
.menu-btn {
  display: flex; align-items: center; gap: 14px;
  border-radius: 18px; color: var(--text);
  font-size: 17px; font-weight: 600; padding: 10px 16px 10px 10px; text-align: left; cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.menu-btn i {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 16px; color: var(--sky); background: var(--glass-hi);
}
.menu-btn::after { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 12px; color: var(--muted); }
.menu-list .menu-btn:first-child { border-color: rgba(25,230,140,.4); background: linear-gradient(135deg, rgba(25,230,140,.18), rgba(46,168,255,.14)); }
.menu-list .menu-btn:first-child i { background: linear-gradient(135deg, var(--mint), var(--sky)); color: #04180f; }
.menu-btn.exit { color: #ff9aaa; }
.menu-btn.exit i { color: var(--red); }
.menu-btn:active { transform: scale(.98); }
@media (hover: hover) { .menu-btn:hover { transform: translateY(-2px); border-color: var(--line-hi); box-shadow: 0 10px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(46,168,255,.18); } }

/* ---------- ALKÉPERNYŐK ---------- */
.sub { padding-top: 8px; }
.sub-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; width: 100%; max-width: 440px; display: flex; align-items: center; gap: 12px; }
.sub-title i { color: var(--sky); font-size: 20px; }
.hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; width: 100%; max-width: 440px; }
.btn-back {
  margin-top: auto; border-radius: 999px; color: var(--text);
  font-size: 15px; font-weight: 600; padding: 12px 24px; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .18s var(--ease), border-color .18s;
}
.sub > .btn-back { margin-top: auto; }
.btn-back:active { transform: scale(.97); }
@media (hover: hover) { .btn-back:hover { transform: translateY(-2px); border-color: var(--line-hi); } }
.sub > :nth-last-child(2) { margin-bottom: 18px; }

/* ---------- KARAKTERVÁLASZTÓ ---------- */
#screen-chars .sub-title, #screen-chars .hint { justify-content: center; text-align: center; }
#screen-chars .sub-title { font-size: 22px; }
.carousel { position: relative; display: flex; justify-content: center; width: 100%; max-width: 560px; margin: 8px 0 14px; }
.carousel-center {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  border-radius: 28px; padding: 20px 18px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.char-stage {
  width: min(250px, 100%); aspect-ratio: 1; border-radius: 24px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(25,230,140,.2), rgba(15,16,23,.7) 72%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 40px rgba(0,0,0,.4);
}
#char-preview { width: 94%; height: auto; aspect-ratio: 1; display: block; image-rendering: crisp-edges; image-rendering: pixelated; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.char-name-big { font-size: 22px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-align: center; }
#char-price { font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
#char-price:empty { display: none; }
#char-select { min-width: 190px; width: 100%; max-width: 280px; font-size: 15px; padding: 13px 18px; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 16px; display: grid; place-items: center; cursor: pointer;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
#char-prev { left: 8px; }
#char-next { right: 8px; }
.carousel-arrow:active { transform: translateY(-50%) scale(.92); }
@media (hover: hover) { .carousel-arrow:hover { transform: translateY(-50%) scale(1.08); background: rgba(255,255,255,.18); border-color: rgba(25,230,140,.55); box-shadow: 0 0 18px rgba(25,230,140,.3); } }
@media (min-width: 540px) { #char-prev { left: 0; } #char-next { right: 0; } }
.start-btn { width: 100%; max-width: 400px; }
#screen-chars .btn-back { margin-top: 16px; }

/* Régi karakter-rács (rejtve marad, de kompatibilis) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; max-width: 480px; }
.char-card { border-radius: 18px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.char-card.selected { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint), 0 8px 24px rgba(25,230,140,.2); }
.char-card canvas { width: 96px; height: 72px; image-rendering: crisp-edges; image-rendering: pixelated; }
.char-name { font-weight: 700; font-size: 15px; }
.char-price { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.char-price .coin-ico { width: 12px; height: 12px; }
.char-card .btn { width: 100%; font-size: 13px; padding: 10px 6px; }

/* ---------- ZENE ---------- */
.list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; }
.track-row {
  display: flex; align-items: center; gap: 12px;
  border-radius: 18px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.track-row.active, .track-row.active-none, .track-row.selected {
  border-color: rgba(25,230,140,.65);
  box-shadow: 0 0 0 1px rgba(25,230,140,.35), 0 0 22px rgba(25,230,140,.22);
}
.track-row.active .track-select, .track-row.active-none .track-select { background: var(--mint); color: #04180f; border-color: var(--mint); }
.track-row.active .track-name, .track-row.active-none .track-name { color: var(--mint); }
.track-row.locked { opacity: .6; }
.track-row.locked .track-play { opacity: .4; cursor: not-allowed; }
.track-play {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: linear-gradient(135deg, #ff5f7a, var(--red-dark)); color: #fff; font-size: 16px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,77,106,.3); transition: transform .18s var(--ease);
}
.track-play:active { transform: scale(.92); }
.track-play.mute { background: #3a3d52; box-shadow: none; cursor: default; }
.track-info { flex: 1; min-width: 0; }
.track-name { font-weight: 700; font-size: 15px; }
.track-sub { font-size: 12px; color: var(--muted); }
.track-select {
  border: 1px solid var(--line-hi); background: transparent; color: var(--text);
  border-radius: 12px; padding: 9px 14px; font-weight: 600; cursor: pointer; font-size: 13px;
  transition: background .18s, color .18s, border-color .18s;
}
.track-row.selected .track-select { border-color: var(--mint); color: var(--mint); }

/* ---------- LEADERBOARD ---------- */
.board { width: 100%; max-width: 440px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.board li { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 12px 16px; }
.board li.me { border-color: rgba(255,77,106,.55); background: linear-gradient(90deg, rgba(255,77,106,.2), var(--glass)); }
.rank { width: 32px; font-weight: 800; font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.board li:nth-child(1) .rank { color: var(--gold); }
.board li:nth-child(2) .rank { color: #cfd6e6; }
.board li:nth-child(3) .rank { color: #e09a62; }
.b-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-pts { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- BEÁLLÍTÁSOK ---------- */
.panel { width: 100%; max-width: 440px; border-radius: 20px; padding: 2px 18px; margin-bottom: 12px; }
.panel summary {
  list-style: none; cursor: pointer; font-weight: 700; font-size: 16px; padding: 15px 0;
  display: flex; align-items: center; gap: 8px;
}
.panel summary::-webkit-details-marker { display: none; }
.panel summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 12px; color: var(--muted); transition: transform .2s var(--ease); }
.panel[open] summary::after { transform: rotate(180deg); }
.panel[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.row-toggle { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 16px; font-size: 15px; }
.range-label { display: block; font-size: 14px; color: var(--muted); padding-bottom: 16px; }
input[type=range] { width: 100%; accent-color: var(--mint); margin-top: 10px; }
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; cursor: pointer;
  width: 48px; height: 28px; border-radius: 999px; position: relative;
  background: rgba(255,255,255,.12); border: 1px solid var(--line); transition: background .2s;
}
input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
input[type=checkbox]:checked { background: linear-gradient(135deg, var(--mint), var(--sky)); }
input[type=checkbox]:checked::after { transform: translateX(20px); }
.stack { display: flex; flex-direction: column; gap: 4px; padding-bottom: 16px; }
.stack .btn { width: 100%; margin-top: 4px; }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0 16px; }
#btn-logout { width: 100%; margin-bottom: 16px; }

/* ---------- INFÓ ---------- */
.info-card { display: flex; flex-direction: column; gap: 12px; line-height: 1.6; font-size: 15px; max-width: 440px; }
.info-card b { color: var(--gold); font-weight: 700; }

/* ---------- JÁTÉK ---------- */
.game-screen { padding: 0; overflow: hidden; }
.game-screen.active { display: block; }
#game-canvas { image-rendering: crisp-edges; image-rendering: pixelated; position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 0; pointer-events: none;
}
.hud-left { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; border-radius: 18px; align-items: flex-start; }
#hud-name { font-weight: 600; font-size: 12px; color: var(--muted); max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud-score { font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.15; }
.milestone {
  background: linear-gradient(135deg, #ffd96b, #f5a300); color: #3a2800;
  border-radius: 999px; padding: 3px 10px; margin-top: 4px;
  font-size: 11px; font-weight: 800; animation: pop .3s var(--ease);
}
.btn-close {
  position: absolute; z-index: 6;
  top: calc(env(safe-area-inset-top) + 56px); right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-hi); background: rgba(15,16,23,.6);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font-size: 15px; cursor: pointer; transition: transform .18s var(--ease), background .2s;
}
.btn-close:active { transform: scale(.92); }
@media (hover: hover) { .btn-close:hover { background: rgba(255,77,106,.35); transform: scale(1.08); } }

/* Overlay (Game Over / Szünet) */
.overlay {
  position: absolute; inset: 0; z-index: 8; padding: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,18,.62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.over-card {
  border-radius: 28px; padding: 26px 22px 22px; width: min(340px, 100%);
  display: flex; flex-direction: column; gap: 10px; text-align: center;
  background: rgba(30,32,48,.72); box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  animation: pop .35s var(--ease);
}
.over-title { color: var(--red); font-size: 28px; font-weight: 800; margin-bottom: 6px; text-shadow: 0 0 28px rgba(255,77,106,.5); }
.over-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 14px; color: var(--muted); text-align: left;
  background: var(--glass-hi); border-radius: 14px; padding: 12px 16px;
}
.over-row b { color: var(--gold); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.record { color: var(--gold); font-weight: 800; font-size: 15px; animation: pop .4s var(--ease); }
.over-btns { display: flex; gap: 10px; margin-top: 10px; }
.over-btns .btn { flex: 1; font-size: 14px; padding: 13px 8px; }

.hearts { position: absolute; left: 12px; bottom: calc(env(safe-area-inset-bottom) + 14px); z-index: 5; display: flex; gap: 6px; padding: 7px 14px; border-radius: 999px; pointer-events: none; }
.heart { font-size: 22px; line-height: 1; transition: opacity .25s ease, transform .25s ease, filter .25s ease; }
.heart.empty { filter: grayscale(1); opacity: .3; transform: scale(.85); }

#countdown { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; pointer-events: none; }
#cd-num { font-family: var(--pixel); font-size: clamp(64px, 22vw, 110px); color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 40px rgba(255,255,255,.35); animation: cdpop .8s ease; }
#cd-num.go { color: var(--mint); font-size: clamp(44px, 15vw, 76px); text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 40px rgba(25,230,140,.55); }
@keyframes cdpop { 0% { transform: scale(2); opacity: 0; } 40% { transform: scale(1); opacity: 1; } }

#flash { position: absolute; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }
#flash.on { animation: flashout .35s ease-out; }
@keyframes flashout { 0% { opacity: .85; } 100% { opacity: 0; } }
.shake { animation: shake .45s ease; }
@keyframes shake {
  10% { transform: translate(-8px, 3px); } 30% { transform: translate(7px, -4px); }
  50% { transform: translate(-5px, 2px); } 70% { transform: translate(4px, -2px); } 90% { transform: translate(-2px, 1px); }
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed; top: calc(env(safe-area-inset-top) + 16px); left: 50%; transform: translateX(-50%);
  background: rgba(30,32,48,.85); color: #fff; border-radius: 999px; border-color: var(--line-hi);
  padding: 11px 22px; font-size: 14px; font-weight: 600; z-index: 1000; white-space: nowrap; max-width: 92vw;
  box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: toast-in .25s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- KICSI KÉPERNYŐK ---------- */
@media (max-height: 700px) {
  .char-stage { width: min(150px, 100%); }
  .carousel-center { padding: 14px; gap: 8px; border-radius: 24px; }
  .logo.small { margin-bottom: 14px; }
  .menu-btn { padding-top: 7px; padding-bottom: 7px; }
  .menu-list { gap: 8px; }
  .char-name-big { font-size: 19px; }
  .btn-big { padding: 13px 18px; }
  .sub-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}