/* ═══════════════════════════════════════════════════════════
   style.css — مزايدة النجوم | Star Auction Football Game
   ═══════════════════════════════════════════════════════════ */

/* ── Google Font & Reset ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', sans-serif;
  background: #0d0d1a;
  color: #fff;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --bg:        #0d0d1a;
  --bg2:       #12122a;
  --bg3:       #1a1a3e;
  --card:      #16163a;
  --gold:      #f5a623;
  --red:       #e94560;
  --green:     #00d68f;
  --blue:      #4facfe;
  --purple:    #9b59b6;
  --accent:    #00d68f;
  --surface:   rgba(255,255,255,0.065);
  --text:      #ffffff;
  --text2:     #a0a0c0;
  --border:    rgba(255,255,255,0.08);
  --glow-gold: rgba(245,166,35,0.35);
  --glow-red:  rgba(233,69,96,0.35);
  --glow-blue: rgba(79,172,254,0.35);
  --radius:    16px;
  --shadow:    0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── 2026 mobile pro polish ───────────────────────────────── */
:root {
  --stadium: #07130f;
  --pitch: #0f6b45;
  --neon: #56f0b5;
  --ink: #090b12;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(86,240,181,0.18), transparent 34%),
    linear-gradient(180deg, #08110f 0%, #090b16 45%, #10101f 100%);
}

.screen {
  background:
    radial-gradient(circle at 20% 0%, rgba(245,166,35,0.12), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(79,172,254,0.13), transparent 30%),
    linear-gradient(180deg, #08110f 0%, #0d1020 100%);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

#screen-home::before,
#screen-auction::before,
#screen-match::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255,255,255,0.18) 50%, transparent 51%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 42px);
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 72%, transparent);
}

.home-profile,
.lobby-card,
.modal-box,
.auth-form,
.settings-group,
.auction-card,
.waiting-player-card,
.room-code-box,
.current-bid-bar,
.bidding-area,
.waiting-bid,
.result-ratings-box,
.gs-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 18px 42px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}

.home-profile {
  border-radius: 20px;
  min-height: 72px;
}

.home-avatar,
.waiting-avatar,
.pregame-avatar,
.loading-ball,
.hero-ball {
  filter: drop-shadow(0 10px 22px rgba(245,166,35,0.28));
}

.hero-title {
  letter-spacing: 0;
  text-shadow: 0 12px 38px rgba(0,0,0,0.42);
}

.btn,
.btn-play,
.qbid,
.mode-card,
.avatar-opt,
.gc-card {
  touch-action: manipulation;
}

.btn,
.btn-play {
  min-height: 50px;
  border-radius: 16px;
}

