:root {
  /* Common Brand Colors from playsavvy.live */
  --savvy-blue: #1F91F6;
  --savvy-blue-dark: #046BD2;
  --savvy-blue-light: rgba(31, 145, 246, 0.12);
  --savvy-blue-glow: rgba(31, 145, 246, 0.35);
  
  --accent-textchain: #1F91F6;
  --accent-textchain-bg: rgba(31, 145, 246, 0.12);
  --accent-subtext: #06B6D4;
  --accent-subtext-bg: rgba(6, 182, 212, 0.12);
  
  --tile-green: #00D084;
  --tile-yellow: #EAB308;
  
  --gold: #F59E0B;
  --silver: #94A3B8;
  --bronze: #D97706;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 30px;
  --radius-full: 9999px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Dark Theme (Dark Gray Palette) */
body.dark-theme, :root:not(.light-theme) {
  --bg-main: #141518;
  --bg-header: rgba(20, 21, 24, 0.92);
  --bg-card: #1F2024;
  --bg-card-hover: #26272C;
  --bg-surface: #2B2C32;
  --bg-surface-hover: #35363E;
  --bg-input: #18191D;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(31, 145, 246, 0.45);
  
  --text-primary: #F4F4F6;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  
  --tile-grey: #52525B;
  --modal-bg: #1F2024;
  --modal-backdrop: rgba(0, 0, 0, 0.75);
  --glow-opacity: 0.06;
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.55);
  --tz-banner-bg: rgba(27, 28, 33, 0.85);
}

/* Light Theme (Light Gray Palette) */
body.light-theme {
  --bg-main: #ECEEF2;
  --bg-header: rgba(236, 238, 242, 0.94);
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFBFC;
  --bg-surface: #DEE2E8;
  --bg-surface-hover: #D3D8E0;
  --bg-input: #FFFFFF;
  --border-color: #D2D6DC;
  --border-highlight: rgba(31, 145, 246, 0.45);
  
  --text-primary: #18191D;
  --text-secondary: #4B515D;
  --text-muted: #6B7280;
  
  --tile-grey: #9CA3AF;
  --modal-bg: #FFFFFF;
  --modal-backdrop: rgba(24, 25, 29, 0.6);
  --glow-opacity: 0.03;
  --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.1);
  --tz-banner-bg: rgba(222, 226, 232, 0.88);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Background Ambient Glow */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: var(--glow-opacity);
  transition: opacity 0.3s ease;
}
.bg-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, var(--savvy-blue), transparent 70%);
}
.bg-glow-2 {
  width: 600px;
  height: 600px;
  bottom: 0;
  right: 5%;
  background: radial-gradient(circle, var(--accent-subtext), transparent 70%);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 0.85rem 1.5rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--savvy-blue), var(--savvy-blue-dark));
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px var(--savvy-blue-glow);
  color: #FFFFFF;
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.stat-label {
  color: var(--text-muted);
}

.stat-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--savvy-blue);
  color: var(--savvy-blue);
}

.theme-icon {
  font-size: 0.95rem;
}

