/* ===== THE SPORT DUDES V2 — ULTRA EDITION ===== */
:root {
  --cyan:   #00f5ff;
  --pink:   #ff2d78;
  --gold:   #ffd700;
  --green:  #00ff88;
  --purple: #9b30ff;
  --orange: #ff6b00;
  --dark:   #04060f;
  --dark2:  #080c1a;
  --dark3:  #0d1428;
  --glass:  rgba(255,255,255,0.04);
  --border: rgba(0,245,255,0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: 'Barlow Condensed', sans-serif;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ===== SCREENS ===== */
.screen {
  position: fixed; inset: 0;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10;
}
.screen.active { display: flex; }

/* ===== MENU BACKGROUND ===== */
.menu-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, #1a0040 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, #003a1a 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, #3a0020 0%, transparent 50%),
    radial-gradient(ellipse at 20% 85%, #001a3a 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, #0a0020 0%, #000510 100%);
  overflow: hidden;
  animation: bgShift 12s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(20deg) brightness(1.08); }
  100% { filter: hue-rotate(-15deg) brightness(1.05); }
}
.menu-grid {
  position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(0,245,255,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,45,120,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridScroll 18s linear infinite;
}
@keyframes gridScroll {
  0%   { transform: translate(0,0); }
  100% { transform: translate(60px,60px); }
}
.menu-orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.35;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width:600px;height:600px; background:radial-gradient(circle, #00f5ff, #7c3aed);   top:-150px; left:-150px; animation-delay:0s; }
.orb2 { width:500px;height:500px; background:radial-gradient(circle, #ff2d78, #ff6b00);   bottom:-100px; right:-100px; animation-delay:-3s; }
.orb3 { width:400px;height:400px; background:radial-gradient(circle, #00ff88, #00cfff);   top:30%; left:55%; animation-delay:-5s; opacity:0.22; }
.orb4 { width:350px;height:350px; background:radial-gradient(circle, #ffd700, #ff6b00);   top:10%; right:10%; animation-delay:-2s; opacity:0.18; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(25px,-35px) scale(1.06); }
  66%     { transform: translate(-20px,20px) scale(0.96); }
}

/* ===== MENU CONTENT ===== */
/* ===== PITCH LINES ===== */
.pitch-lines {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.pitch-circle {
  position: absolute;
  width: min(55vw, 380px); height: min(55vw, 380px);
  border: 1.5px solid rgba(0,245,255,0.07);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pitchPulse 4s ease-in-out infinite;
}
.pitch-center-dot {
  position: absolute;
  width: 10px; height: 10px;
  background: rgba(0,245,255,0.2);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.pitch-halfway {
  position: absolute;
  width: 1.5px; height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0,245,255,0.06) 30%, rgba(0,245,255,0.06) 70%, transparent);
  left: 50%; transform: translateX(-50%);
}
.pitch-box {
  position: absolute;
  width: min(22vw, 140px); height: min(35vw, 220px);
  border: 1.5px solid rgba(0,245,255,0.06);
  top: 50%; transform: translateY(-50%);
}
.pitch-box.left  { left: 0; border-left: none; }
.pitch-box.right { right: 0; border-right: none; }
@keyframes pitchPulse {
  0%,100% { opacity:0.6; transform:translate(-50%,-50%) scale(1); }
  50%     { opacity:1;   transform:translate(-50%,-50%) scale(1.02); }
}

/* ===== FLOATING SILHOUETTES ===== */
.sil {
  position: absolute; font-size: 3.5rem;
  opacity: 0.06; pointer-events: none;
  animation: silFloat 8s ease-in-out infinite;
  filter: blur(1px);
}
.sil1 { bottom: 15%; left: 5%;  animation-delay: 0s;   animation-duration: 9s; }
.sil2 { top: 20%;    right: 8%; animation-delay: 2s;   animation-duration: 7s; font-size: 2.5rem; opacity: 0.1; }
.sil3 { top: 55%;    right: 4%; animation-delay: 4s;   animation-duration: 11s; }
.sil4 { bottom: 8%;  right: 15%;animation-delay: 1.5s; animation-duration: 8s; font-size: 2rem; }
@keyframes silFloat {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%     { transform: translateY(-18px) rotate(5deg); }
}

/* ===== SCANLINES ===== */
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px
  );
  opacity: 0.4;
}

/* ===== MENU CONTENT ===== */
.menu-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 1.4rem;
  padding: 1.5rem 1rem 2rem;
  width: 100%;
}

/* ===== LOGO ===== */
.logo-area { text-align: center; position: relative; }
.logo-crown {
  font-size: 1.8rem;
  animation: crownBob 2s ease-in-out infinite;
  display: block; margin-bottom: -6px;
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.7));
}
@keyframes crownBob {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%     { transform: translateY(-5px) rotate(5deg); }
}
.logo-ball-wrap {
  position: relative; display: inline-block;
  margin-bottom: 4px;
}
.logo-ball-ring {
  position: absolute; inset: -8px;
  border: 2px solid rgba(0,245,255,0.3);
  border-radius: 50%;
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse {
  0%,100% { transform: scale(1);    opacity: 0.4; }
  50%     { transform: scale(1.15); opacity: 0.9; }
}
.logo-ball {
  font-size: 4.5rem;
  animation: ballSpin 4s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 0 24px rgba(0,245,255,0.7));
}
@keyframes ballSpin { to { transform: rotate(360deg); } }

.logo-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 0.88;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 40%, var(--pink) 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0,245,255,0.35));
  position: relative;
}
.logo-title span {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 60%, var(--pink) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-title::before {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: glitch 6s infinite;
}
@keyframes glitch {
  0%,92%,100% { opacity:0; transform:none; }
  93% { opacity:0.7; transform:translate(-3px,0) skewX(-5deg); clip-path:polygon(0 20%,100% 20%,100% 40%,0 40%); }
  95% { opacity:0.5; transform:translate(3px,0) skewX(3deg); clip-path:polygon(0 60%,100% 60%,100% 80%,0 80%); }
  97% { opacity:0; }
}
.logo-sub-wrap {
  display: flex; align-items: center; gap: 10px;
  justify-content: center; margin-top: 6px;
}
.logo-sub-line {
  flex: 1; max-width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.logo-sub-line:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}
.logo-sub {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255,215,0,0.6);
  white-space: nowrap;
}

/* ===== MAIN NAV ===== */
.main-nav {
  display: flex; flex-direction: column;
  gap: 0.6rem; width: min(360px, 92vw);
}
.nav-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.mbtn-kickoff {
  background: linear-gradient(135deg, rgba(0,245,255,0.18), rgba(155,48,255,0.18));
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0,245,255,0.25), inset 0 0 30px rgba(0,245,255,0.05);
  font-size: 1.5rem;
  animation: pulseBorder 2s ease-in-out infinite;
}
.mbtn-kickoff:hover {
  box-shadow: 0 0 50px rgba(0,245,255,0.5), inset 0 0 30px rgba(0,245,255,0.1);
}
.mbtn-howto {
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.06);
  color: #00ff88;
}
.mbtn-howto:hover { border-color: #00ff88; box-shadow: 0 0 20px rgba(0,255,136,0.25); }
.mbtn-credits {
  border-color: rgba(255,215,0,0.2);
  background: rgba(255,215,0,0.04);
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
}

.mbtn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--glass);
  border: 1px solid var(--border);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.mbtn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,245,255,0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.mbtn:hover::before, .mbtn:active::before { transform: translateX(100%); }
.mbtn:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,245,255,0.25), inset 0 0 20px rgba(0,245,255,0.05); }
.mbtn:active { transform: scale(0.97); }
.mbtn-primary {
  background: linear-gradient(135deg, rgba(0,245,255,0.15), rgba(155,48,255,0.15));
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(0,245,255,0.2);
  animation: pulseBorder 2s ease-in-out infinite;
}
@keyframes pulseBorder {
  0%,100% { box-shadow: 0 0 20px rgba(0,245,255,0.2); }
  50%      { box-shadow: 0 0 40px rgba(0,245,255,0.45), 0 0 80px rgba(0,245,255,0.1); }
}
.mbtn-icon { font-size: 1rem; }
.menu-footer { font-size: 0.7rem; color: rgba(255,255,255,0.25); letter-spacing: 0.15em; }

/* ===== OVERLAY PANEL ===== */
.overlay-panel {
  position: relative; z-index: 2;
  background: rgba(4,6,15,0.92);
  border: 1px solid var(--border);
  padding: 2rem;
  width: min(560px, 95vw);
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.2rem;
  backdrop-filter: blur(20px);
  clip-path: polygon(16px 0%, 100% 0%, calc(100% - 16px) 100%, 0% 100%);
}
.panel-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem; letter-spacing: 0.15em;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* ===== CONTROLS GRID ===== */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}
.ctrl-card {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: center;
}
.ctrl-key {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem; color: var(--cyan);
  letter-spacing: 0.08em;
}
.ctrl-desc { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }

