/* =====================================================
   1. TRIVIA LOBBY SHELL
===================================================== */

.trivia-lobby{
  max-width:860px;
  margin:0 auto 28px;
}

.trivia-lobby.hide{
  display:none;
}

.lobby-card{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  padding:34px;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217,173,66,.22), transparent 42%),
    rgba(255,255,255,.86);
  border:1px solid rgba(217,173,66,.55);
  box-shadow:0 22px 60px rgba(38,23,4,.1);
}

.lobby-card::before{
  content:"";
  position:absolute;
  inset:12px;
  z-index:-1;
  border-radius:22px;
  border:1px solid rgba(15,61,42,.08);
  pointer-events:none;
}




/* =====================================================
   2. LOBBY HEADER
===================================================== */

.lobby-header{
  max-width:680px;
  margin:0 auto 26px;
  text-align:center;
}

.lobby-kicker{
  margin:0 0 10px;
  color:#9b742b;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.lobby-header h2{
  margin:0;
  color:#0f3d2a;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(2.2rem, 5vw, 3.6rem);
  line-height:.95;
}

.lobby-header p{
  max-width:560px;
  margin:14px auto 0;
  color:#5d665f;
  line-height:1.65;
}


/* =====================================================
   3. PLAYER PROFILE
===================================================== */

.lobby-profile{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:16px;
  padding:16px;
  border-radius:24px;
  background:#fff8e8;
  border:1px solid rgba(217,173,66,.45);
}

.player-photo{
  width:58px;
  height:58px;
  border-radius:999px;
  overflow:hidden;
  background:#fff;
  border:2px solid rgba(15,61,42,.15);
  box-shadow:0 10px 22px rgba(15,61,42,.08);
}

.player-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.player-info h3{
  margin:0;
  color:#0f3d2a;
  font-size:1.08rem;
  font-weight:900;
}

.player-info p{
  margin:4px 0 0;
  color:#5d665f;
  font-size:.86rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#googleLoginBtn,
#logoutBtn,
#enterTriviaBtn{
  border:0;
  border-radius:999px;
  padding:13px 22px;
  font-weight:900;
  cursor:pointer;
}

#googleLoginBtn{
  background:#0f3d2a;
  color:#fff8e8;
  box-shadow:0 12px 26px rgba(15,61,42,.18);
}

#logoutBtn{
  background:#ffe0dc;
  color:#b3261e;
}

.hide{
  display:none !important;
}


/* =====================================================
   4. STATS GRID
===================================================== */

.lobby-stats,
.todays-round,
.online-players{
  margin-top:22px;
  padding:22px;
  border-radius:24px;
  background:rgba(255,248,232,.68);
  border:1px solid rgba(217,173,66,.38);
}

.lobby-stats h3,
.todays-round h3,
.online-players h3{
  margin:0 0 16px;
  color:#0f3d2a;
  font-family:Georgia, "Times New Roman", serif;
  font-size:1.45rem;
  line-height:1;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(6, 1fr);
  gap:10px;
}

.stat{
  padding:14px 10px;
  border-radius:18px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(15,61,42,.1);
  text-align:center;
}

.stat span{
  display:block;
  color:#0f3d2a;
  font-size:1.35rem;
  font-weight:900;
}

.stat label{
  display:block;
  margin-top:4px;
  color:#5d665f;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}


/* =====================================================
   5. ROUND INFO
===================================================== */

.todays-round ul{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}

.todays-round li{
  padding:12px;
  border-radius:16px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(15,61,42,.1);
  color:#0f3d2a;
  font-size:.82rem;
  font-weight:900;
  text-align:center;
}





/* =====================================================
   7. ENTER BUTTON
===================================================== */

#enterTriviaBtn{
  width:100%;
  margin-top:24px;
  min-height:54px;
  background:linear-gradient(135deg, #0f3d2a, #245b3f);
  color:#fff8e8;
  box-shadow:0 16px 34px rgba(15,61,42,.2);
}

#enterTriviaBtn:disabled{
  opacity:.42;
  cursor:not-allowed;
  filter:grayscale(.35);
}


/* =====================================================
   8. STATS WIPED NOTICE
===================================================== */

.stats-wiped-notice{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(5,15,10,.76);
  backdrop-filter:blur(8px);
}

.stats-wiped-card{
  width:min(520px, 100%);
  padding:34px 28px;
  border-radius:28px;
  text-align:center;
  background:
    radial-gradient(circle at top, rgba(217,173,66,.28), transparent 42%),
    linear-gradient(180deg, #fff8e8, #f4e2bb);
  border:1px solid rgba(217,173,66,.5);
  box-shadow:0 28px 90px rgba(0,0,0,.38);
  color:#0f3d2a;
}

.stats-wiped-card img{
  width:74px;
  height:74px;
  object-fit:contain;
  margin-bottom:14px;
  border-radius:20px;
}

.stats-wiped-kicker{
  margin:0 0 8px;
  color:#9b742b;
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.stats-wiped-card h1{
  margin:0 0 12px;
  color:#0f3d2a;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(2rem, 5vw, 3rem);
  line-height:.95;
}

.stats-wiped-card p{
  max-width:420px;
  margin:0 auto 18px;
  color:#26382d;
  font-size:1rem;
  line-height:1.65;
  font-weight:700;
}

.stats-wiped-reset-box{
  max-width:300px;
  margin:18px auto 22px;
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(155,116,43,.22);
}

.stats-wiped-reset-box span{
  display:block;
  margin-bottom:4px;
  color:#9b742b;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.stats-wiped-reset-box strong{
  display:block;
  color:#0f3d2a;
  font-size:1.2rem;
  font-weight:950;
}

#acknowledgeStatsWipeBtn{
  min-height:46px;
  padding:12px 22px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#0f3d2a,#245b3f);
  color:#fff8e8;
  font-weight:950;
  cursor:pointer;
}


/* =====================================================
   9. MOBILE
===================================================== */

@media(max-width:760px){

  .trivia-lobby{
    margin-bottom:24px;
  }

  .lobby-card{
    padding:24px 18px;
    border-radius:24px;
  }

  .lobby-card::before{
    display:none;
  }

  .lobby-profile{
    grid-template-columns:1fr;
    text-align:center;
    justify-items:center;
  }

  .player-info{
    width:100%;
  }

  #googleLoginBtn,
  #logoutBtn,
  #enterTriviaBtn{
    width:100%;
  }

  .stats-grid{
    grid-template-columns:repeat(2, 1fr);
  }

  .todays-round ul{
    grid-template-columns:1fr;
  }

  .online-players h3{
    align-items:flex-start;
  }
}