.btn-play {
  background:
    linear-gradient(135deg, #f5a623 0%, #ef476f 48%, #4facfe 100%);
  box-shadow: 0 16px 34px rgba(233,69,96,0.28), 0 8px 0 rgba(0,0,0,0.18);
}

.btn-primary {
  background: linear-gradient(135deg, #f5a623, #ef476f 54%, #4facfe);
}

.btn-secondary {
  background: rgba(255,255,255,0.095);
}

.btn-accent {
  background: linear-gradient(135deg, #56f0b5, #4facfe);
}

.tap-pop {
  animation: tapPop 0.22s ease;
}

@keyframes tapPop {
  0% { transform: scale(1); }
  45% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.mode-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-areas: "icon title" "icon copy";
  text-align: right;
  gap: 2px 12px;
  align-items: center;
  min-height: 94px;
}

.mode-icon { grid-area: icon; margin: 0; }
.mode-card h3 { grid-area: title; }
.mode-card p { grid-area: copy; }

.auction-header {
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(18px);
  background: rgba(6,10,18,0.78);
}

.auction-cards-row {
  width: 100%;
  padding: 12px;
}

.auction-card {
  border-radius: 22px;
  transform-origin: center;
  animation: cardRise 0.42s ease both;
}

.auction-card:nth-child(2) { animation-delay: 0.08s; }

@keyframes cardRise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.qbid {
  min-height: 48px;
  border-radius: 15px;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(245,166,35,0.22), rgba(245,166,35,0.08));
}

.qbid:disabled {
  filter: grayscale(1);
}

.current-bid-bar {
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  border-radius: 18px;
}

.bidding-area {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  border-radius: 22px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.bid-status-bar {
  border-radius: 16px;
}

.room-code-value {
  direction: ltr;
  line-height: 1;
}

.guess-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gc-card {
  min-height: 118px;
  border-radius: 16px;
}

.gc-pic {
  width: 46px;
  height: 46px;
}

.gc-name {
  height: 2rem;
}

.match-scoreboard {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(6,10,18,0.86);
  backdrop-filter: blur(18px);
}

.match-body-grid {
  flex-direction: column;
}

.match-stats-col {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  border-left: 0;
  border-bottom: 1px solid var(--border);
}

.match-events-col {
  min-height: 0;
}

.goal-flash span {
  font-size: clamp(3rem, 18vw, 5rem);
  text-shadow: 0 18px 48px rgba(0,0,0,0.45);
}

@media (max-width: 430px) {
  .home-content { gap: 18px; padding: 16px; }
  .hero-ball { font-size: 4.2rem; }
  .hero-title { font-size: 2.65rem; }
  .hero-sub { max-width: 280px; line-height: 1.7; }
  .home-row-btns { gap: 8px; }
  .btn-sm-icon { min-height: 76px; border-radius: 18px; }
  .auction-header { gap: 8px; padding: 10px 12px; }
  .budgets-mini { width: 100%; }
  .budget-chip { flex: 1; min-width: 0; }
  .auction-cards-row { gap: 10px; }
  .quick-bid-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
  .qbid { padding: 9px 4px; font-size: 0.82rem; }
  .custom-bid-row { align-items: stretch; }
  .custom-bid-row .btn { padding-inline: 14px; }
  .modal-box { width: calc(100% - 28px); border-radius: 24px; padding: 24px 18px; }
  .waiting-players { width: 100%; gap: 10px; }
  .waiting-player-card { min-width: 0; flex: 1; padding: 16px 10px; }
  .pregame-vs { gap: 10px; }
  .pregame-avatar { font-size: 3.2rem; }
  .countdown-num { font-size: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Particles ───────────────────────────────────────────── */
#particles-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ── Screens ─────────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  background: var(--bg);
  transition: opacity var(--transition), transform var(--transition);
}
.screen.active { display: flex; }
.screen-enter { animation: screenIn 0.35s ease forwards; }
.screen-exit  { animation: screenOut 0.35s ease forwards; }

@keyframes screenIn  { from { opacity:0; transform:translateY(24px) } to { opacity:1; transform:none } }
@keyframes screenOut { from { opacity:1; transform:none } to { opacity:0; transform:translateY(-16px) } }

/* ── Screen Header ───────────────────────────────────────── */
.screen-top {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.screen-title { font-size: 1.2rem; font-weight: 900; }
.screen-sub   { color: var(--text2); font-size: 0.85rem; padding: 0 20px 8px; width:100%; }

/* ── Loading Screen ──────────────────────────────────────── */
#screen-loading {
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1a0a3e 0%, var(--bg) 70%);
}
.loading-content { text-align: center; padding: 40px; }
.loading-ball {
  font-size: 5rem;
  display: block;
  animation: spin 2s linear infinite;
  margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-content h1 { font-size: 2.4rem; font-weight: 900; background: linear-gradient(135deg, var(--gold), var(--red)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.loading-tagline  { color: var(--blue); letter-spacing: 4px; font-size: 0.85rem; margin-top: 4px; }
.loading-bar-wrap { width: 220px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 99px; margin: 32px auto 12px; overflow: hidden; }
.loading-bar      { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); border-radius: 99px; transition: width 0.4s ease; }
.loading-hint     { color: var(--text2); font-size: 0.85rem; }

/* ── Home Screen ─────────────────────────────────────────── */
#screen-home {
  background: radial-gradient(ellipse at 50% 0%, #1a0a3e 0%, var(--bg) 60%);
  justify-content: space-between;
  padding-bottom: 40px;
}
.home-bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.orb-1 { width:300px; height:300px; background:var(--purple); top:-80px; left:-80px; animation-delay:0s; }
.orb-2 { width:250px; height:250px; background:var(--red); top:30%; right:-60px; animation-delay:2.5s; }
.orb-3 { width:200px; height:200px; background:var(--blue); bottom:10%; left:20%; animation-delay:5s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

.home-content { position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; width:100%; padding:20px; gap:24px; }

.home-profile {
  display: flex; align-items: center; gap: 14px;
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}
.home-avatar { font-size: 2rem; }
.home-player-name { font-weight: 900; font-size: 1rem; display: block; }
.home-stats { display: flex; gap: 10px; margin-top: 4px; }
.stat-chip {
  background: rgba(255,255,255,0.08); border-radius: 20px;
  padding: 2px 10px; font-size: 0.78rem; color: var(--text2);
}

.home-hero { text-align: center; padding: 10px 0; }
.hero-ball-wrap { margin-bottom: 16px; }
.hero-ball { font-size: 5rem; display: inline-block; animation: heroBounce 2s ease-in-out infinite; }
@keyframes heroBounce { 0%,100%{transform:translateY(0) rotate(-5deg)} 50%{transform:translateY(-15px) rotate(5deg)} }
.hero-title { font-size: 3rem; font-weight: 900; line-height: 1.1; }
.hero-title-accent { background: linear-gradient(135deg, var(--gold) 0%, var(--red) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--text2); font-size: 0.9rem; margin-top: 8px; }

.home-buttons { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.home-row-btns { display: flex; gap: 10px; width: 100%; justify-content: center; }

/* ── Buttons ─────────────────────────────────────────────── */
button { cursor: pointer; border: none; font-family: 'Cairo', sans-serif; font-weight: 700; transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s; }
button:active { transform: scale(0.93) !important; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-play {
  width: 100%; max-width: 340px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--red) 100%);
  color: #fff; border-radius: 18px;
  font-size: 1.3rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 8px 30px var(--glow-red), 0 2px 0 rgba(0,0,0,0.3);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  animation: btnPulse 3s ease-in-out infinite;
}
.btn-play-icon { font-size: 1.4rem; }
@keyframes btnPulse { 0%,100%{box-shadow:0 8px 30px var(--glow-red)} 50%{box-shadow:0 12px 50px var(--glow-gold)} }

.btn-sm-icon {
  flex: 1; max-width: 110px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text); border-radius: 14px;
  padding: 12px 8px;
  font-size: 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.btn-sm-icon span { font-size: 0.72rem; color: var(--text2); }
.btn-sm-icon:hover { background: rgba(255,255,255,0.12); }

.btn { border-radius: 14px; padding: 12px 24px; font-size: 1rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary  { background: linear-gradient(135deg, var(--gold), var(--red)); color: #fff; box-shadow: 0 4px 20px var(--glow-red); }
.btn-secondary{ background: rgba(255,255,255,0.1); border: 1px solid var(--border); color: var(--text); }
.btn-accent   { background: var(--green); color: #000; font-weight: 900; box-shadow: 0 4px 15px rgba(0,214,143,0.35); }
.btn-danger   { background: rgba(233,69,96,0.15); border: 1px solid var(--red); color: var(--red); }
.btn-sm       { background: rgba(255,255,255,0.08); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 16px; font-size: 0.85rem; }

.btn-back {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 1.1rem;
}

/* ── Inputs ──────────────────────────────────────────────── */
.text-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  padding: 14px 18px;
  transition: border-color 0.2s;
  outline: none;
  text-align: center;
}
.text-input:focus { border-color: var(--gold); }
.text-input::placeholder { color: var(--text2); }
.text-code { font-size: 1.5rem; font-weight: 900; letter-spacing: 6px; }

.select-input {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  padding: 8px 12px;
  outline: none;
}
.select-input option { background: var(--bg2); }

/* ── Modals ──────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 400px; width: 90%;
  text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  transform: scale(0.8);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.modal.modal-show .modal-box,
.modal-box { transform: scale(1); }
.modal-wide { max-width: 520px; }
.modal-box h2 { font-size: 1.5rem; font-weight: 900; }
.label-sm { color: var(--text2); font-size: 0.85rem; text-align: right; }

.avatar-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.avatar-opt  {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.07);
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.avatar-opt:hover, .avatar-opt.selected {
  background: rgba(245,166,35,0.2);
  border-color: var(--gold);
  transform: scale(1.1);
}

/* ── Lobby ───────────────────────────────────────────────── */
.lobby-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; padding: 24px 20px; width: 100%;
}
.lobby-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.2s;
}
.lobby-card:hover { border-color: rgba(255,255,255,0.2); }
.lobby-card-icon { font-size: 2.5rem; text-align: center; }
.lobby-card h3   { font-size: 1.2rem; font-weight: 900; text-align: center; }
.lobby-card p    { color: var(--text2); text-align: center; font-size: 0.9rem; }
.lobby-or { color: var(--text2); font-size: 0.9rem; }

.settings-block { display: flex; flex-direction: column; gap: 10px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-row label { color: var(--text2); font-size: 0.9rem; }

/* ── Waiting Screen ──────────────────────────────────────── */
.waiting-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 32px; padding: 32px 20px;
}
.room-code-box { text-align: center; }
.room-code-label { color: var(--text2); font-size: 0.9rem; margin-bottom: 8px; }
.room-code-value {
  font-size: 3rem; font-weight: 900; letter-spacing: 10px;
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.waiting-players { display: flex; align-items: center; gap: 20px; }
.waiting-player-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px; text-align: center;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 120px;
}
.waiting-player-card.waiting-opponent { opacity: 0.6; }
.waiting-avatar { font-size: 2.5rem; }
.waiting-name   { font-weight: 700; font-size: 0.9rem; }
.ready-badge    { background: rgba(0,214,143,0.2); color: var(--green); border-radius: 10px; padding: 4px 10px; font-size: 0.78rem; }
.vs-badge       { font-size: 1.5rem; font-weight: 900; color: var(--text2); }

.waiting-dots, .wait-dots { display: flex; gap: 6px; justify-content: center; }
.waiting-dots span, .wait-dots span {
  width: 8px; height: 8px;
  background: var(--text2); border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.waiting-dots span:nth-child(2), .wait-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3), .wait-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%,100%{transform:translateY(0);opacity:0.4} 50%{transform:translateY(-6px);opacity:1} }

.bouncing-ball { font-size: 3rem; animation: heroBounce 1.5s ease-in-out infinite; }

/* ── Pre-game Screen ─────────────────────────────────────── */
#screen-pregame {
  background: radial-gradient(ellipse at 50% 50%, #1a0a3e, var(--bg));
  justify-content: center;
}
.pregame-content { text-align: center; padding: 40px 20px; }
.pregame-vs      { display: flex; align-items: center; gap: 24px; justify-content: center; }
.pregame-player  { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pregame-avatar  { font-size: 4rem; }
.pregame-name    { font-size: 1rem; font-weight: 900; }
.pregame-budget  { color: var(--gold); font-size: 0.85rem; }
.pregame-center  { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vs-big { font-size: 2rem; font-weight: 900; color: var(--text2); }
.countdown-num  {
  font-size: 6rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.countdown-pop { animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes popIn { from{transform:scale(0.4)} to{transform:scale(1)} }
.pregame-hint { color: var(--text2); margin-top: 24px; font-size: 0.9rem; }

/* ── Auction Screen ──────────────────────────────────────── */
#screen-auction {
  background: linear-gradient(180deg, #0d0d1a 0%, #1a0a2e 100%);
  gap: 0;
}

.auction-header {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.round-indicator { font-weight: 700; font-size: 0.9rem; color: var(--text2); }
.round-num { color: var(--gold); font-size: 1.2rem; font-weight: 900; }

.timer-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.timer-svg  { width: 52px; height: 52px; transform: rotate(-90deg); }
.timer-track { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 5; }
.timer-prog  {
  fill: none; stroke: var(--green); stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 176; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.5s;
}
.timer-val {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: var(--text);
}

.budgets-mini { display: flex; gap: 8px; margin-right: auto; }
.budget-chip  {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 6px 12px;
  font-size: 0.8rem; display: flex; flex-direction: column; align-items: center;
}
.host-chip  { border-color: rgba(0,214,143,0.3); }
.guest-chip { border-color: rgba(79,172,254,0.3); }
.budget-val { font-weight: 900; font-size: 0.95rem; color: var(--gold); }

.auction-cards-row {
  display: flex; gap: 12px;
  padding: 14px 14px 8px;
  width: 100%; justify-content: center;
  flex-shrink: 0;
}

.auction-card {
  flex: 1; max-width: 200px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px 12px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.auction-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--tier-color, transparent) 0%, transparent 60%);
  opacity: 0.06;
  pointer-events: none;
}
.known-card  { border-color: rgba(245,166,35,0.4); box-shadow: 0 0 20px rgba(245,166,35,0.1); }
.mystery-card{ border-color: rgba(155,89,182,0.4); box-shadow: 0 0 20px rgba(155,89,182,0.1); }

.card-tag {
  background: rgba(255,255,255,0.08);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.7rem; font-weight: 700; color: var(--gold);
}
.mystery-tag { color: var(--purple); }

.auction-avatar-wrap { width: 70px; height: 70px; position: relative; }
.auction-avatar-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  border: 2px solid var(--border);
}

.player-rat {
  font-size: 2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.player-nm  { font-size: 0.95rem; font-weight: 900; }
.player-cl  { font-size: 0.75rem; color: var(--text2); }
.player-nat { font-size: 0.75rem; color: var(--text2); }
.pos-badge  {
  padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  background: var(--green); color: #000;
}

.mini-stats { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ms-row     { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; color: var(--text2); }
.ms-bar     { flex: 1; height: 5px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.ms-bar div { height: 100%; background: var(--green); border-radius: 99px; transition: width 0.5s 0.3s; }

.mystery-q     { font-size: 5rem; font-weight: 900; color: rgba(155,89,182,0.5); }
.mystery-txt   { font-size: 0.85rem; font-weight: 700; }
.mystery-sub   { font-size: 0.75rem; color: var(--text2); }
.mystery-hint-badge {
  background: rgba(155,89,182,0.2); border: 1px solid rgba(155,89,182,0.4);
  border-radius: 10px; padding: 4px 12px; font-size: 0.78rem; color: var(--purple);
}

.current-bid-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(245,166,35,0.08);
  border-top: 1px solid rgba(245,166,35,0.15);
  border-bottom: 1px solid rgba(245,166,35,0.15);
  width: 100%; flex-shrink: 0;
}
.cb-label  { color: var(--text2); font-size: 0.85rem; }
.cb-amount { font-size: 1.2rem; font-weight: 900; color: var(--gold); }
.cb-by     { color: var(--text2); font-size: 0.8rem; margin-right: auto; }

.bidding-area {
  width: 100%; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  flex-shrink: 0;
}
.bid-status-bar {
  text-align: center; font-weight: 700; font-size: 0.95rem;
  color: var(--gold); padding: 6px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.quick-bid-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qbid {
  background: rgba(245,166,35,0.15);
  border: 1.5px solid rgba(245,166,35,0.4);
  color: var(--gold); border-radius: 12px;
  padding: 10px 16px; font-size: 0.9rem; font-weight: 900;
  font-family: 'Cairo', sans-serif;
  transition: all 0.15s;
}
.qbid:hover:not(:disabled) { background: rgba(245,166,35,0.3); transform: translateY(-2px); }

.custom-bid-row { display: flex; gap: 8px; }
.custom-bid-row .text-input { flex: 1; font-size: 0.9rem; padding: 10px 14px; }

.waiting-bid { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; width: 100%; }
.waiting-bid p { color: var(--text2); font-size: 0.9rem; }

.bid-feed {
  flex: 1; overflow-y: auto; padding: 8px 16px;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.bid-entry {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border-radius: 10px; padding: 6px 12px;
  font-size: 0.82rem;
  opacity: 0; transform: translateX(20px);
  transition: all 0.3s;
}
.bid-entry.bid-entry-show { opacity: 1; transform: none; }
.bid-mine { border-left: 3px solid var(--green); }
.bid-opponent { border-left: 3px solid var(--blue); }
.bid-pass { border-left: 3px solid var(--red); opacity: 0.6; }
.bid-who  { font-weight: 700; }
.bid-amount-entry { color: var(--gold); font-weight: 900; }

/* ── Overlay ─────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  animation: overlayIn 0.3s ease;
}
@keyframes overlayIn { from{opacity:0} to{opacity:1} }
.overlay-enter { animation: overlayIn 0.3s ease; }
.overlay-exit  { animation: overlayOut 0.3s ease; }
@keyframes overlayOut { from{opacity:1} to{opacity:0} }

.ov-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 28px; padding: 28px 24px;
  max-width: 420px; width: 90%;
  text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  animation: slideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90dvh; overflow-y: auto;
}
@keyframes slideUp { from{transform:translateY(40px);opacity:0} to{transform:none;opacity:1} }
.ov-title { font-size: 1.2rem; font-weight: 900; }
.ov-result-row { display: flex; gap: 12px; }
.ov-result-card {
  flex: 1; border-radius: 18px; padding: 14px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.winner-card { background: rgba(245,166,35,0.12); border: 1px solid rgba(245,166,35,0.3); }
.loser-card  { background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.ov-badge   { font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.ov-pname   { font-weight: 900; font-size: 0.95rem; }
.ov-cost    { color: var(--red); font-weight: 700; font-size: 0.9rem; }
.ov-got     { color: var(--text2); font-size: 0.78rem; }
.mystery-reveal-box {
  background: rgba(155,89,182,0.1);
  border: 1px solid rgba(155,89,182,0.3);
  border-radius: 18px; padding: 16px;
}
.mystery-reveal-box h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--purple); }
.revealed-card-wrap { display: flex; justify-content: center; }

/* ── Player Card (reusable) ──────────────────────────────── */
.p-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.p-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--tier-color, transparent) 0%, transparent 50%);
  opacity: 0.07; pointer-events: none;
}
.p-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.p-card-compact { padding: 10px; gap: 5px; border-radius: 14px; }
.p-card-glow { box-shadow: 0 0 25px var(--tier-color, var(--gold)), inset 0 0 20px rgba(255,255,255,0.03); }

.p-card-header { display: flex; align-items: center; justify-content: space-between; }
.p-card-tier   { font-size: 0.75rem; color: var(--tier-color); }
.p-card-pos    { border-radius: 20px; padding: 2px 8px; font-size: 0.68rem; font-weight: 700; color: #000; }
.p-card-avatar { display: flex; justify-content: center; }
.p-avatar-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  position: relative;
  border: 2px solid var(--border);
}
.p-rating-badge {
  position: absolute; bottom: -4px; right: -4px;
  background: var(--tier-color, var(--gold));
  color: #000; font-size: 0.65rem; font-weight: 900;
  border-radius: 10px; padding: 2px 6px;
}
.p-card-info { text-align: center; }
.p-name  { font-weight: 900; font-size: 0.88rem; }
.p-club  { color: var(--text2); font-size: 0.72rem; }
.p-meta  { color: var(--text2); font-size: 0.68rem; }
.p-stats { display: flex; flex-direction: column; gap: 4px; }

.stat-bar-row { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; }
.stat-label-mini { width: 28px; color: var(--text2); text-align: right; }
.stat-bar-bg  { flex: 1; height: 5px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.stat-bar-fill{ height: 100%; border-radius: 99px; transition: width 0.6s ease; }
.stat-val { color: var(--text2); width: 24px; text-align: left; }

/* ── Team Review ─────────────────────────────────────────── */
#screen-team-review { overflow-y: auto; }
.review-content {
  display: flex; gap: 12px; padding: 16px;
  width: 100%; flex: 1;
}
.review-team-col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.review-vs-col   { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.review-vs-text  { font-size: 1.5rem; font-weight: 900; color: var(--text2); writing-mode: vertical-lr; }
.review-team-title { font-size: 1rem; font-weight: 900; }

.power-meter  { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.power-bar-bg { flex: 1; height: 8px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.power-bar-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.8s ease; }
.coach-tag    { color: var(--green); font-size: 0.8rem; }

.team-grid { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }

.review-start-btn { margin: 12px auto 24px; width: 90%; max-width: 360px; }

/* ── Match Screen ────────────────────────────────────────── */
#screen-match { gap: 0; }

.match-scoreboard {
  width: 100%;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 14px 16px; gap: 12px;
  flex-shrink: 0;
}
.match-team-side {
  flex: 1; display: flex; align-items: center; gap: 10px;
}
.match-team-side.left  { justify-content: flex-start; }
.match-team-side.right { justify-content: flex-end; flex-direction: row-reverse; }
.match-team-name { font-size: 0.85rem; font-weight: 700; color: var(--text2); }
.match-score-num {
  font-size: 2.5rem; font-weight: 900;
  min-width: 44px; text-align: center;
  transition: transform 0.3s;
}
.score-flash { animation: scoreFlash 0.5s ease; }
@keyframes scoreFlash { 0%{transform:scale(1.8);color:var(--gold)} 100%{transform:scale(1)} }

.match-mid   { text-align: center; }
.match-clock { font-size: 1.1rem; font-weight: 900; color: var(--blue); }
.match-phase { font-size: 0.75rem; color: var(--text2); }

.match-prog-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.match-prog-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width 0.4s ease; width: 0; }

.match-body-grid {
  display: flex; gap: 0; flex: 1; overflow: hidden;
}
.match-stats-col {
  width: 140px; flex-shrink: 0;
  padding: 14px 12px;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(255,255,255,0.02);
  overflow-y: auto;
}
.stat-row-m { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; }
.stat-lbl   { color: var(--text2); font-size: 0.7rem; text-align: center; }
.poss-bar   { height: 6px; background: rgba(255,255,255,0.1); border-radius: 99px; overflow: hidden; }
.poss-fill  { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.5s; }

.match-events-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.events-col-header { padding: 10px 14px; font-size: 0.85rem; font-weight: 700; color: var(--text2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.match-events-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }

.match-event-entry {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; border-left: 3px solid var(--border);
  opacity: 0; transform: translateX(-12px);
  transition: all 0.35s;
  font-size: 0.78rem;
}
.match-event-entry.event-entry-show { opacity: 1; transform: none; }
.event-host  { border-left-color: var(--red); }
.event-guest { border-left-color: var(--blue); }
.event-min   { color: var(--gold); font-weight: 900; font-size: 0.8rem; flex-shrink: 0; }
.event-icon  { font-size: 1rem; flex-shrink: 0; }
.event-title { font-weight: 700; }
.event-desc  { color: var(--text2); font-size: 0.7rem; }

/* Event flash card */
.event-flash-overlay {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.event-flash-card {
  background: var(--bg2);
  border: 2px solid var(--gold);
  border-radius: 24px; padding: 24px;
  text-align: center; min-width: 200px;
  box-shadow: 0 0 40px var(--glow-gold);
  animation: cardPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cardPop { from{transform:scale(0.3) rotate(-10deg);opacity:0} to{transform:none;opacity:1} }
.ef-icon  { font-size: 3rem; }
.ef-min   { color: var(--gold); font-weight: 900; margin: 4px 0; }
.ef-title { font-size: 1.2rem; font-weight: 900; }
.ef-desc  { color: var(--text2); font-size: 0.85rem; margin-top: 4px; }

/* ── Goal Flash ──────────────────────────────────────────── */
.goal-flash {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.goal-flash span {
  font-size: 4rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: goalText 0.5s ease;
}
.goal-flash-show { opacity: 1; }
@keyframes goalText { 0%{transform:scale(0.2)} 70%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* ── Result Screen ───────────────────────────────────────── */
#screen-result {
  background: radial-gradient(ellipse at 50% 20%, #1a0a3e, var(--bg));
  overflow-y: auto;
}
.result-bg-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(245,166,35,0.1), transparent 70%);
}
.result-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; padding: 32px 20px;
  width: 100%;
}
.result-trophy { font-size: 6rem; animation: trophyBounce 1s ease-out; }
@keyframes trophyBounce { 0%{transform:scale(0) rotate(-20deg)} 60%{transform:scale(1.3) rotate(5deg)} 100%{transform:scale(1) rotate(0)} }
.result-winner { font-size: 2rem; font-weight: 900; }
.result-score  {
  font-size: 3.5rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.result-motm { text-align: center; }
.result-motm h4 { font-size: 1rem; margin-bottom: 10px; color: var(--gold); }
.result-reason { color: var(--text2); font-size: 0.9rem; text-align: center; max-width: 320px; }

.result-ratings-box { width: 100%; max-width: 400px; }
.result-ratings-box h4 { font-size: 1rem; font-weight: 900; margin-bottom: 12px; }
.rating-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.rtab {
  flex: 1; padding: 8px; border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text2); font-family: 'Cairo', sans-serif; font-size: 0.85rem;
  transition: all 0.2s;
}
.rtab.active { background: rgba(245,166,35,0.2); border-color: var(--gold); color: var(--gold); }
.ratings-list { display: flex; flex-direction: column; gap: 8px; }
.rating-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 10px 14px;
  font-size: 0.85rem;
}
.rating-emoji { font-size: 1.2rem; }
.rating-name  { flex: 1; font-weight: 700; }
.rating-pos   { color: var(--text2); font-size: 0.75rem; }
.rating-stars { font-weight: 900; }

.result-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.result-btns .btn-play { max-width: 180px; font-size: 1rem; padding: 14px 20px; }

/* ── Settings Screen ─────────────────────────────────────── */
.settings-content { padding: 20px; display: flex; flex-direction: column; gap: 16px; width: 100%; }
.settings-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 20px;
}
.settings-group h3 { font-size: 1rem; margin-bottom: 12px; color: var(--text2); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.settings-row:last-child { border-bottom: none; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { display: none; }
.toggle-knob {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 99px; cursor: pointer;
  transition: background 0.3s;
}
.toggle-knob::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.3s;
}
.toggle input:checked + .toggle-knob { background: var(--green); }
.toggle input:checked + .toggle-knob::before { transform: translateX(20px); }

/* ── Toasts ──────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 50%;
  transform: translateX(50%);
  z-index: 9998; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 24px;
  border-radius: 14px; font-size: 0.9rem; font-weight: 700;
  opacity: 0; transform: translateY(12px);
  transition: all 0.35s;
  max-width: 320px; text-align: center;
  pointer-events: auto;
  backdrop-filter: blur(8px);
}
.toast-show { opacity: 1; transform: none; }
.toast-info    { background: rgba(79,172,254,0.9); color: #000; }
.toast-success { background: rgba(0,214,143,0.9); color: #000; }
.toast-warning { background: rgba(245,166,35,0.9); color: #000; }
.toast-error   { background: rgba(233,69,96,0.9); color: #fff; }

/* ── Howto ───────────────────────────────────────────────── */
.howto-steps { display: flex; flex-direction: column; gap: 14px; text-align: right; }
.howto-step  { display: flex; gap: 14px; align-items: flex-start; }
.step-num    {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #000; font-weight: 900; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.howto-step div { font-size: 0.88rem; color: var(--text); line-height: 1.5; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 380px) {
  .auction-cards-row { flex-direction: column; align-items: center; }
  .auction-card      { max-width: 100%; width: 100%; }
  .review-content    { flex-direction: column; }
  .review-vs-col     { display: none; }
}
@media (min-width: 768px) {
  body { max-width: 480px; margin: 0 auto; }
  .screen { left: 50%; right: auto; transform: translateX(-50%); width: 480px; }
  #particles-canvas { left: 50%; transform: translateX(-50%); width: 480px; }
  #toast-container  { right: calc(50% - 240px); transform: none; }
}

/* ── GUESS MODE STYLES ───────────────────────────────────── */
.mode-options { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.mode-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s ease; }
.mode-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); border-color: var(--accent); }
.mode-icon { font-size: 2.5rem; margin-bottom: 8px; }
.mode-card h3 { color: var(--gold); margin: 0 0 4px; }
.mode-card p { font-size: 0.85rem; color: var(--text2); margin: 0; }

.guess-interstitial-content { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 24px; gap: 16px; }
.interstitial-icon { font-size: 4rem; animation: pulse 2s infinite; }
.guess-top { flex-direction: column; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.4); border-bottom: 1px solid rgba(255,255,255,0.05); }
.guess-top .screen-sub { font-size: 0.85rem; color: var(--gold); margin-top: 4px; }
.guess-board-actions { display: flex; gap: 8px; margin-top: 8px; }
.guess-my-secret-bar { background: rgba(255,255,255,0.03); padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.secret-name { font-weight: 700; color: var(--accent); }

.guess-grid-container { flex: 1; overflow-y: auto; padding: 12px; }
.guess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); gap: 8px; }

/* Guess Card */
.gc-card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  padding: 8px 4px;
}
.gc-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.3); }
.gc-card.crossed { opacity: 0.4; filter: grayscale(100%); pointer-events: none; }
/* Re-enable pointer events for crossed cards so they can be un-crossed */
.guess-grid-container .gc-card.crossed { pointer-events: auto; }
.gc-card.crossed::after {
  content: '❌';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  pointer-events: none;
}
.gc-pic {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    margin: 0 auto 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
.gc-card:hover .gc-pic { transform: scale(1.1); }
.gc-pic img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.gc-name { font-size: 0.7rem; font-weight: 700; line-height: 1.2; height: 1.4rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gc-club { font-size: 0.6rem; color: var(--text2); margin-top: 2px; }
.gc-nat { font-size: 0.6rem; color: var(--text2); }

.guess-secrets-reveal { display: flex; justify-content: space-around; width: 100%; margin: 24px 0; gap: 16px; }
.gs-card { background: rgba(0,0,0,0.3); padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); width: 45%; }
.gs-card h5 { margin: 0 0 8px; color: var(--text2); font-size: 0.8rem; }

/* ── Auth Screen ─────────────────────────────────────────── */
.auth-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; width: 100%; max-width: 400px; margin: 0 auto; padding: 24px;
}
.auth-header {
  text-align: center; margin-bottom: 32px;
}
.auth-header .hero-ball {
  font-size: 3rem; margin-bottom: 12px;
}
.auth-header h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
.auth-header p { color: var(--text2); font-size: 0.9rem; }

.auth-form {
  width: 100%; display: flex; flex-direction: column; gap: 16px;
  background: var(--bg2); padding: 24px; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.auth-switch { text-align: center; font-size: 0.85rem; margin-top: 8px; color: var(--text2); }
.auth-switch a { color: var(--gold); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.auth-switch a:hover { color: #fff; }

.auth-divider {
  width: 100%; text-align: center; border-bottom: 1px solid var(--border);
  line-height: 0.1em; margin: 32px 0 24px;
}
.auth-divider span {
  background: var(--bg); padding: 0 16px; color: var(--text2); font-size: 0.9rem;
}