.tips-box {
  background: rgba(0,245,255,0.04);
  border: 1px solid rgba(0,245,255,0.12);
  padding: 1rem;
}
.tips-box h3 { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: var(--gold); margin-bottom: 0.5rem; }
.tips-box p { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 0.3rem; }

/* ===== CREDITS ===== */
.credits-list { display: flex; flex-direction: column; gap: 0.5rem; }
.credit-row { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.credit-label { font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem; color: var(--cyan); letter-spacing: 0.1em; }
.credit-val { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.credit-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }
.credits-tagline { text-align: center; font-style: italic; color: var(--gold); font-size: 0.9rem; }

/* ===== TEAM SELECT ===== */
.teams-wrap {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 1rem;
  padding: 1.5rem;
  width: 100%; max-height: 100vh; overflow-y: auto;
}
.teams-row {
  display: flex; align-items: flex-start; gap: 1rem;
  width: min(700px, 98vw);
}
.team-col { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.team-col-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; letter-spacing: 0.15em;
  color: var(--cyan); text-align: center;
  margin-bottom: 0.3rem;
}
.teams-list { display: flex; flex-direction: column; gap: 0.3rem; max-height: 40vh; overflow-y: auto; }
.team-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.15s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.team-btn:hover { border-color: var(--cyan); background: rgba(0,245,255,0.06); }
.team-btn.selected-p { border-color: var(--cyan); background: rgba(0,245,255,0.12); box-shadow: 0 0 12px rgba(0,245,255,0.2); }
.team-btn.selected-a { border-color: var(--pink); background: rgba(255,45,120,0.12); box-shadow: 0 0 12px rgba(255,45,120,0.2); }
.team-badge { font-size: 1.2rem; }
.team-name { flex: 1; }
.team-rating { font-size: 0.75rem; color: var(--gold); }
.vs-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem; color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
  padding-top: 2rem; flex-shrink: 0;
}

/* ===== SETTINGS ===== */
.match-settings { display: flex; flex-direction: column; gap: 0.6rem; width: min(500px, 95vw); }
.setting-row { display: flex; align-items: center; gap: 1rem; }
.setting-label { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: rgba(255,255,255,0.5); letter-spacing: 0.1em; width: 90px; flex-shrink: 0; }
.setting-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sbtn {
  padding: 0.35rem 0.8rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.08em;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.15s;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.sbtn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,245,255,0.1); }
.sbtn:hover { border-color: rgba(0,245,255,0.4); color: #fff; }

/* ===== GAME SCREEN ===== */
#screen-game { background: #000; }
#three-container { position: absolute; inset: 0; }

/* ===== HUD ===== */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, rgba(4,6,15,0.95) 0%, rgba(4,6,15,0.0) 100%);
  padding: 0.5rem 1rem;
  z-index: 100;
  pointer-events: none;
}
#hud-left, #hud-right {
  flex: 1; display: flex; align-items: center; gap: 0.5rem;
}
#hud-right { justify-content: flex-end; }
#hud-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 1rem;
}
.hud-team {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
}
.hud-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 20px rgba(0,245,255,0.5);
}
#hud-timer {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: var(--gold);
  text-shadow: 0 0 15px rgba(255,215,0,0.4);
  letter-spacing: 0.05em;
}
#hud-half {
  font-size: 0.65rem; letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
}

/* ===== STAMINA ===== */
#stamina-wrap {
  position: fixed; bottom: 8px; left: 12px;
  z-index: 100; pointer-events: none;
  display: flex; flex-direction: column; gap: 3px;
}
#stamina-label { font-size: 0.6rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); }
#stamina-track {
  width: 90px; height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden;
}
#stamina-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--green), #00cc66);
  border-radius: 3px;
  transition: width 0.1s, background 0.3s;
}

/* ===== POWER BAR ===== */
#power-wrap {
  position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%);
  z-index: 100; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
#power-wrap.hidden { display: none; }
#power-label { font-family: 'Bebas Neue', sans-serif; font-size: 0.8rem; letter-spacing: 0.15em; color: var(--gold); }
#power-track {
  width: 180px; height: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 5px; overflow: hidden;
}
#power-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--pink));
  border-radius: 5px;
  transition: width 0.05s;
  box-shadow: 0 0 8px rgba(255,215,0,0.5);
}

/* ===== POSSESSION ===== */
#poss-wrap {
  position: fixed; top: 58px; left: 50%; transform: translateX(-50%);
  z-index: 100; pointer-events: none;
  display: flex; align-items: center; gap: 6px;
}
#poss-label { font-size: 0.55rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.3); white-space: nowrap; }
#poss-bar-p, #poss-bar-a {
  height: 4px; border-radius: 2px;
  transition: width 0.5s ease;
}
#poss-bar-p { background: var(--cyan); width: 50px; }
#poss-bar-a { background: var(--pink); width: 50px; }

/* ===== FEEDBACK ===== */
#feedback {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 200; pointer-events: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 0 30px rgba(0,245,255,0.8), 0 2px 4px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.2s;
  text-align: center;
}
#feedback.show { opacity: 1; }

/* ===== MINIMAP ===== */
#minimap {
  position: fixed; bottom: 8px; right: 12px;
  z-index: 100;
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 4px;
  background: rgba(4,6,15,0.8);
  opacity: 0.85;
}

/* ===== MOBILE CONTROLS ===== */
#mobile-controls {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 120px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 8px;
  background: linear-gradient(0deg, rgba(4,6,15,0.95) 0%, transparent 100%);
  z-index: 100;
}
@media (min-width: 900px) { #mobile-controls { display: none; } }
@media (max-width: 899px) {
  #xp-hud { top: auto; bottom: 128px; right: 8px; }
  .xp-hud-track { width: 70px; }
  .xp-hud-pts { display: none; }
}

#joystick-zone {
  width: 100px; height: 100px;
  position: relative; flex-shrink: 0;
}
#joystick-base {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(0,245,255,0.2);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  display: flex; align-items: center; justify-content: center;
}
#joystick-knob {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0,245,255,0.6), rgba(0,245,255,0.2));
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0,245,255,0.4);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}

#action-btns {
  display: flex; flex-direction: column; gap: 4px;
  flex-shrink: 0;
}
.abtn-row { display: flex; gap: 4px; }
.abtn {
  width: 52px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  background: rgba(4,6,15,0.8);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff; cursor: pointer;
  font-size: 1rem;
  transition: all 0.1s;
}
.abtn small { font-size: 0.5rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); }
.abtn:active, .abtn.pressed { transform: scale(0.92); }
.abtn-shoot  { border-color: rgba(0,245,255,0.4); background: rgba(0,245,255,0.08); }
.abtn-pass   { border-color: rgba(0,255,136,0.4); background: rgba(0,255,136,0.06); }
.abtn-sprint { border-color: rgba(255,107,0,0.4); background: rgba(255,107,0,0.06); }
.abtn-slide  { border-color: rgba(255,215,0,0.4); background: rgba(255,215,0,0.06); }
.abtn-chip   { border-color: rgba(155,48,255,0.4); background: rgba(155,48,255,0.06); }
.abtn-switch { border-color: rgba(255,140,0,0.4); background: rgba(255,140,0,0.06); }
.abtn-skill  { border-color: rgba(255,45,120,0.4); background: rgba(255,45,120,0.06); }
.abtn-shoot:active, .abtn-shoot.pressed  { background: rgba(0,245,255,0.25); box-shadow: 0 0 16px rgba(0,245,255,0.4); }
.abtn-slide:active, .abtn-slide.pressed  { background: rgba(255,215,0,0.25); box-shadow: 0 0 16px rgba(255,215,0,0.4); }
.abtn-sprint:active, .abtn-sprint.pressed { background: rgba(255,107,0,0.25); }

#pause-btn {
  position: fixed; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(4,6,15,0.8);
  border: 1px solid rgba(0,245,255,0.3);
  color: #fff; font-size: 1rem; cursor: pointer;
  z-index: 200;
}

/* ===== PAUSE MENU ===== */
#pause-menu {
  position: fixed; inset: 0;
  background: rgba(4,6,15,0.85);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
}
#pause-menu.hidden { display: none; }

