/* ============================================================
   Color Game — GM & Admin Panel Styles
   ============================================================ */

/* ---- Layout ---- */
.panel-body { background: #0f172a; min-height: 100vh; }

.panel-nav {
  background: #1e293b; border-bottom: 1px solid #334155;
  padding: .75rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1.1rem; font-weight: 900; color: #f1f5f9; }
.nav-right  { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.nav-link   { font-size: .9rem; color: #94a3b8; font-weight: 600; }
.nav-link:hover { color: #f1f5f9; text-decoration: none; }
.nav-user   { font-size: .9rem; color: #e2e8f0; font-weight: 700; display: flex; align-items: center; gap: .4rem; }

.panel-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-title { font-size: 1.75rem; font-weight: 900; color: #f1f5f9; margin-bottom: 1.25rem; }

/* ---- Cards ---- */
.card { background: #1e293b; border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; border: 1px solid #334155; }
.card-title { font-size: 1rem; font-weight: 800; color: #e2e8f0; margin-bottom: 1rem; }
.text-muted { color: #64748b; font-size: .9rem; }

/* ---- Auth Pages ---- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-card { background: #1e293b; border-radius: 20px; padding: 2rem; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.5); border: 1px solid #334155; }
.auth-logo  { font-size: 2.5rem; text-align: center; margin-bottom: .5rem; }
.auth-title { text-align: center; font-size: 1.4rem; font-weight: 900; color: #f1f5f9; margin-bottom: 1.25rem; }
.auth-link  { text-align: center; font-size: .85rem; color: #64748b; margin-top: .75rem; }

/* ---- Stats Grid ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card  { background: #1e293b; border-radius: 14px; padding: 1.25rem; text-align: center; border: 1px solid #334155; }
.stat-num   { font-size: 2.25rem; font-weight: 900; color: #818cf8; }
.stat-label { font-size: .8rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; margin-top: .25rem; }

/* ---- Inline form ---- */
.inline-form .form-row { align-items: flex-end; }
.pkg-form { max-width: 600px; }

/* ---- Room Layout ---- */
.room-header-bar {
  background: #1e293b; border-radius: 14px; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; border: 1px solid #334155;
}
.room-code-display { display: flex; align-items: center; gap: .75rem; }
.room-code-label   { font-size: .75rem; color: #94a3b8; text-transform: uppercase; font-weight: 700; }
.room-code-val     { font-size: 2rem; font-weight: 900; color: #818cf8; letter-spacing: .2em; font-family: monospace; }
.room-meta         { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.room-meta span    { font-size: .85rem; font-weight: 700; color: #94a3b8; background: #0f172a; padding: .3rem .75rem; border-radius: 20px; }

.room-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.25rem; }
@media (max-width: 768px) { .room-layout { grid-template-columns: 1fr; } }

/* ---- GM Controls ---- */
.control-group { margin-bottom: 1rem; }
.control-group label { display: block; font-size: .8rem; color: #94a3b8; margin-bottom: .35rem; font-weight: 700; text-transform: uppercase; }
.control-group input[type=number] { width: 100%; padding: .65rem .9rem; background: #0f172a; border: 2px solid #334155; border-radius: 8px; color: #f1f5f9; font-family: inherit; font-size: 1rem; margin-bottom: .75rem; }
.control-group input:focus { outline: none; border-color: #6366f1; }
.hint-text { color: #94a3b8; font-size: .85rem; margin-bottom: .75rem; }

.gm-timer-display { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.gm-timer { font-size: 2rem; font-weight: 900; color: #22c55e; font-family: monospace; }
.gm-timer.red { color: #ef4444; }

/* ---- Players List ---- */
.players-list { display: flex; flex-direction: column; gap: .5rem; }
.player-row {
  background: #0f172a; border-radius: 8px; padding: .65rem 1rem;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .5rem; border: 1px solid #334155;
}
.player-row-left { flex: 1; }
.player-name   { font-weight: 700; font-size: .9rem; }
.player-bal    { font-size: .8rem; color: #94a3b8; }
.player-bets   { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.player-bet-tag { font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 20px; color: #fff; }

/* ---- Dice Result GM ---- */
.dice-result-gm { display: flex; gap: .75rem; justify-content: center; margin: .75rem 0; }
.die-gm { width: 70px; height: 70px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 900; color: #fff; text-align: center; border: 3px solid rgba(255,255,255,.2); animation: dieSpin .5s ease; }

/* ---- Round Summary ---- */
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid #334155; font-size: .85rem; }
.summary-win  { color: #22c55e; font-weight: 700; }
.summary-loss { color: #ef4444; font-weight: 700; }

@keyframes dieSpin {
  0%   { transform: rotateY(0); }
  50%  { transform: rotateY(90deg); opacity: .5; }
  100% { transform: rotateY(0); }
}
