/* ==========================================================================
   天天天天脑洞大开 — Design System
   Based on 天天天天 VI Color Palette
   Primary: #00AFEC (Sky Blue) | Secondary: #00B3C4 (Teal)
   ========================================================================== */

/* ===== CSS Variables — Brand VI ===== */
:root {
  /* Brand Primary */
  --brand: #00AFEC;
  --brand-dark: #0090C8;
  --brand-light: #E8F7FE;
  --brand-gradient: linear-gradient(135deg, #00AFEC 0%, #00B3C4 100%);

  /* VI Auxiliary Colors */
  --vi-teal: #00B3C4;
  --vi-green: #56B879;
  --vi-gold: #FAC03D;
  --vi-coral: #EF845C;
  --vi-pink: #EB6EA5;
  --vi-purple: #6E60A8;

  /* VI Soft Palette */
  --soft-peach: #FBDAC8;
  --soft-mint: #CAE5CD;
  --soft-cream: #FEEBBE;
  --soft-lavender: #C7C0DF;

  /* Neutrals */
  --bg: #F8FBFE;
  --bg-warm: #FFFCF8;
  --text: #1A3044;
  --text-light: #6B8299;
  --text-muted: #9BAFBF;
  --border: #E2EBF0;
  --border-light: #EFF4F8;
  --white: #FFFFFF;

  /* Shadows — layered for depth */
  --shadow-xs: 0 1px 3px rgba(0, 50, 80, 0.04);
  --shadow: 0 2px 8px rgba(0, 50, 80, 0.06), 0 1px 2px rgba(0, 50, 80, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 50, 80, 0.08), 0 2px 4px rgba(0, 50, 80, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 50, 80, 0.10), 0 4px 8px rgba(0, 50, 80, 0.04);

  /* Grade Colors — derived from VI palette */
  --grade3: #56B879;
  --grade3-light: #E8F5EC;
  --grade4: #00AFEC;
  --grade4-light: #E8F7FE;
  --grade5: #6E60A8;
  --grade5-light: #EEEAF5;
  --grade6: #EF845C;
  --grade6-light: #FEF0EA;

  /* Radii */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-full: 9999px;

  /* Typography */
  --font: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

input, textarea {
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--brand);
  color: var(--white);
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

/* ===== Logo ===== */
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-img-sm { height: 32px; }
.logo-img-lg { height: 80px; }
.logo-img-xl { height: 120px; }

/* ===== Login Page ===== */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  padding: 20px;
  background: linear-gradient(160deg, var(--bg) 0%, #E8F7FE 40%, #F0FAF2 70%, var(--bg) 100%);
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-brand .logo-img {
  margin: 0 auto 16px;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.login-brand .subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

.login-form {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  border: 1px solid var(--border-light);
}

.login-form h2 {
  font-size: 1.2rem;
  margin-bottom: 22px;
  text-align: center;
  color: var(--text);
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
  background: var(--bg);
}

.form-group input:focus {
  border-color: var(--brand);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 175, 236, 0.1);
}

.form-error {
  color: var(--vi-coral);
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 1.2em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  gap: 6px;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  width: 100%;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 175, 236, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(0, 175, 236, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.btn-sm { padding: 6px 14px; font-size: 0.85rem; border-radius: var(--radius-xs); }

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}

.btn-ghost:hover { color: var(--brand); background: var(--brand-light); }

.login-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.login-switch a {
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}

/* ===== Top Bar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--border-light);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  display: none; /* hidden when logo present */
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Home Page ===== */
.home-header {
  text-align: center;
  padding: 20px 0 10px;
}

.home-header h2 {
  font-size: 1.15rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 6px;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .grade-grid { grid-template-columns: 1fr; gap: 12px; }
}

.grade-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.grade-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.grade-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
}

.grade-card[data-grade="3"] { border-left-color: var(--grade3); }
.grade-card[data-grade="3"]::after { background: var(--grade3); }
.grade-card[data-grade="3"]:hover { background: var(--grade3-light); }

.grade-card[data-grade="4"] { border-left-color: var(--grade4); }
.grade-card[data-grade="4"]::after { background: var(--grade4); }
.grade-card[data-grade="4"]:hover { background: var(--grade4-light); }

.grade-card[data-grade="5"] { border-left-color: var(--grade5); }
.grade-card[data-grade="5"]::after { background: var(--grade5); }
.grade-card[data-grade="5"]:hover { background: var(--grade5-light); }

.grade-card[data-grade="6"] { border-left-color: var(--grade6); }
.grade-card[data-grade="6"]::after { background: var(--grade6); }
.grade-card[data-grade="6"]:hover { background: var(--grade6-light); }

.grade-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}

.grade-card .grade-alias {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.progress-bar {
  height: 5px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.grade-card[data-grade="3"] .progress-bar-fill { background: var(--grade3); }
.grade-card[data-grade="4"] .progress-bar-fill { background: var(--grade4); }
.grade-card[data-grade="5"] .progress-bar-fill { background: var(--grade5); }
.grade-card[data-grade="6"] .progress-bar-fill { background: var(--grade6); }

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ===== Game List Page ===== */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1;
  color: var(--text);
}

.search-wrap { position: relative; }

.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--white);
  margin-bottom: 16px;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 175, 236, 0.08);
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-card {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--transition);
  gap: 14px;
}