/* ===== GOAL OVERLAY ===== */
#goal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,6,15,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
  animation: goalFadeIn 0.3s ease;
}
#goal-overlay.hidden { display: none; }
@keyframes goalFadeIn { from { opacity:0; transform:scale(0.8); } to { opacity:1; transform:scale(1); } }
.goal-inner { text-align: center; }
.goal-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.9;
  background: linear-gradient(135deg, var(--gold), var(--cyan), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(255,215,0,0.6));
  animation: goalPulse 0.5s ease-in-out infinite alternate;
}
@keyframes goalPulse {
  from { filter: drop-shadow(0 0 30px rgba(255,215,0,0.4)); }
  to   { filter: drop-shadow(0 0 60px rgba(255,215,0,0.9)); }
}
.goal-scorer {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff; letter-spacing: 0.15em;
  margin-top: 0.5rem;
}
.goal-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

/* ===== FULL TIME ===== */
#fulltime-overlay {
  position: fixed; inset: 0;
  background: rgba(4,6,15,0.9);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
}
#fulltime-overlay.hidden { display: none; }
.ft-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255,215,0,0.5);
  text-align: center;
}
.ft-result {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  letter-spacing: 0.15em;
}
.ft-stats {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  text-align: center;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,245,255,0.3); border-radius: 2px; }

/* ===== XP HUD BAR ===== */
#xp-hud {
  position: fixed; top: 58px; right: 10px;
  z-index: 100; pointer-events: none;
}
.xp-hud-inner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(4,6,15,0.75);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  backdrop-filter: blur(8px);
}
.xp-hud-lvl {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
}
.xp-hud-track {
  width: 120px; height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden;
}
.xp-hud-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  border-radius: 3px;
  transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(255,215,0,0.5);
}
.xp-hud-pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem; color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* ===== FLOATING XP POPUP ===== */
.xp-popup {
  position: fixed; left: 50%; top: 42%;
  transform: translateX(-50%);
  z-index: 250; pointer-events: none;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.1em;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(255,215,0,0.8), 0 2px 4px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.15s;
}
.xp-popup.show {
  opacity: 1;
  animation: xpFloat 1.2s ease forwards;
}
@keyframes xpFloat {
  0%   { opacity:1; transform:translateX(-50%) translateY(0); }
  70%  { opacity:1; transform:translateX(-50%) translateY(-40px); }
  100% { opacity:0; transform:translateX(-50%) translateY(-60px); }
}

/* ===== LEVEL UP OVERLAY ===== */
.levelup-overlay {
  position: fixed; inset: 0;
  background: rgba(4,6,15,0.88);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: levelupFadeIn 0.4s ease;
}
@keyframes levelupFadeIn {
  from { opacity:0; } to { opacity:1; }
}
.levelup-inner {
  text-align: center;
  animation: levelupPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes levelupPop {
  from { transform: scale(0.5); opacity:0; }
  to   { transform: scale(1);   opacity:1; }
}
.levelup-badge {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), #b8860b);
  border: 4px solid var(--gold);
  box-shadow: 0 0 60px rgba(255,215,0,0.7), 0 0 120px rgba(255,215,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem; color: #fff;
  margin: 0 auto 1rem;
  animation: badgeSpin 0.6s ease;
}
@keyframes badgeSpin {
  from { transform: rotateY(180deg) scale(0.5); }
  to   { transform: rotateY(0deg) scale(1); }
}
.levelup-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  background: linear-gradient(135deg, var(--gold), var(--cyan), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.5));
  letter-spacing: 0.1em;
}
.levelup-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--cyan); letter-spacing: 0.2em;
  margin: 0.3rem 0;
}
.levelup-unlock {
  font-size: 1rem; color: rgba(255,255,255,0.8);
  margin-top: 0.8rem;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3);
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  display: inline-block;
}

/* ===== PROFILE SCREEN ===== */
.profile-badge-row {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1rem;
  background: rgba(255,215,0,0.05);
  border: 1px solid rgba(255,215,0,0.15);
}
.profile-badge {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), #8b6914);
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(255,215,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; color: #fff;
}
.profile-info { flex: 1; }
.profile-level {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem; color: var(--gold); letter-spacing: 0.1em;
}
.profile-xp-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.profile-xp-track {
  flex: 1; height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px; overflow: hidden;
}
.profile-xp-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.profile-xp-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); white-space: nowrap; }

.profile-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem;
}
.stat-card {
  background: var(--glass); border: 1px solid var(--border);
  padding: 0.6rem; text-align: center;
}
.stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem; color: var(--cyan);
}
.stat-lbl { font-size: 0.65rem; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; }

.profile-unlocks, .profile-upcoming { display: flex; flex-direction: column; gap: 0.5rem; }
.unlocks-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; letter-spacing: 0.12em;
  color: var(--gold);
}
.unlocks-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.unlock-chip {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 20px;
  font-size: 0.8rem; color: rgba(255,255,255,0.8);
}
.unlock-chip.locked {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.35);
}
.unlock-chip .chip-lvl {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.7rem; color: var(--gold);
}

.mbtn-profile {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.06);
}
.mbtn-profile:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,215,0,0.25); }

.mbtn-market {
  border-color: rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.06);
}
.mbtn-market:hover { border-color: #a78bfa; box-shadow: 0 0 20px rgba(167,139,250,0.25); }

/* ===== SIGN IN ===== */
.signin-wrap {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.5rem; padding: 2rem 1rem;
  width: 100%; max-height: 100vh; overflow-y: auto;
}
.signin-logo { text-align: center; }
.signin-card {
  width: min(420px, 94vw);
  background: rgba(4,6,20,0.85);
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 20px; padding: 2rem 1.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 40px rgba(0,245,255,0.08);
}
.signin-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.12em;
  color: var(--cyan); margin: 0 0 0.25rem;
}
.signin-sub {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem; color: rgba(255,255,255,0.45);
  margin: 0 0 1.5rem;
}
.signin-field { margin-bottom: 1.1rem; }
.signin-label {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6); margin-bottom: 6px;
}
.signin-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 10px 14px;
  color: #fff; font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.signin-input::placeholder { color: rgba(255,255,255,0.3); }
.signin-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,245,255,0.15);
}
.signin-hint {
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
  margin-top: 4px; min-height: 16px;
}
.signin-avatar-row { margin-bottom: 1rem; }
.avatar-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.avatar-opt {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.12);
  transition: all 0.15s;
}
.avatar-opt:hover { border-color: rgba(0,245,255,0.5); transform: scale(1.1); }
.avatar-opt.selected {
  border-color: var(--cyan);
  background: rgba(0,245,255,0.12);
  box-shadow: 0 0 10px rgba(0,245,255,0.25);
}
.signin-error {
  background: rgba(255,45,120,0.12);
  border: 1px solid rgba(255,45,120,0.4);
  border-radius: 8px; padding: 8px 12px;
  color: #ff2d78; font-size: 0.85rem;
  font-family: 'Barlow Condensed', sans-serif;
  margin-top: 0.5rem;
}
.avatar-admin {
  border-color: rgba(255,215,0,0.5) !important;
  background: rgba(255,215,0,0.08) !important;
  position: relative;
}
.avatar-admin::after {
  content: 'ADMIN';
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  font-family: 'Bebas Neue', sans-serif; font-size: 0.5rem;
  color: #ffd700; letter-spacing: 0.05em; white-space: nowrap;
}
.avatar-admin.selected {
  border-color: #ffd700 !important;
  box-shadow: 0 0 14px rgba(255,215,0,0.5) !important;
}
.admin-avatar-note {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem; color: #ffd700;
  margin-top: 18px; text-align: center;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 8px; padding: 6px 12px;
}
.menu-admin-badge {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.7rem;
  letter-spacing: 0.12em; color: #ffd700;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.4);
  border-radius: 20px; padding: 1px 8px;
  margin-left: 6px; vertical-align: middle;
}

/* Menu username display */
.menu-username {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; letter-spacing: 0.1em;
  color: var(--cyan); text-align: center;
  margin-bottom: 0.5rem;
}

.hidden { display: none !important; }

/* ===== CURRENCY HUD ===== */
.currency-hud-row {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 4px;
}
.currency-hud-row span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.08em;
  background: rgba(4,6,15,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; padding: 2px 10px;
}
#coins-hud { color: #ffd700; border-color: rgba(255,215,0,0.3); }
#gems-hud  { color: #a78bfa; border-color: rgba(167,139,250,0.3); }

/* ===== MARKETPLACE ===== */
.market-wrap {
  position: relative; z-index: 2;
  width: min(700px, 96vw);
  max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.5rem 1rem;
}
.market-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.market-currency { display: flex; gap: 12px; }
.mkt-coin, .mkt-gem {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
  padding: 4px 14px; border-radius: 20px;
}
.mkt-coin { background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.4); color: #ffd700; }
.mkt-gem  { background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.4); color: #a78bfa; }