/* Timezone Banner */
.timezone-banner {
  background: var(--tz-banner-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.55rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: background-color 0.25s ease;
}

.tz-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tz-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tz-info strong {
  color: var(--savvy-blue);
}

.tz-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tz-select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.tz-select:focus {
  border-color: var(--savvy-blue);
}

/* Main Layout */
.main-layout {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Cards & Components */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Calendar */
.calendar-card {
  user-select: none;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon, .btn-sm {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon {
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-sm {
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-icon:hover, .btn-sm:hover {
  background: var(--bg-surface-hover);
  border-color: var(--savvy-blue);
  color: var(--savvy-blue);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calendar-day:hover:not(.other-month) {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.calendar-day.other-month {
  color: var(--text-muted);
  opacity: 0.3;
  cursor: default;
}

.calendar-day.today {
  font-weight: 800;
  color: var(--savvy-blue);
}

.calendar-day.has-games {
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.calendar-day.has-games:hover {
  background: var(--bg-surface-hover);
}

.calendar-day.selected {
  background: var(--savvy-blue) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 12px var(--savvy-blue-glow);
}

.day-badge-dots {
  position: absolute;
  bottom: 3px;
  display: flex;
  gap: 2px;
}

.day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.day-dot.TextChain { background-color: var(--accent-textchain); }
.day-dot.SubText { background-color: var(--accent-subtext); }

.calendar-legend {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-textchain { background: var(--accent-textchain); }
.dot-subtext { background: var(--accent-subtext); }
.dot-selected { background: var(--savvy-blue); }

.active-filter-banner {
  margin-top: 0.75rem;
  background: var(--savvy-blue-light);
  border: 1px solid var(--border-highlight);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--savvy-blue);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}
.btn-clear:hover {
  text-decoration: underline;
}

/* Filters Card */
.filter-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.55rem 2rem 0.55rem 2.3rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus {
  border-color: var(--savvy-blue);
}

.btn-clear-input {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.pill-group {
  display: flex;
  gap: 0.4rem;
}

.filter-pill {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.filter-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--savvy-blue);
  border-color: var(--savvy-blue-dark);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--savvy-blue-glow);
}

.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.form-select:focus {
  border-color: var(--savvy-blue);
}

/* Content Area */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.results-count span {
  font-weight: 700;
  color: var(--text-primary);
}

.view-toggles {
  display: flex;
  gap: 0.35rem;
}

.btn-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-toggle.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--savvy-blue);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.games-grid.compact-view,
.games-grid.list-view {
  grid-template-columns: 1fr;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--card-shadow-hover);
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.game-card.mode-TextChain::before { background: linear-gradient(90deg, #1F91F6, #60A5FA); }
.game-card.mode-SubText::before { background: linear-gradient(90deg, #06B6D4, #38BDF8); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.game-date-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--savvy-blue);
}

.game-time-rel {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.mode-badge {
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mode-badge.TextChain {
  background: var(--accent-textchain-bg);
  color: var(--accent-textchain);
  border: 1px solid rgba(31, 145, 246, 0.3);
}
.mode-badge.SubText {
  background: var(--accent-subtext-bg);
  color: var(--accent-subtext);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.game-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.3rem;
  color: var(--text-primary);
}

.game-host {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Words Sequence Preview */
.words-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.word-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.word-chip.final-word {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
}

.chain-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Card Stats Bar */
.card-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  background: var(--modal-bg);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.25s ease-out;
  color: var(--text-primary);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}
.modal-close:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.modal-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Modal Sections */
.modal-hero {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-hero-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

/* Rounds Board */
.rounds-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.round-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.round-card.is-finale {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.round-num {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.round-word {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.round-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
}

.lb-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-rank {
  font-size: 1rem;
  font-weight: 800;
  width: 24px;
  text-align: center;
}
.lb-rank.rank-1 { color: var(--gold); }
.lb-rank.rank-2 { color: var(--silver); }
.lb-rank.rank-3 { color: var(--bronze); }

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
}

.lb-username {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Duel / Wordle Grid */
.duel-board {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.duel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.duel-guesses {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

.guess-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.guess-tile {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  border-radius: 6px;
  text-transform: uppercase;
}
.guess-tile.green { background-color: var(--tile-green); }
.guess-tile.yellow { background-color: var(--tile-yellow); color: #000000; }
.guess-tile.grey { background-color: var(--tile-grey); }

.guesser-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 75px;
  text-align: right;
}

/* Polls */
.poll-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.poll-question {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.poll-option-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.poll-option-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.poll-bar-track {
  height: 8px;
  background: rgba(125, 125, 125, 0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--savvy-blue), #38BDF8);
  border-radius: var(--radius-pill);
}

.poll-option-row.is-correct .poll-option-info span:first-child {
  color: var(--tile-green);
  font-weight: 700;
}

body.light-theme .poll-option-row.is-correct .poll-option-info span:first-child {
  color: #059669;
}

.poll-option-row.is-correct .poll-bar-fill {
  background: linear-gradient(90deg, #00D084, #10B981) !important;
  box-shadow: 0 0 10px rgba(0, 208, 132, 0.45);
}

.badge-correct-answer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 208, 132, 0.16);
  color: var(--tile-green);
  border: 1px solid rgba(0, 208, 132, 0.45);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 0.4rem;
}

body.light-theme .badge-correct-answer {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.35);
}

.solve-rate-bar-track {
  height: 6px;
  background: rgba(125, 125, 125, 0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 4px;
}

.solve-rate-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--savvy-blue), #38BDF8);
  border-radius: var(--radius-pill);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.btn-primary {
  background: var(--savvy-blue);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.35rem;
  font-weight: 600;
  margin-top: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--savvy-blue-dark);
}

/* Footer */
.app-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Phone Screen Round Recap Cards */
.phone-recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.phone-recap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: all 0.2s ease;
}

.phone-recap-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-surface-hover);
}

.phone-recap-card.is-finale {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.phone-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-card-round-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--savvy-blue);
  letter-spacing: 0.04em;
}

.phone-recap-card.is-finale .phone-card-round-badge {
  color: var(--gold);
}

.phone-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.phone-card-word {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: center;
  padding: 0.4rem 0;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.phone-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.phone-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.phone-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.phone-stat-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.phone-top3-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

.phone-top3-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.phone-top3-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.phone-top3-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.2rem 0;
}

.phone-top3-rank {
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 52px;
}
.phone-top3-item.rank-1 .phone-top3-rank { color: var(--gold); }
.phone-top3-item.rank-2 .phone-top3-rank { color: var(--silver); }
.phone-top3-item.rank-3 .phone-top3-rank { color: var(--bronze); }

.phone-top3-user {
  font-weight: 600;
  flex: 1;
  margin: 0 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.phone-top3-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