.game-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
  border-color: var(--border);
}

.game-card.played { opacity: 0.55; }

.game-card-num {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  flex-shrink: 0;
}

.grade-3 .game-card-num { background: var(--grade3); }
.grade-4 .game-card-num { background: var(--grade4); }
.grade-5 .game-card-num { background: var(--grade5); }
.grade-6 .game-card-num { background: var(--grade6); }

.game-card-info { flex: 1; min-width: 0; }

.game-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.game-card-tags {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.game-card-stars {
  font-size: 0.8rem;
  color: var(--vi-gold);
  flex-shrink: 0;
}

.game-card-check {
  color: var(--vi-green);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== Game Page ===== */
.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-light);
}

.game-topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
  color: var(--text);
}

.game-setup {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  padding: 36px 28px;
  text-align: center;
  max-width: 420px;
  margin: 40px auto;
}

.game-setup h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.game-setup p {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.player-slider {
  width: 100%;
  margin: 16px 0;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--soft-mint), var(--brand), var(--vi-teal));
  outline: none;
}

.player-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--brand);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 175, 236, 0.3);
  transition: all var(--transition);
}

.player-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 2px 12px rgba(0, 175, 236, 0.45);
  transform: scale(1.1);
}

.player-count-display {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0;
}

/* ===== Tool Area ===== */
.tool-area {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  padding: 20px;
  margin-bottom: 14px;
}

/* ===== Collapsible Sections ===== */
.collapsible {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
  transition: background var(--transition);
  color: var(--text);
}

.collapsible-header:hover { background: var(--bg); }

.collapsible-header .arrow {
  transition: transform var(--transition);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.collapsible.open .collapsible-header .arrow {
  transform: rotate(90deg);
}

.collapsible-body {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}

.collapsible.open .collapsible-body {
  max-height: 3000px;
  padding: 0 16px 16px;
}

.collapsible-body p,
.collapsible-body li {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
}

.collapsible-body ul, .collapsible-body ol { padding-left: 20px; }
.collapsible-body li { margin-bottom: 4px; }

.lock-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 6px;
}

/* ===== Game Bottom Bar ===== */
.game-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-top: 10px;
  border-top: 1.5px solid var(--border-light);
  gap: 12px;
}

.btn-played {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.btn-played:hover { border-color: var(--vi-green); color: var(--vi-green); }

.btn-played.active {
  background: var(--grade3-light);
  border-color: var(--vi-green);
  color: var(--vi-green);
}

.btn-next {
  background: var(--brand-gradient);
  color: var(--white);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 175, 236, 0.2);
}

.btn-next:hover {
  box-shadow: 0 4px 12px rgba(0, 175, 236, 0.3);
  transform: translateY(-1px);
}

/* ===== Timer Component ===== */
.timer-display { text-align: center; padding: 24px 20px; }

.timer-time {
  font-size: 3.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 12px 0;
  letter-spacing: 2px;
}