.market-tabs { display: flex; gap: 6px; }
.mtab {
  flex: 1; padding: 8px 4px;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem; letter-spacing: 0.1em;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: rgba(255,255,255,0.5); cursor: pointer;
  transition: all 0.2s;
}
.mtab.active { background: rgba(0,245,255,0.12); border-color: var(--cyan); color: var(--cyan); }
.mtab:hover:not(.active) { border-color: rgba(255,255,255,0.3); color: #fff; }

.market-panel { display: flex; flex-direction: column; gap: 1rem; }
.market-panel.hidden { display: none; }

/* Search row */
.market-search-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.market-search {
  flex: 1; min-width: 180px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 8px 14px;
  color: #fff; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem; outline: none;
  transition: border-color 0.2s;
}
.market-search::placeholder { color: rgba(255,255,255,0.35); }
.market-search:focus { border-color: var(--cyan); background: rgba(0,245,255,0.05); }
.market-filter {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 8px 10px;
  color: #fff; font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem; outline: none; cursor: pointer;
  transition: border-color 0.2s;
}
.market-filter:focus { border-color: var(--cyan); }
.market-filter option { background: #0d0f1e; color: #fff; }

/* Player grid */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.player-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.player-card:hover { border-color: var(--cyan); background: rgba(0,245,255,0.06); transform: translateY(-2px); }
.player-card.owned { border-color: rgba(0,255,136,0.4); background: rgba(0,255,136,0.05); }
.player-card.owned:hover { border-color: var(--green); }
.pc-badge { font-size: 2rem; }
.pc-photo-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2.5px solid #fff;
  overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.pc-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-photo-fallback {
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.pc-name { font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem; letter-spacing: 0.05em; color: #fff; }
.pc-rating {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pc-rating.common   { background: rgba(150,150,150,0.3); color: #aaa; border: 1px solid #666; }
.pc-rating.rare     { background: rgba(0,100,255,0.3);   color: #60a5fa; border: 1px solid #3b82f6; }
.pc-rating.epic     { background: rgba(139,0,255,0.3);   color: #c084fc; border: 1px solid #9333ea; }
.pc-rating.legend   { background: rgba(255,165,0,0.3);   color: #fbbf24; border: 1px solid #f59e0b; }
.pc-rarity { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.pc-price { font-family: 'Bebas Neue', sans-serif; font-size: 0.8rem; color: #ffd700; }
.pc-owned-tag { font-size: 0.65rem; color: var(--green); letter-spacing: 0.1em; }

/* Packs grid */
.packs-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  margin: 12px 0 6px;
  display: inline-block;
  text-transform: uppercase;
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.pack-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.25s; text-align: center;
}
.pack-card:hover { transform: translateY(-4px) scale(1.03); }
.pack-img { font-size: 2.8rem; }
.pack-bronze { filter: sepia(0.5) saturate(1.5); }
.pack-silver { filter: brightness(1.3) saturate(0.3); }
.pack-gold   { filter: sepia(1) saturate(3) brightness(1.2); }
.pack-legend { filter: hue-rotate(30deg) saturate(2) brightness(1.3); }
.pack-card:hover .pack-img { animation: packBounce 0.4s ease; }
@keyframes packBounce {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.2) rotate(-5deg); }
}
.pack-name { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: 0.1em; color: #fff; }
.pack-desc { font-size: 0.65rem; color: rgba(255,255,255,0.5); }
.pack-price { font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem; }
.pack-bronze .pack-price, .pack-silver .pack-price { color: #ffd700; }
.pack-gold .pack-price, .pack-legend .pack-price { color: #a78bfa; }

.squad-hint { font-size: 0.75rem; color: rgba(255,255,255,0.4); text-align: center; }

/* ===== PACK OPENING OVERLAY ===== */
/* ===== BAG ===== */
.bag-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: #ff2d78; color: #fff;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.65rem;
  padding: 0 4px; margin-left: 4px; vertical-align: middle;
}
.bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.bag-pack-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.25s; text-align: center;
  position: relative;
}
.bag-pack-item:hover {
  transform: translateY(-5px) scale(1.04);
  border-color: var(--cyan);
  box-shadow: 0 8px 30px rgba(0,245,255,0.15);
}
.bag-pack-item:hover .bag-pack-emoji { animation: bagBounce 0.5s ease; }
@keyframes bagBounce {
  0%,100% { transform: scale(1) rotate(0deg); }
  30%     { transform: scale(1.3) rotate(-8deg); }
  60%     { transform: scale(1.1) rotate(5deg); }
}
.bag-pack-emoji { font-size: 3rem; }
.bag-pack-name  { font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem; letter-spacing: 0.1em; color: #fff; }
.bag-pack-tap   { font-size: 0.65rem; color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase; }
.bag-empty {
  grid-column: 1/-1; text-align: center;
  color: rgba(255,255,255,0.35); font-size: 0.9rem; padding: 2rem;
}

/* ===== PACK OPENING OVERLAY ===== */
.pack-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(2,4,12,0.97);
  display: flex; align-items: flex-start; justify-content: center;
  perspective: 1200px;
  overflow-y: auto;
  padding: 20px 0 40px;
}
#pack-particles-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.pack-stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.2rem;
}
/* Stage 1 — intro */
.pack-glow-ring {
  position: absolute;
  width: 220px; height: 220px; border-radius: 50%;
  border: 3px solid rgba(0,245,255,0.3);
  box-shadow: 0 0 60px rgba(0,245,255,0.15), inset 0 0 60px rgba(0,245,255,0.05);
  animation: ringPulse 1.5s ease infinite;
  pointer-events: none;
}
@keyframes ringPulse {
  0%,100% { transform: scale(1);   opacity: 0.6; }
  50%     { transform: scale(1.08); opacity: 1;   }
}
.pack-icon-big {
  font-size: 7rem; cursor: pointer;
  filter: drop-shadow(0 0 30px rgba(0,245,255,0.4));
  transition: transform 0.1s;
  user-select: none;
}
.pack-icon-big.shaking {
  animation: packShake 0.5s ease;
}
@keyframes packShake {
  0%,100% { transform: rotate(0deg) scale(1); }
  15%     { transform: rotate(-12deg) scale(1.1); }
  30%     { transform: rotate(12deg) scale(1.15); }
  45%     { transform: rotate(-10deg) scale(1.1); }
  60%     { transform: rotate(8deg) scale(1.12); }
  75%     { transform: rotate(-6deg) scale(1.08); }
  90%     { transform: rotate(4deg) scale(1.05); }
}
.pack-icon-big.bursting {
  animation: packBurst 0.4s ease forwards;
}
@keyframes packBurst {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.6); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}
.pack-tap-hint {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
  letter-spacing: 0.25em; color: rgba(255,255,255,0.5);
  animation: hintBlink 1.2s ease infinite;
}
@keyframes hintBlink {
  0%,100% { opacity: 0.5; } 50% { opacity: 1; }
}

/* Stage 1 — center vertically in viewport */
#pack-stage-intro {
  min-height: calc(100vh - 60px);
  justify-content: center;
}

/* Stage 2 — reveal */
.pack-stage-reveal { gap: 1.5rem; padding-top: 1rem; }
.pack-reveal-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem;
  letter-spacing: 0.25em; color: var(--gold);
  text-shadow: 0 0 30px rgba(255,215,0,0.6);
  animation: titlePulse 1s ease infinite;
}
@keyframes titlePulse {
  0%,100% { text-shadow: 0 0 20px rgba(255,215,0,0.5); }
  50%     { text-shadow: 0 0 50px rgba(255,215,0,1); }
}
.pack-cards-row {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: min(700px, 96vw);
}

/* Flip card */
.reveal-card-wrap {
  width: 100px; height: 160px;
  perspective: 600px; cursor: pointer;
}
.reveal-card-inner {
  width: 100%; height: 100%;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  transform: rotateY(180deg);
}
.reveal-card-wrap.flipped .reveal-card-inner { transform: rotateY(0deg); }
.reveal-card-front, .reveal-card-back {
  position: absolute; inset: 0;
  border-radius: 14px; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; padding: 10px 6px;
  text-align: center;
}
.reveal-card-back {
  background: linear-gradient(135deg, #0d1b3e, #1a0a2e);
  border: 2px solid rgba(0,245,255,0.3);
  font-size: 2.5rem;
}
.reveal-card-front {
  background: rgba(4,6,20,0.95);
  border: 2px solid rgba(255,255,255,0.15);
  transform: rotateY(0deg);
}
.reveal-card-front.rarity-legend { border-color: #f59e0b; box-shadow: 0 0 20px rgba(245,158,11,0.5); }
.reveal-card-front.rarity-epic   { border-color: #a855f7; box-shadow: 0 0 16px rgba(168,85,247,0.4); }
.reveal-card-front.rarity-rare   { border-color: #3b82f6; box-shadow: 0 0 12px rgba(59,130,246,0.3); }
.rc-photo-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  overflow: hidden; border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}
.rc-photo { width: 100%; height: 100%; object-fit: cover; }
.rc-name  { font-family: 'Bebas Neue', sans-serif; font-size: 0.72rem; color: #fff; letter-spacing: 0.04em; }
.rc-rating-badge {
  font-family: 'Bebas Neue', sans-serif; font-size: 1rem;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.rc-pos   { font-size: 0.6rem; color: rgba(255,255,255,0.5); letter-spacing: 0.1em; }
.rc-rarity { font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; }
.pack-collect-btn {
  margin-top: 1rem; min-width: 220px;
  font-size: 1.1rem; letter-spacing: 0.15em;
  animation: collectPulse 1.5s ease infinite;
  position: sticky; bottom: 16px; z-index: 10;
}
@keyframes collectPulse {
  0%,100% { box-shadow: 0 0 10px rgba(0,245,255,0.3); }
  50%     { box-shadow: 0 0 30px rgba(0,245,255,0.7); }
}

.mbtn-admin {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.06);
  color: var(--gold);
  margin-top: 4px;
}
.mbtn-admin:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
  background: rgba(255,215,0,0.12);
}

.amodal-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08);
}
.amodal-give-coins {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.agc-label {
  font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem;
  letter-spacing: 0.08em; color: var(--gold); white-space: nowrap;
}
.agc-input {
  width: 100px; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,215,0,0.3); border-radius: 6px;
  padding: 6px 10px; color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.9rem;
  outline: none;
}
.agc-input:focus { border-color: var(--gold); }
.agc-btn {
  background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.4);
  color: var(--gold); font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem; letter-spacing: 0.1em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: all 0.2s;
}
.agc-btn:hover { background: rgba(255,215,0,0.25); }
.agc-minus-btn {
  background: rgba(255,45,120,0.08); border-color: rgba(255,45,120,0.35);
  color: var(--pink) !important;
}
.agc-minus-btn:hover { background: rgba(255,45,120,0.2) !important; }
.agc-delete-btn {
  background: rgba(255,45,120,0.08); border: 1px solid rgba(255,45,120,0.3);
  color: var(--pink); font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem; letter-spacing: 0.1em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: all 0.2s; align-self: flex-start;
}
.agc-delete-btn:hover { background: rgba(255,45,120,0.2); }

/* ===== ADMIN PANEL ===== */
#screen-admin { overflow-y: auto; justify-content: flex-start; align-items: center; }
.admin-wrap {
  width: 100%; max-width: 1000px; margin: 0 auto;
  padding: 16px 16px 48px;
  position: relative; z-index: 2;
}
.admin-header { margin-bottom: 16px; }
.admin-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; letter-spacing: 0.15em;
  color: var(--cyan); text-shadow: 0 0 20px rgba(0,245,255,0.4);
}
.admin-sub { font-size: 0.75rem; color: rgba(255,255,255,0.35); letter-spacing: 0.1em; margin-bottom: 12px; }
.admin-stats-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.asb-item {
  background: rgba(0,245,255,0.06); border: 1px solid rgba(0,245,255,0.15);
  border-radius: 10px; padding: 8px 14px;
  display: flex; flex-direction: column; align-items: center; min-width: 70px;
}
.asb-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; color: var(--cyan); line-height: 1; }
.asb-label { font-size: 0.55rem; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; margin-top: 2px; }
.admin-grant-box {
  background: rgba(0,245,255,0.04);
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.admin-grant-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.12em;
  color: var(--cyan); margin-bottom: 8px;
}
.admin-grant-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.admin-grant-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem; padding: 7px 10px;
  flex: 1; min-width: 100px;
}
.admin-grant-input::placeholder { color: rgba(255,255,255,0.35); }
.admin-grant-input:focus { outline: none; border-color: var(--cyan); }
.admin-grant-num { max-width: 120px; }
.admin-grant-btn {
  background: rgba(0,245,255,0.12);
  border: 1px solid rgba(0,245,255,0.4);
  color: var(--cyan); font-family: 'Bebas Neue', sans-serif;
  font-size: 0.9rem; letter-spacing: 0.1em;
  padding: 7px 18px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.admin-grant-btn:hover { background: rgba(0,245,255,0.25); }
.admin-grant-hint {
  font-size: 0.7rem; color: rgba(255,255,255,0.35);
  margin-top: 6px; line-height: 1.4;
}

.admin-controls {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.admin-search {
  flex: 1; min-width: 160px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 8px 12px; color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.9rem;
  outline: none;
}
.admin-search:focus { border-color: var(--cyan); }
.admin-sort {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 8px 12px; color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.85rem;
  outline: none; cursor: pointer;
}
.admin-table-wrap { overflow-x: auto; border-radius: 12px; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.85rem;
}
.admin-table thead tr {
  background: rgba(0,245,255,0.08);
  border-bottom: 1px solid rgba(0,245,255,0.2);
}
.admin-table th {
  padding: 10px 8px; text-align: left;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.75rem;
  letter-spacing: 0.1em; color: var(--cyan); white-space: nowrap;
}
.admin-row {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer; transition: background 0.15s;
}
.admin-row:hover { background: rgba(0,245,255,0.05); }
.admin-table td { padding: 9px 8px; color: rgba(255,255,255,0.8); vertical-align: middle; }
.arank { color: rgba(255,255,255,0.3); font-size: 0.75rem; }
.aname { font-weight: 600; color: #fff; line-height: 1.3; }
.arank-label { font-size: 0.6rem; color: rgba(255,255,255,0.35); letter-spacing: 0.05em; }
.alevel { text-align: center; }
.alvl-badge {
  background: rgba(0,245,255,0.12); border: 1px solid rgba(0,245,255,0.3);
  color: var(--cyan); font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; padding: 2px 8px; border-radius: 6px;
}
.acoins { color: #ffd700; }
.agems  { color: #a78bfa; }
.alseen { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.admin-del-btn {
  background: rgba(255,45,120,0.1); border: 1px solid rgba(255,45,120,0.3);
  color: var(--pink); border-radius: 6px; padding: 4px 8px;
  cursor: pointer; font-size: 0.85rem; transition: all 0.15s;
}
.admin-del-btn:hover { background: rgba(255,45,120,0.25); }
/* Admin modal */
.admin-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.admin-modal.hidden { display: none; }
.admin-modal-box {
  background: #0d1428; border: 1px solid rgba(0,245,255,0.25);
  border-radius: 18px; padding: 20px; width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 0 40px rgba(0,245,255,0.15);
}
.amodal-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.amodal-avatar { font-size: 2.5rem; }
.amodal-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; color: #fff; }
.amodal-rank { font-size: 0.75rem; color: var(--cyan); letter-spacing: 0.08em; }
.amodal-close {
  margin-left: auto; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); color: #fff;
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
}
.amodal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.amodal-stat {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ams-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: #fff; }
.ams-label { font-size: 0.55rem; color: rgba(255,255,255,0.35); letter-spacing: 0.08em; margin-top: 2px; }
.amodal-dates {
  font-size: 0.75rem; color: rgba(255,255,255,0.4);
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px;
}
.amodal-dates b { color: rgba(255,255,255,0.7); }
.amodal-cards-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem;
  color: var(--cyan); letter-spacing: 0.1em; margin-bottom: 8px;
}
.amodal-cards-list { display: flex; flex-wrap: wrap; gap: 6px; }
.acard-chip {
  background: rgba(255,255,255,0.04); border: 1px solid;
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.7rem; color: rgba(255,255,255,0.7);
}
.mbtn-admin {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.06);
  color: #ffd700;
}
.mbtn-admin:hover { border-color: #ffd700; box-shadow: 0 0 20px rgba(255,215,0,0.25); }

/* ===== LOCKER ROOM ===== */
#screen-locker {
  overflow-y: auto;
  justify-content: flex-start;
  align-items: center;
}
.locker-wrap {
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex; flex-direction: column; gap: 0;
}
.locker-header { margin-bottom: 4px; }
.locker-subtitle {
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.locker-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.ltab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.1em;
  padding: 6px 12px; border-radius: 20px;
  cursor: pointer; transition: all 0.2s;
}
.ltab:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.ltab.active {
  background: rgba(0,245,255,0.12);
  border-color: rgba(0,245,255,0.5);
  color: var(--cyan);
}
.locker-panel { width: 100%; }
.locker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.locker-card {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.locker-card:hover:not(.locked) {
  border-color: var(--item-color, rgba(0,245,255,0.4));
  box-shadow: 0 0 16px color-mix(in srgb, var(--item-color, #00f5ff) 30%, transparent);
  transform: translateY(-2px);
}
.locker-card.equipped {
  border-color: var(--item-color, #00f5ff);
  background: color-mix(in srgb, var(--item-color, #00f5ff) 10%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--item-color, #00f5ff) 25%, transparent);
}
.locker-card.locked {
  opacity: 0.45; cursor: not-allowed;
}
.lc-emoji { font-size: 2.2rem; line-height: 1; }
.lc-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.08em;
  line-height: 1.1;
}
.lc-desc {
  font-size: 0.6rem; color: rgba(255,255,255,0.35);
  line-height: 1.3;
}
.lc-status {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 20px; margin-top: 2px;
}
.equipped-tag {
  background: rgba(0,255,136,0.15);
  border: 1px solid rgba(0,255,136,0.4);
  color: #00ff88;
}
.unlock-tag {
  background: rgba(0,245,255,0.1);
  border: 1px solid rgba(0,245,255,0.3);
  color: var(--cyan);
}
.locked-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
}
.mbtn-locker {
  border-color: rgba(0,245,255,0.3);
  background: rgba(0,245,255,0.06);
  color: var(--cyan);
}
.mbtn-locker:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,245,255,0.25);
}

/* GOAT card */
.goat-card {
  border-color: #ffd700 !important;
  background: linear-gradient(160deg, rgba(255,215,0,0.08), rgba(255,165,0,0.04)) !important;
  box-shadow: 0 0 24px rgba(255,215,0,0.2), inset 0 0 20px rgba(255,215,0,0.04) !important;
  grid-column: 1 / -1;
  flex-direction: row !important;
  gap: 14px !important;
  padding: 14px 16px !important;
  max-width: 100%;
  align-items: center;
}
.goat-banner {
  position: absolute; top: -1px; left: 0; right: 0;
  background: linear-gradient(90deg, #ffd700, #ff8c00, #ffd700);
  color: #000; font-family: 'Bebas Neue', sans-serif;
  font-size: 0.6rem; letter-spacing: 0.15em;
  text-align: center; padding: 3px 0;
  border-radius: 12px 12px 0 0;
}

/* Season section */
.season-section {
  background: rgba(0,245,255,0.04);
  border: 1px solid rgba(0,245,255,0.15);
  border-radius: 16px; padding: 16px;
  margin-bottom: 20px;
}
.season-header { margin-bottom: 12px; }
.season-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem;
  letter-spacing: 0.15em; color: var(--cyan);
}
.season-timer {
  font-size: 0.75rem; color: rgba(255,255,255,0.5);
  margin-left: 10px; font-family: 'Barlow Condensed', sans-serif;
}
.season-sub { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 2px; }
.season-players-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.season-player-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; min-width: 64px; text-align: center; position: relative;
}
.season-player-card.owned { opacity: 0.5; }
.spc-rating { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; }
.spc-name   { font-family: 'Bebas Neue', sans-serif; font-size: 0.65rem; color: #fff; }
.spc-pos    { font-size: 0.55rem; color: rgba(255,255,255,0.4); }
.spc-rarity { font-size: 0.5rem; letter-spacing: 0.05em; }
.spc-owned  { position: absolute; top: 4px; right: 6px; font-size: 0.6rem; color: #00ff88; }
.season-pack-buy {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,245,255,0.06); border: 1px solid rgba(0,245,255,0.2);
  border-radius: 12px; padding: 12px 14px;
}
.season-pack-icon { font-size: 2rem; }
.season-pack-name { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: var(--cyan); }
.season-pack-desc { font-size: 0.7rem; color: rgba(255,255,255,0.4); }
.season-buy-btn   { margin-left: auto; white-space: nowrap; }

/* Marketplace button */
.mbtn-market {
  border-color: rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.06);
  color: #a78bfa;
}
.mbtn-market:hover { border-color: #a78bfa; box-shadow: 0 0 20px rgba(167,139,250,0.25); }
/* ===== 2v2 ONLINE BUTTON ===== */
.mbtn-2v2 {
  border-color: rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.06);
  color: var(--green);
  margin-top: 4px;
}
.mbtn-2v2:hover { border-color: var(--green); box-shadow: 0 0 20px rgba(0,255,136,0.3); background: rgba(0,255,136,0.12); }

/* ===== 2v2 LOBBY ===== */
#screen-2v2 { overflow-y: auto; justify-content: flex-start; align-items: center; }
.lobby-wrap {
  width: 100%; max-width: 520px; margin: 0 auto;
  padding: 24px 16px 60px; position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}
.lobby-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem;
  letter-spacing: 0.15em; color: var(--green);
  text-shadow: 0 0 24px rgba(0,255,136,0.5); margin-bottom: 4px;
}
.lobby-sub { font-size: 0.8rem; color: rgba(255,255,255,0.35); letter-spacing: 0.1em; margin-bottom: 24px; }
.lobby-step { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lobby-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.lobby-role-btn {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(0,255,136,0.2);
  border-radius: 16px; padding: 20px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all 0.2s; color: #fff;
}
.lobby-role-btn:hover { border-color: var(--green); background: rgba(0,255,136,0.08); box-shadow: 0 0 20px rgba(0,255,136,0.15); }
.lrb-icon { font-size: 2rem; }
.lrb-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; letter-spacing: 0.1em; color: var(--green); }
.lrb-sub { font-size: 0.65rem; color: rgba(255,255,255,0.4); text-align: center; }
.lobby-code-box {
  background: rgba(0,255,136,0.05); border: 1px solid rgba(0,255,136,0.2);
  border-radius: 16px; padding: 20px 24px; text-align: center; width: 100%;
}
.lobby-code-label { font-size: 0.65rem; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.lobby-code {
  font-family: 'Bebas Neue', sans-serif; font-size: 3rem; letter-spacing: 0.3em;
  color: var(--green); text-shadow: 0 0 20px rgba(0,255,136,0.6);
}
.lobby-copy-btn {
  margin-top: 10px; background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3);
  color: var(--green); font-family: 'Bebas Neue', sans-serif; font-size: 0.8rem;
  letter-spacing: 0.1em; padding: 6px 16px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s;
}
.lobby-copy-btn:hover { background: rgba(0,255,136,0.2); }
.lobby-status {
  font-size: 0.85rem; color: rgba(255,255,255,0.6); text-align: center;
  padding: 8px 0; letter-spacing: 0.05em;
}
.lobby-players-preview { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.lobby-player-chip {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 8px 14px; font-size: 0.8rem; color: #fff;
  display: flex; align-items: center; gap: 6px;
}
.lobby-player-chip.ready { border-color: var(--green); color: var(--green); }
.lobby-join-form { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.lobby-join-input {
  width: 100%; max-width: 220px; text-align: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(0,255,136,0.3);
  border-radius: 10px; padding: 12px 16px; color: #fff;
  font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: 0.3em;
  outline: none;
}
.lobby-join-input:focus { border-color: var(--green); }
.lobby-join-btn {
  background: rgba(0,255,136,0.12); border: 1px solid rgba(0,255,136,0.4);
  color: var(--green); font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem; letter-spacing: 0.1em; padding: 10px 28px;
  border-radius: 10px; cursor: pointer; transition: all 0.2s;
}
.lobby-join-btn:hover { background: rgba(0,255,136,0.25); }
.lobby-team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%;
}
.lobby-team-btn {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px 6px; cursor: pointer; color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.75rem;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: all 0.15s;
}
.lobby-team-btn:hover { border-color: var(--green); background: rgba(0,255,136,0.06); }
.lobby-team-btn.selected { border-color: var(--green); background: rgba(0,255,136,0.12); color: var(--green); }
.lobby-team-badge { font-size: 1.4rem; }
.lobby-team-name { font-size: 0.6rem; letter-spacing: 0.05em; }
.lobby-ready-status { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-align: center; margin-top: 8px; }
.lobby-countdown {
  font-family: 'Bebas Neue', sans-serif; font-size: 8rem; color: var(--green);
  text-shadow: 0 0 40px rgba(0,255,136,0.8); animation: countPulse 1s ease-in-out infinite;
}
@keyframes countPulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* ===== SELL CARD BUTTON ===== */
.pc-sell-btn {
  margin-top: 4px;
  width: 100%;
  background: rgba(255,45,120,0.08);
  border: 1px solid rgba(255,45,120,0.35);
  color: #ff2d78;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}
.pc-sell-btn:hover {
  background: rgba(255,45,120,0.22);
  border-color: #ff2d78;
  box-shadow: 0 0 10px rgba(255,45,120,0.3);
}

/* ===== AUTO-SELL BAR ===== */
.autosell-bar {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.asb-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: #ffd700;
  margin-bottom: 8px;
}
.asb-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.asb-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255,255,255,0.5);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
}
.asb-toggle.asb-on {
  background: rgba(var(--rc-rgb, 255,215,0), 0.12);
  border-color: var(--rc, #ffd700);
  color: var(--rc, #ffd700);
  box-shadow: 0 0 8px rgba(var(--rc-rgb, 255,215,0), 0.2);
}
.asb-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.2s;
}
.asb-toggle.asb-on .asb-dot {
  background: var(--rc, #ffd700);
  box-shadow: 0 0 4px var(--rc, #ffd700);
}
.asb-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.asb-price {
  font-size: 0.65rem;
  opacity: 0.7;
}

/* ============================================================
   DAILY QUESTS
   ============================================================ */
.quest-streak-bar { margin-bottom: 1rem; }
.streak-display {
  background: linear-gradient(135deg, rgba(255,100,0,.15), rgba(255,200,0,.1));
  border: 1px solid rgba(255,150,0,.3);
  border-radius: 10px;
  padding: .6rem 1rem;
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  text-align: center;
}
.streak-display strong { color: #ffd700; }
.quest-weekly-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .1em;
  color: #00f5ff;
  margin: 1.2rem 0 .5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1rem;
}
.quests-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .5rem; }
.quest-item {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .7rem .9rem;
  transition: border-color .2s;
}
.quest-item.quest-done { border-color: rgba(0,245,255,.3); }
.quest-item.quest-claimed { opacity: .5; }
.quest-icon { font-size: 1.4rem; flex-shrink: 0; }
.quest-info { flex: 1; min-width: 0; }
.quest-label { font-size: .85rem; font-weight: 600; color: #fff; margin-bottom: .3rem; }
.quest-bar-wrap { height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin-bottom: .25rem; }
.quest-bar-fill { height: 100%; background: linear-gradient(90deg, #00f5ff, #7c3aed); border-radius: 3px; transition: width .4s; }
.quest-prog { font-size: .7rem; color: rgba(255,255,255,.4); }
.quest-reward { font-size: .8rem; font-weight: 700; color: #ffd700; text-align: right; flex-shrink: 0; }
.quest-claim-btn {
  background: linear-gradient(135deg, #00f5ff, #7c3aed);
  border: none; border-radius: 6px;
  color: #000; font-weight: 700; font-size: .75rem;
  padding: .35rem .7rem; cursor: pointer; flex-shrink: 0;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: .05em;
}
.quest-claim-btn:hover { opacity: .85; }
.quest-check { color: #00f5ff; font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.ach-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 1rem .75rem;
  text-align: center;
  transition: all .2s;
}
.ach-card.ach-unlocked {
  border-color: rgba(255,215,0,.4);
  background: rgba(255,215,0,.06);
}
.ach-card.ach-locked { opacity: .45; }
.ach-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.ach-label { font-size: .75rem; font-weight: 700; color: #fff; margin-bottom: .25rem; font-family: 'Barlow Condensed', sans-serif; letter-spacing: .05em; }
.ach-desc { font-size: .65rem; color: rgba(255,255,255,.4); line-height: 1.3; }

/* Achievement popup */
.achievement-popup {
  position: fixed;
  bottom: 80px; right: 20px;
  background: linear-gradient(135deg, rgba(10,15,40,.97), rgba(20,10,50,.97));
  border: 1px solid rgba(255,215,0,.5);
  border-radius: 14px;
  padding: .9rem 1.2rem;
  display: flex; align-items: center; gap: .75rem;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 20px rgba(255,215,0,.15);
}
.achievement-popup.show { transform: translateX(0); }
.ach-pop-icon { font-size: 2rem; flex-shrink: 0; }
.ach-pop-title { font-size: .65rem; color: #ffd700; letter-spacing: .1em; font-family: 'Bebas Neue', sans-serif; }
.ach-pop-label { font-size: .95rem; font-weight: 700; color: #fff; font-family: 'Barlow Condensed', sans-serif; }

/* ============================================================
   CAREER STATS
   ============================================================ */
.career-card { margin-bottom: 1.5rem; }
.career-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.cs-item {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .75rem .5rem;
  text-align: center;
}
.cs-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; color: #00f5ff; line-height: 1; }
.cs-label { font-size: .65rem; color: rgba(255,255,255,.5); margin-top: .2rem; }
.career-milestones { }
.ms-title { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: .1em; color: #ffd700; margin-bottom: .75rem; }
.ms-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.ms-icon { font-size: 1.2rem; flex-shrink: 0; }
.ms-info { flex: 1; }
.ms-label { font-size: .8rem; color: rgba(255,255,255,.7); margin-bottom: .25rem; }
.ms-label strong { color: #fff; }
.ms-bar-wrap { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.ms-bar-fill { height: 100%; background: linear-gradient(90deg, #7c3aed, #00f5ff); border-radius: 3px; transition: width .5s; }

/* ============================================================
   SPIN WHEEL
   ============================================================ */
.spin-cost-info { font-size: .8rem; color: rgba(255,255,255,.5); margin-bottom: 1rem; }
.spin-cost-info span { color: #ffd700; font-weight: 700; }
.wheel-wrap { position: relative; display: inline-block; margin: .5rem auto 1rem; }
.wheel-pointer {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: #ffd700;
  z-index: 2;
  filter: drop-shadow(0 0 6px #ffd700);
}
#spin-canvas { border-radius: 50%; box-shadow: 0 0 30px rgba(0,245,255,.2), 0 0 60px rgba(124,58,237,.15); display: block; }
.spin-result {
  min-height: 2rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: .1em;
  color: #ffd700;
  margin-bottom: .75rem;
}
.spin-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-bottom: .75rem; }

/* ============================================================
   BATTLE PASS
   ============================================================ */
.bp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding: .75rem 1rem; background: rgba(255,255,255,.04); border-radius: 10px; border: 1px solid rgba(255,255,255,.08); }
.bp-status { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; letter-spacing: .1em; }
.bp-status.bp-premium { color: #ffd700; }
.bp-status.bp-free { color: rgba(255,255,255,.5); }
.bp-xp-info { font-size: .85rem; color: rgba(255,255,255,.6); }
.bp-xp-info strong { color: #00f5ff; }
.bp-track { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; max-height: 420px; overflow-y: auto; padding-right: .25rem; }
.bp-tier {
  display: grid;
  grid-template-columns: 40px 80px 1fr 1fr;
  gap: .5rem;
  align-items: center;
  padding: .6rem .75rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  opacity: .5;
  transition: all .2s;
}
.bp-tier.bp-unlocked { opacity: 1; border-color: rgba(0,245,255,.2); }
.bp-tier-num { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: #00f5ff; }
.bp-tier-xp { font-size: .65rem; color: rgba(255,255,255,.4); }
.bp-reward { background: rgba(255,255,255,.04); border-radius: 6px; padding: .4rem .5rem; text-align: center; border: 1px solid rgba(255,255,255,.06); }
.bp-reward.bp-claimable { border-color: rgba(0,245,255,.4); background: rgba(0,245,255,.06); }
.bp-reward.bp-claimed { opacity: .4; }
.bp-prem-reward.bp-locked-prem { opacity: .3; }
.bp-reward-label { font-size: .55rem; color: rgba(255,255,255,.4); letter-spacing: .05em; margin-bottom: .15rem; }
.bp-reward-val { font-size: .75rem; font-weight: 700; color: #ffd700; }
.bp-claim-btn {
  display: block; width: 100%; margin-top: .3rem;
  background: linear-gradient(135deg, #00f5ff, #7c3aed);
  border: none; border-radius: 4px;
  color: #000; font-weight: 700; font-size: .65rem;
  padding: .2rem .4rem; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
}
.bp-check { color: #00f5ff; font-size: .9rem; font-weight: 700; }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.lb-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.lb-tab {
  flex: 1; min-width: 80px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .8rem; font-weight: 700;
  padding: .5rem .5rem;
  cursor: pointer; transition: all .2s;
}
.lb-tab.active { background: rgba(0,245,255,.1); border-color: rgba(0,245,255,.4); color: #00f5ff; }
.lb-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.lb-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .9rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
}
.lb-row.lb-me { border-color: rgba(0,245,255,.4); background: rgba(0,245,255,.06); }
.lb-rank { font-size: 1.1rem; width: 32px; text-align: center; flex-shrink: 0; }
.lb-name { flex: 1; font-size: .9rem; font-weight: 600; color: #fff; }
.lb-val { font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; color: #ffd700; }

/* ============================================================
   POWER-UP BUTTONS
   ============================================================ */
.powerup-btn {
  background: rgba(0,245,255,.1);
  border: 2px solid #00f5ff;
  border-radius: 10px;
  color: #00f5ff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .85rem; font-weight: 700;
  padding: .5rem .9rem;
  cursor: pointer;
  animation: powerup-pulse 1s ease-in-out infinite alternate;
  letter-spacing: .05em;
}
@keyframes powerup-pulse {
  from { box-shadow: 0 0 8px currentColor; }
  to   { box-shadow: 0 0 20px currentColor; }
}

/* ============================================================
   GAME MODE BUTTONS (in team select)
   ============================================================ */
.setting-btns .sbtn { white-space: nowrap; }

/* ============================================================
   HALFTIME / PENALTY overlays — hidden class fix
   ============================================================ */
#halftime-overlay.hidden,
#penalty-overlay.hidden { display: none !important; }
#pen-aim-btns.hidden { display: none !important; }


/* ============================================================
   NEW SCREEN LAYOUT (screen-inner / screen-header / back-btn)
   ============================================================ */
.screen-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  min-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}
.screen-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.screen-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: .1em;
  color: #fff;
  margin: 0;
  flex: 1;
}
.back-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  padding: .4rem .8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
}
.back-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Halftime / Penalty hidden fix */
#halftime-overlay.hidden,
#penalty-overlay.hidden { display: none !important; }

/* ============================================================
   FIX: New screens need menu-bg and proper full-screen layout
   ============================================================ */
#screen-quests,
#screen-achievements,
#screen-career,
#screen-spin,
#screen-battlepass,
#screen-leaderboard {
  background: #04060f;
  overflow-y: auto;
}

#screen-quests .screen-inner,
#screen-achievements .screen-inner,
#screen-career .screen-inner,
#screen-spin .screen-inner,
#screen-battlepass .screen-inner,
#screen-leaderboard .screen-inner {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* Back button — always visible, fixed top-left on new screens */
.screen-header {
  position: sticky;
  top: 0;
  background: rgba(4,6,15,.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  padding: .75rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.back-btn {
  background: rgba(0,245,255,.08) !important;
  border: 1px solid rgba(0,245,255,.3) !important;
  border-radius: 8px !important;
  color: #00f5ff !important;
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  padding: .45rem 1rem !important;
  cursor: pointer !important;
  letter-spacing: .05em !important;
  transition: all .2s !important;
}
.back-btn:hover {
  background: rgba(0,245,255,.18) !important;
}

/* ============================================================
   CRITICAL FIX: New screens must be top-aligned and scrollable
   ============================================================ */
#screen-quests,
#screen-achievements,
#screen-career,
#screen-spin,
#screen-battlepass,
#screen-leaderboard {
  align-items: stretch !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
}

#screen-quests .screen-inner,
#screen-achievements .screen-inner,
#screen-career .screen-inner,
#screen-spin .screen-inner,
#screen-battlepass .screen-inner,
#screen-leaderboard .screen-inner {
  min-height: unset;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  align-self: flex-start;
}

/* ============================================================
   FIX: Menu screen scrollable + login persistence
   ============================================================ */

/* Allow menu screen to scroll on small screens */
#screen-menu {
  overflow-y: auto !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

#screen-menu .menu-content {
  max-width: 480px;
  width: 100%;
  padding-bottom: 3rem;
}

/* Nav grid — allow more buttons to wrap nicely */
.nav-grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .6rem !important;
  width: 100% !important;
}

/* Make all mbtn in nav-grid-2 consistent height */
.nav-grid-2 .mbtn {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  padding: .75rem .5rem !important;
  font-size: .85rem !important;
}

/* ============================================================
   FIX: Dark gradient background on all new screens (no black)
   ============================================================ */
#screen-quests::before,
#screen-achievements::before,
#screen-career::before,
#screen-spin::before,
#screen-battlepass::before,
#screen-leaderboard::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, #1a0040 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, #003a1a 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, #3a0020 0%, transparent 50%),
    radial-gradient(ellipse at 20% 85%, #001a3a 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, #0a0020 0%, #000510 100%);
  z-index: 0;
  pointer-events: none;
}

#screen-quests .screen-inner,
#screen-achievements .screen-inner,
#screen-career .screen-inner,
#screen-spin .screen-inner,
#screen-battlepass .screen-inner,
#screen-leaderboard .screen-inner {
  position: relative;
  z-index: 1;
}

/* Also fix menu screen background staying fixed while content scrolls */
#screen-menu .menu-bg {
  position: fixed !important;
}

/* ============================================================
   NEW CONTENT STYLES: Calendar, Achievements, Career, BP
   ============================================================ */

/* Login Calendar */
.cal-title { font-family:'Bebas Neue',sans-serif; font-size:1rem; letter-spacing:.1em; color:#ffd700; margin-bottom:.75rem; }
.cal-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:.35rem; margin-bottom:1.25rem; }
.cal-day { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:8px; padding:.35rem .2rem; text-align:center; font-size:.65rem; }
.cal-day-num { font-family:'Bebas Neue',sans-serif; font-size:.85rem; color:rgba(255,255,255,.5); }
.cal-icon { font-size:.9rem; margin:.1rem 0; }
.cal-val { font-size:.55rem; color:rgba(255,255,255,.6); line-height:1.2; }
.cal-claimed { background:rgba(0,245,255,.12); border-color:rgba(0,245,255,.3); }
.cal-claimed .cal-day-num { color:#00f5ff; }
.cal-today { background:rgba(255,215,0,.15); border-color:#ffd700; animation:calPulse 1.5s ease-in-out infinite; }
@keyframes calPulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,215,0,.4)} 50%{box-shadow:0 0 0 4px rgba(255,215,0,.1)} }

/* Achievement summary */
.ach-summary { margin-bottom:1.25rem; }
.ach-sum-text { font-size:.85rem; color:rgba(255,255,255,.7); margin-bottom:.4rem; }
.ach-sum-bar { height:6px; background:rgba(255,255,255,.1); border-radius:3px; overflow:hidden; }
.ach-sum-fill { height:100%; background:linear-gradient(90deg,#00f5ff,#7c3aed); border-radius:3px; transition:width .5s; }

/* Achievement categories */
.ach-category { margin-bottom:1.5rem; }
.ach-cat-title { font-family:'Bebas Neue',sans-serif; font-size:1rem; letter-spacing:.1em; color:#ffd700; margin-bottom:.6rem; padding-bottom:.3rem; border-bottom:1px solid rgba(255,215,0,.2); }
.ach-cat-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:.5rem; }
.ach-card { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:.75rem; text-align:center; transition:all .2s; }
.ach-unlocked { background:rgba(0,245,255,.08); border-color:rgba(0,245,255,.35); }
.ach-unlocked .ach-icon { filter:none; }
.ach-locked .ach-icon { filter:grayscale(1) opacity(.4); }
.ach-icon { font-size:1.6rem; margin-bottom:.3rem; }
.ach-label { font-family:'Bebas Neue',sans-serif; font-size:.85rem; letter-spacing:.05em; color:#fff; margin-bottom:.2rem; }
.ach-desc { font-size:.65rem; color:rgba(255,255,255,.5); line-height:1.3; }

/* Career stat grid */
.career-stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.5rem; margin-bottom:1.25rem; }
.cs-item { background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:.6rem .4rem; text-align:center; }
.cs-val { font-family:'Bebas Neue',sans-serif; font-size:1.3rem; color:#00f5ff; line-height:1; }
.cs-label { font-size:.6rem; color:rgba(255,255,255,.5); letter-spacing:.05em; margin-top:.2rem; }

/* Milestones */
.ms-title { font-family:'Bebas Neue',sans-serif; font-size:1rem; letter-spacing:.1em; color:#ffd700; margin-bottom:.75rem; }
.ms-row { display:flex; align-items:center; gap:.75rem; margin-bottom:.75rem; }
.ms-icon { font-size:1.4rem; flex-shrink:0; }
.ms-info { flex:1; }
.ms-label { font-size:.8rem; color:rgba(255,255,255,.8); margin-bottom:.3rem; }
.ms-bar-wrap { height:6px; background:rgba(255,255,255,.1); border-radius:3px; overflow:hidden; }
.ms-bar-fill { height:100%; background:linear-gradient(90deg,#7c3aed,#00f5ff); border-radius:3px; transition:width .5s; }

/* Battle Pass progress bar */
.bp-progress-bar { height:6px; background:rgba(255,255,255,.1); border-radius:3px; overflow:hidden; margin-top:.5rem; }
.bp-progress-fill { height:100%; background:linear-gradient(90deg,#ffd700,#ff6b00); border-radius:3px; transition:width .5s; }

/* Leaderboard you badge */
.lb-you { font-size:.65rem; color:#ffd700; font-weight:700; }
.lb-me { background:rgba(255,215,0,.1) !important; border-color:rgba(255,215,0,.3) !important; }

/* Spin rarity label */
#spin-result { font-family:'Bebas Neue',sans-serif; font-size:1.1rem; letter-spacing:.05em; color:#ffd700; min-height:1.5rem; margin-top:.75rem; text-align:center; }
