/* ==========================================================================
   game-center.css — OECTA Game Center & Staff Room Lounge Styles
   OECTA Design System: #204164 Navy, #f39c12 Amber, Inter + Manrope
   "No-Line" Rule: Tonal elevation shifts instead of 1px borders
   ========================================================================== */

.gc-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 20px 48px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
}

/* ── Hero / Header Zone ─────────────────────────────────────────────────── */
.gc-hero-card {
  background: linear-gradient(135deg, #204164 0%, #152b42 100%);
  border-radius: 16px;
  padding: 24px 28px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px -5px rgba(32, 65, 100, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.gc-hero-left {
  flex: 1;
  min-width: 280px;
}

.gc-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 165, 32, 0.2);
  color: #fea520;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gc-hero-title {
  margin: 0 0 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gc-hero-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ── The School Clock ───────────────────────────────────────────────────── */
.gc-clock-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 260px;
}

.gc-clock-dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15), 0 3px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  flex-shrink: 0;
}

.gc-clock-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #204164;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.gc-clock-hand-hour,
.gc-clock-hand-min,
.gc-clock-hand-sec {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  border-radius: 3px;
}

.gc-clock-hand-hour {
  width: 3px;
  height: 18px;
  background: #1e293b;
  z-index: 2;
  margin-left: -1.5px;
}

.gc-clock-hand-min {
  width: 2px;
  height: 24px;
  background: #204164;
  z-index: 3;
  margin-left: -1px;
}

.gc-clock-hand-sec {
  width: 1px;
  height: 26px;
  background: #ef4444;
  z-index: 4;
  margin-left: -0.5px;
}

.gc-clock-bell-marker {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f39c12;
}

.gc-clock-info {
  display: flex;
  flex-direction: column;
}

.gc-clock-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fea520;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.gc-clock-next {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.gc-clock-countdown {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Live Unit Dispatch Rail ────────────────────────────────────────────── */
.gc-dispatch-rail {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(32, 65, 100, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.gc-dispatch-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.gc-dispatch-text {
  font-size: 0.88rem;
  color: #334155;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-dispatch-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #204164;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── Nav Tabs & Mode Switcher ───────────────────────────────────────────── */
.gc-mode-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
  overflow-x: auto;
}

.gc-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  background: transparent;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.gc-tab-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.gc-tab-btn--active {
  background: #204164;
  color: #ffffff;
}

.gc-tab-btn--active:hover {
  background: #1b3754;
  color: #ffffff;
}

/* ── Attempt Tracker Pips ───────────────────────────────────────────────── */
.gc-attempts-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(32, 65, 100, 0.04);
}

.gc-attempts-pips {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gc-attempt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
}

.gc-attempt-chip--active {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.gc-attempt-chip--done {
  background: #dcfce7;
  color: #15803d;
}

/* ── Game Canvas Stage ──────────────────────────────────────────────────── */
.gc-stage {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(32, 65, 100, 0.05);
  margin-bottom: 24px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Wordle Component ───────────────────────────────────────────────────── */
.gc-wordle-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 8px;
  margin: 16px 0 24px;
  width: 100%;
  max-width: 320px;
}

.gc-wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.gc-wordle-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
  border-radius: 8px;
  user-select: none;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.gc-wordle-cell--filled {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #cbd5e1;
  color: #0f172a;
}

.gc-wordle-cell--correct {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: rotateX(360deg);
}

.gc-wordle-cell--present {
  background: #f39c12 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: rotateX(360deg);
}

.gc-wordle-cell--absent {
  background: #64748b !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: rotateX(360deg);
}

/* Wordle Keyboard */
.gc-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 480px;
  user-select: none;
}

.gc-kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.gc-key {
  height: 48px;
  min-width: 32px;
  flex: 1;
  background: #f1f5f9;
  color: #1e293b;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.gc-key:active {
  background: #cbd5e1;
}

.gc-key--wide {
  flex: 1.5;
  font-size: 0.8rem;
}

.gc-key--correct { background: #16a34a; color: #fff; }
.gc-key--present { background: #f39c12; color: #fff; }
.gc-key--absent  { background: #94a3b8; color: #fff; opacity: 0.6; }

/* ── Sudoku Component ───────────────────────────────────────────────────── */
.gc-sudoku-board {
  display: grid;
  gap: 4px;
  margin: 16px 0 20px;
  background: #e2e8f0;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.gc-sudoku-board--6x6 {
  grid-template-columns: repeat(6, 1fr);
  max-width: 360px;
  width: 100%;
}

.gc-sudoku-board--9x9 {
  grid-template-columns: repeat(9, 1fr);
  max-width: 460px;
  width: 100%;
}

.gc-sudoku-cell {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.gc-sudoku-cell--given {
  color: #204164;
  font-weight: 900;
}

.gc-sudoku-cell--alt-block {
  background: #f8fafc;
}

.gc-sudoku-cell--selected {
  background: #fed7aa !important;
}

.gc-sudoku-cell--highlight {
  background: #e0f2fe;
}

.gc-sudoku-cell--error {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.gc-sudoku-pad {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 460px;
  width: 100%;
  margin-top: 10px;
}

.gc-num-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f1f5f9;
  border: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: #204164;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gc-num-btn:hover { background: #e2e8f0; }
.gc-num-btn:active { background: #cbd5e1; }

/* ── Yahtzee Component ──────────────────────────────────────────────────── */
.gc-yahtzee-wrap {
  width: 100%;
  max-width: 580px;
}

.gc-dice-tray {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 18px 0 24px;
}

.gc-die {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.gc-die--held {
  background: #dbeafe;
  box-shadow: 0 0 0 3px #204164;
  transform: translateY(-8px);
}

.gc-yahtzee-scoresheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.gc-score-row {
  background: #f8fafc;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.gc-score-row:hover { background: #f1f5f9; }

.gc-score-cell {
  padding: 10px 14px;
  font-size: 0.88rem;
}

.gc-score-cell--val {
  text-align: right;
  font-weight: 800;
  font-family: monospace;
  font-size: 1rem;
}

/* ── Victory & Debrief Card (The Trojan Horse) ──────────────────────────── */
.gc-debrief-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(32, 65, 100, 0.08);
  margin-top: 20px;
  width: 100%;
  max-width: 580px;
  animation: gcSlideUp 0.4s ease;
}

@keyframes gcSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.gc-debrief-header {
  text-align: center;
  margin-bottom: 20px;
}

.gc-debrief-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 6px;
}

.gc-rights-box {
  background: #f0fdf4;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.gc-rights-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.gc-rights-text {
  font-size: 0.86rem;
  color: #166534;
  line-height: 1.45;
  margin: 0;
}

/* ── Leaderboard Table ──────────────────────────────────────────────────── */
.gc-leaderboard-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 18px rgba(32, 65, 100, 0.05);
}

.gc-lb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.gc-lb-th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 2px solid #e2e8f0;
}

.gc-lb-td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.gc-lb-rank {
  font-weight: 900;
  width: 36px;
  color: #204164;
}

.gc-lb-school {
  font-weight: 700;
  color: #1e293b;
}

.gc-lb-score {
  font-weight: 800;
  text-align: right;
  font-family: monospace;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .gc-hero-card { padding: 18px 20px; }
  .gc-clock-card { width: 100%; }
  .gc-wordle-cell { font-size: 1.25rem; }
  .gc-key { height: 44px; font-size: 0.82rem; }
}