.timer-time.warning { color: var(--vi-coral); }
.timer-time.hidden-countdown { font-size: 1.3rem; color: var(--text-light); letter-spacing: 1px; }

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.timer-btn {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.timer-btn-start {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(0, 175, 236, 0.25);
}
.timer-btn-start:hover { box-shadow: 0 4px 12px rgba(0, 175, 236, 0.35); }
.timer-btn-pause { background: var(--soft-cream); color: #92400E; }
.timer-btn-reset { background: var(--border-light); color: var(--text-light); }
.timer-btn-reset:hover { background: var(--border); }

/* ===== Card Drawer Component ===== */
.card-drawer { text-align: center; padding: 12px 0; }

.card-drawer-decks {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-deck-slot { perspective: 600px; }

.card-deck-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-face {
  width: 180px;
  min-height: 120px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-size: 1rem;
  line-height: 1.5;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
  position: relative;
}

.card-face.flipping { animation: cardFlip 0.5s ease; }

@keyframes cardFlip {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(90deg) scale(0.95); }
  100% { transform: rotateY(0deg) scale(1); }
}

.card-face-front {
  background: var(--white);
  border: 2px solid var(--brand);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.card-face-back {
  background: var(--brand-gradient);
  color: var(--white);
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
}

.card-combo-symbol {
  font-size: 1.4rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  padding-top: 30px;
  font-weight: 300;
}

.card-drawer-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-drawer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ===== Secret Assigner Component ===== */
.secret-assigner { padding: 12px 0; }

.secret-full-table {
  background: var(--soft-cream);
  border: 1px solid #F5E6B8;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  line-height: 1.9;
}

.secret-full-table .spy-mark {
  background: var(--vi-coral);
  color: var(--white);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  margin-left: 4px;
  font-weight: 600;
}

.secret-full-table .blank-mark {
  background: var(--text);
  color: var(--white);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  margin-left: 4px;
  font-weight: 600;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.seat-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 2px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seat-btn:hover { border-color: var(--brand); box-shadow: var(--shadow-xs); }

.seat-btn.revealing {
  background: var(--brand-gradient);
  color: var(--white);
  border-color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===== Reveal Voter Component ===== */
.reveal-voter { padding: 12px 0; }

.reveal-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.reveal-input-group { display: flex; flex-direction: column; gap: 4px; }

.reveal-input-group label { font-size: 0.78rem; color: var(--text-muted); }

.reveal-input-group input {
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.reveal-input-group input:focus { border-color: var(--brand); }

.reveal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.reveal-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.reveal-card .seat-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.reveal-card .answer { font-size: 1.05rem; font-weight: 700; }

.reveal-card.hidden .answer {
  color: transparent;
  background: var(--border-light);
  border-radius: var(--radius-xs);
  min-width: 60px;
  min-height: 24px;
}

.reveal-card.revealed {
  border-color: var(--brand);
  background: var(--brand-light);
}

.signal-display { text-align: center; padding: 36px 20px; }

.signal-count {
  font-size: 6rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.signal-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 12px;
}

.vote-options {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.vote-option {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.vote-option-label { font-weight: 600; margin-bottom: 8px; }

.vote-option input {
  width: 60px;
  padding: 6px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 1.2rem;
  font-weight: 700;
  outline: none;
}

.vote-result-bar {
  display: flex;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 16px 0;
}

.vote-result-side {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--white);
  font-size: 0.85rem;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 30px;
}

.vote-result-side:first-child { background: var(--brand); }
.vote-result-side:last-child { background: var(--vi-purple); }

/* ===== Public Screen Mode ===== */
.public-screen { background: var(--white); }
.public-screen .collapsible.teacher-only { display: none; }
.public-screen .game-topbar-title { font-size: 1.8rem; }
.public-screen .tool-area { padding: 32px; }
.public-screen .timer-time { font-size: 5.5rem; }
.public-screen .card-face { width: 260px; min-height: 170px; font-size: 1.35rem; }
.public-screen .collapsible-header { font-size: 1.15rem; padding: 16px 20px; }
.public-screen .collapsible-body p,
.public-screen .collapsible-body li { font-size: 1.1rem; }
.public-screen .signal-count { font-size: 10rem; }
.public-screen .signal-text { font-size: 2.4rem; }
.public-screen .seat-btn { font-size: 1.4rem; }
.public-screen .reveal-card .answer { font-size: 1.5rem; }

/* ===== Footer ===== */
.app-footer {
  text-align: center;
  padding: 24px 0 16px;
  margin-top: 32px;
  border-top: 1px solid var(--border-light);
}

.app-footer .logo-img {
  margin: 0 auto 8px;
  opacity: 0.6;
}

.app-footer p {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  #app { padding: 12px; }
  .login-brand h1 { font-size: 1.6rem; }
  .game-topbar-title { font-size: 1rem; }
  .timer-time { font-size: 2.8rem; }
  .card-face { width: 140px; min-height: 95px; font-size: 0.88rem; }
  .game-card { padding: 10px 12px; }
  .reveal-inputs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .logo-img { height: 36px; }
  .logo-img-lg { height: 64px; }
  .logo-img-xl { height: 90px; }
}

@media (min-width: 1024px) {
  #app { padding: 24px 32px; }
  .login-brand h1 { font-size: 2.4rem; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

.fade-in { animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

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

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.flash { animation: flash 0.5s ease 3; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
