/* Muffinman V2 - Mobile-First Responsive CSS */

/* ============ Google Fonts ============ */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

/* ============ CSS Variables ============ */
:root {
  --primary: #514285;
  --primary-dark: #3A2F60;
  --secondary: #7B5BA1;
  --success: #48bb78;
  --danger: #f56565;
  --warning: #ecc94b;
  --info: #4299e1;

  --bg: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #F5F5F7;
  --text: #000000;
  --text-muted: #666666;
  --border: #CCCCCC;

  --win: #48bb78;
  --lose: #f56565;
  --push: #ecc94b;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.08);

  --header-height: 60px;

  /* Analytics chart colors (accessible palette) */
  --chart-1: #5E5CE6;  /* Indigo */
  --chart-2: #64D2FF;  /* Cyan */
  --chart-3: #FFD60A;  /* Yellow */
  --chart-4: #FF9F0A;  /* Orange */
  --chart-5: #BF5AF2;  /* Purple */
  --chart-6: #30D158;  /* Green */

  /* Data visualization (colorblind safe) */
  --data-positive: #34C759;
  --data-negative: #FF453A;
  --data-positive-alt: #64D2FF;  /* Cyan for colorblind */
  --data-negative-alt: #FF9F0A;  /* Orange for colorblind */
  --data-neutral: #8E8E93;
}

/* ============ Dark Mode Theme (Hyper-Clarity Design) ============ */
[data-theme="dark"] {
  --primary: #7B5BA1;
  --primary-dark: #9B7BC1;
  --secondary: #A48BC6;

  --bg: #0D0D0F;
  --bg-card: #1A1A1F;
  --bg-elevated: #252529;
  --text: #F5F5F7;
  --text-muted: #8E8E93;
  --border: #38383D;

  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] header {
  background: #1A1A1F;
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .card,
[data-theme="dark"] .game-card,
[data-theme="dark"] .alert {
  background: var(--bg-card);
  border-color: var(--border);
}

/* Dark mode system preference auto-detect */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #7B5BA1;
    --primary-dark: #9B7BC1;
    --secondary: #A48BC6;

    --bg: #0D0D0F;
    --bg-card: #1A1A1F;
    --bg-elevated: #252529;
    --text: #F5F5F7;
    --text-muted: #8E8E93;
    --border: #38383D;

    --shadow: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.3);
  }
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ============ Typography ============ */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

/* ============ Layout ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

main {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ============ Header ============ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--primary);
  color: white;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
}

.logo-text {
  font-family: 'Great Vibes', cursive;
  font-size: 1.75rem;
  font-weight: 400;
  display: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* Responsive nav text - show short on mobile, full on desktop */
.nav-text-full {
  display: none;
}

.nav-text-short {
  display: inline;
}

/* Admin nav divider */
.nav-divider {
  display: none;
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  margin: 0 0.5rem;
}

/* Hide admin nav links on mobile (accessible via dropdown) */
.nav-link-admin {
  display: none;
}

/* Header Actions Container */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  color: white;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.user-menu-toggle:hover {
  background: rgba(255,255,255,0.25);
}

/* User name in toggle - hidden on mobile, shown on tablet+ */
.user-menu-toggle-name {
  display: none;
}

@media (min-width: 768px) {
  .user-menu-toggle-name {
    display: inline;
  }

  .user-menu-toggle {
    padding: 0.375rem 0.75rem 0.375rem 1rem;
  }
}

.user-menu-icon {
  width: 20px;
  height: 20px;
}

.dropdown-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.user-menu:hover .dropdown-arrow,
.user-menu:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 180px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
  display: block;
}

.user-menu-header {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.user-menu-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.user-menu-section {
  padding: 0.5rem 0;
}

.user-menu-section-label {
  display: block;
  padding: 0.25rem 1rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.user-menu-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.user-menu-item:hover {
  background: var(--bg);
}

.user-menu-item:hover svg {
  color: var(--text);
}

/* Badge in menu items (e.g., notification count) */
.menu-badge {
  margin-left: auto;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--danger);
  color: white;
  border-radius: 9999px;
  min-width: 1.25rem;
  text-align: center;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.user-menu-logout {
  color: var(--danger);
}

.user-menu-logout:hover {
  background: rgba(245, 101, 101, 0.1);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(0.9);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(0.9);
}

.btn-outline {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* ============ Forms ============ */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(81,66,133,0.1);
}

select.form-input {
  cursor: pointer;
}

/* ============ Cards ============ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-body {
  padding: 1rem;
}

/* ============ Alerts ============ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.alert-success {
  background: #c6f6d5;
  color: #276749;
}

.alert-error {
  background: #fed7d7;
  color: #c53030;
}

.alert-warning {
  background: #fefcbf;
  color: #975a16;
}

.alert-info {
  background: #bee3f8;
  color: #2b6cb0;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
}

.alert-close:hover {
  opacity: 1;
}

/* ============ Auth Pages ============ */
.auth-page {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo h1 {
  font-size: 2rem;
  color: var(--primary);
}

.auth-logo-text {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  font-weight: 400;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links .divider {
  margin: 0 0.75rem;
  color: var(--text-muted);
}

.pending-message {
  text-align: center;
  padding: 1rem 0;
}

.pending-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.pending-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* ============ Picks Page ============ */
.picks-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.week-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.week-selector select {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  min-width: 120px;
}

.picks-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.picks-count {
  font-size: 0.875rem;
}

.locked-count {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.pick-confirmation {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-size: 0.875rem;
}

.confirmation-icon {
  font-size: 1.25rem;
}

.confirmation-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============ Game Cards ============ */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
}

.game-card.locked {
  opacity: 0.7;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.game-time {
  color: var(--text-muted);
}

.game-status {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}

.game-status.open {
  background: #e2e8f0;
  color: var(--text-muted);
}

.game-status.locked,
.game-status.in-progress {
  background: var(--warning);
  color: #975a16;
}

.game-status.final {
  background: var(--text-muted);
  color: white;
}

.game-matchup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team:hover:not(.disabled) {
  border-color: var(--primary);
}

.team.selected {
  border-color: var(--secondary);
  background: rgba(123,91,161,0.1);
}

.team.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.team.win {
  background: rgba(72,187,120,0.15);
  border-color: var(--win);
}

.team.lose {
  background: rgba(245,101,101,0.15);
  border-color: var(--lose);
}

.team.push {
  background: rgba(236,201,75,0.15);
  border-color: var(--push);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  align-items: center;
}

.team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.25rem;
}

.team-logo-sm {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.team-abbrev {
  font-weight: 600;
  font-size: 1rem;
}

.team-spread {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.team-score {
  font-size: 1.25rem;
  font-weight: 700;
}

.vs-divider {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.pick-result {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pick-result.win { color: var(--win); }
.pick-result.lose { color: var(--lose); }
.pick-result.push { color: var(--push); }

/* ============ Standings ============ */
.standings-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.standings-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.standings-table .rank {
  width: 40px;
  text-align: center;
}

.standings-table .points {
  text-align: right;
  font-weight: 600;
}

.standings-table .record {
  font-size: 0.875rem;
}

.standings-table tr.current-user {
  background: rgba(123,91,161,0.1);
}

.standings-table .streak {
  text-align: center;
  width: 60px;
}

.streak-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.streak-badge.streak-win {
  background: var(--win);
  color: white;
}

.streak-badge.streak-lose {
  background: var(--lose);
  color: white;
}

/* ============ Admin Pages ============ */
.admin-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.admin-page h1 {
  margin-bottom: 1.5rem;
}

.badge {
  background: var(--secondary);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  gap: 1rem;
  flex-wrap: wrap;
}

.user-item .user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-item .user-name {
  font-weight: 600;
  display: block;
}

.user-item .user-email {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.user-item .user-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-actions {
  display: flex;
  gap: 0.5rem;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.users-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Score Entry */
.api-status .status-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-indicator {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-indicator.connected {
  background: var(--success);
  color: white;
}

.status-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.scores-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.score-entry-card {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.score-entry-card .game-info {
  margin-bottom: 0.75rem;
}

.score-entry-card .matchup {
  font-weight: 600;
}

.score-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.score-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.score-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.score-input-group label {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-input {
  width: 60px !important;
  text-align: center;
}

.score-divider {
  font-weight: 600;
  margin-top: 1rem;
}

.score-result {
  font-size: 0.75rem;
}

.saved-indicator {
  color: var(--text-muted);
}

.saved-indicator.success {
  color: var(--success);
}

/* ============ Everyone's Picks ============ */
.everyone-picks {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.everyone-picks h3 {
  margin-bottom: 1rem;
}

.user-picks-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.user-picks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.user-picks-header .user-score {
  font-weight: 600;
  color: var(--secondary);
}

.user-picks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pick-chip {
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
}

.pick-chip.win {
  background: var(--win);
  color: white;
}

.pick-chip.lose {
  background: var(--lose);
  color: white;
}

.pick-chip.push {
  background: var(--push);
  color: #975a16;
}

.no-picks-text {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
}

/* ============ Utility ============ */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem;
}

.error-page {
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--text-muted);
}

/* ============ Responsive ============ */
@media (min-width: 640px) {
  /* Show logo text on tablet+ */
  .logo-text {
    display: inline;
  }

  /* Show full nav text */
  .nav-text-full {
    display: inline;
  }
  .nav-text-short {
    display: none;
  }

  /* Wider nav link padding */
  .nav-link {
    padding: 0.5rem 0.75rem;
  }

  /* Show admin nav links on tablet+ */
  .nav-link-admin {
    display: flex;
  }

  .game-matchup {
    gap: 1rem;
  }

  .team {
    padding: 1rem;
  }

  .card-header,
  .card-body {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  h1 { font-size: 2rem; }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 1rem;
  }

  /* Show admin nav links on desktop */
  .nav-link-admin {
    display: inline-block;
  }

  .nav-divider {
    display: block;
  }

  .auth-card {
    padding: 2.5rem 2rem;
  }

  .scores-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .games-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .scores-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============ Streaks Page ============ */
.streaks-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.streaks-page h1 {
  margin-bottom: 1.5rem;
}

.streak-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .streak-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.streak-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.streak-card-fire {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.streak-card-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.streak-card-cold {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.streak-card-ice {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.streak-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.streak-card-subtitle {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.streak-card-body {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.streak-card-user {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.streak-card-value {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.streak-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.streak-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.streak-card-empty {
  font-style: italic;
  opacity: 0.7;
}

/* ============ Hall of Fame Page ============ */
.halloffame-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.halloffame-header {
  text-align: center;
  margin-bottom: 2rem;
}

.halloffame-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.halloffame-title-muffinman {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--primary);
}

.halloffame-title-hof {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #DAA520 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.halloffame-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Trophy Section Headers */
.trophy-section {
  margin-bottom: 2rem;
}

.trophy-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.monday-hurts-header {
  background: white;
  border: 2px solid #DAA520;
}

.purple-lantern-header {
  background: white;
  border: 2px solid #6B3FA0;
}

.trophy-section-icon {
  flex-shrink: 0;
}

.monday-hurts-header .trophy-section-title h2 {
  color: #B8860B;
  font-size: 1.25rem;
  margin-bottom: 0.125rem;
}

.monday-hurts-header .trophy-section-title p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.purple-lantern-header .trophy-section-title h2 {
  color: #6B3FA0;
  font-size: 1.25rem;
  margin-bottom: 0.125rem;
}

.purple-lantern-header .trophy-section-title p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Champions Grid */
.champions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .champions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .champions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Monday Hurts Trophy Champion Cards */
.champion-card.monday-hurts {
  background: white;
  border: 2px solid #DAA520;
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.champion-card.monday-hurts:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(218, 165, 32, 0.2);
  border-color: #FFD700;
}

.champion-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: #B8860B;
  margin-bottom: 0.5rem;
}

.champion-trophy {
  margin-bottom: 0.5rem;
}

.monday-hurts-trophy {
  filter: drop-shadow(0 2px 4px rgba(218, 165, 32, 0.3));
}

.champion-names {
  margin-bottom: 0.25rem;
}

.champion-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.champion-points {
  font-size: 0.875rem;
  color: #B8860B;
  font-weight: 500;
}

.champion-tie {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Last Place Grid */
.lastplace-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .lastplace-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .lastplace-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Purple Lantern Cards */
.lastplace-card.purple-lantern-card {
  background: white;
  border: 2px solid #6B3FA0;
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lastplace-card.purple-lantern-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(107, 63, 160, 0.15);
  border-color: #9370DB;
}

.lastplace-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: #6B3FA0;
  margin-bottom: 0.5rem;
}

.lastplace-lantern {
  margin-bottom: 0.5rem;
}

.purple-lantern {
  filter: drop-shadow(0 2px 6px rgba(138, 43, 226, 0.3));
}

.lastplace-names {
  margin-bottom: 0.25rem;
}

.lastplace-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.lastplace-points {
  font-size: 0.875rem;
  color: #6B3FA0;
  font-weight: 500;
}

.lastplace-tie {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.champion-row {
  background: rgba(251, 191, 36, 0.1);
}

.champion-indicator {
  margin-right: 0.25rem;
}

/* ============ Standings Tiles Section ============ */
.standings-tiles-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Mobile: Hall of Fame full width on top, then 2x2 grid below */
@media (min-width: 768px) {
  .standings-tiles-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

/* Hall of Fame Tile - spans 2 rows on desktop */
.halloffame-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
  min-height: 120px;
}

@media (min-width: 768px) {
  .halloffame-tile {
    grid-row: span 2;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
  }
}

.halloffame-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.halloffame-tile-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .halloffame-tile-icon {
    width: 72px;
    height: 72px;
  }
}

.tile-trophy-icon {
  width: 32px;
  height: 32px;
}

@media (min-width: 768px) {
  .tile-trophy-icon {
    width: 40px;
    height: 40px;
  }
}

.halloffame-tile-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.halloffame-tile-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.halloffame-tile-subtitle {
  font-size: 0.875rem;
  opacity: 0.85;
}

/* Streak Tiles Grid - 2x2 */
.streak-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* Individual Streak Tile */
.streak-tile {
  border-radius: var(--radius-lg);
  padding: 0.875rem;
  color: white;
  display: flex;
  flex-direction: column;
}

.streak-tile-fire {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.streak-tile-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.streak-tile-cold {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.streak-tile-ice {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.streak-tile-header h3 {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  line-height: 1.2;
}

@media (min-width: 480px) {
  .streak-tile-header h3 {
    font-size: 0.875rem;
  }
}

.streak-tile-subtitle {
  font-size: 0.625rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

@media (min-width: 480px) {
  .streak-tile-subtitle {
    font-size: 0.7rem;
  }
}

.streak-tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 50px;
}

.streak-tile-user {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-align: center;
}

@media (min-width: 480px) {
  .streak-tile-user {
    font-size: 1rem;
  }
}

.streak-tile-value {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.streak-tile-number {
  font-size: 1.25rem;
  font-weight: 800;
}

@media (min-width: 480px) {
  .streak-tile-number {
    font-size: 1.5rem;
  }
}

.streak-tile-label {
  font-size: 0.625rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.streak-tile-empty {
  font-style: italic;
  opacity: 0.7;
  font-size: 0.75rem;
  text-align: center;
}

/* Legacy teaser styles - can be removed after migration */
.halloffame-teaser {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.halloffame-teaser:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.halloffame-teaser-content {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.halloffame-teaser-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.teaser-trophy-icon {
  width: 28px;
  height: 28px;
}

.halloffame-teaser-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.halloffame-teaser-title {
  font-size: 1rem;
  font-weight: 600;
}

.halloffame-teaser-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ============ Notification Bell ============ */
.notification-bell-container {
  position: relative;
}

.notification-bell-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s;
}

.notification-bell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notification-bell-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
}

.notification-dropdown[hidden] {
  display: none;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.notification-dropdown-header span {
  font-weight: 600;
  color: var(--text);
}

.notification-mark-all-read {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
}

.notification-mark-all-read:hover {
  background: rgba(81, 66, 133, 0.1);
}

.notification-dropdown-content {
  max-height: 360px;
  overflow-y: auto;
}

.notification-dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.notification-dropdown-footer a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.notification-dropdown-footer a:hover {
  text-decoration: underline;
}

.notification-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.notification-empty {
  padding: 2rem 1rem;
  text-align: center;
}

.notification-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.notification-empty-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============ Notification Items ============ */
.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: white;
  transition: background 0.2s;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--bg);
}

.notification-item.unread {
  background: rgba(81, 66, 133, 0.05);
}

.notification-item.unread:hover {
  background: rgba(81, 66, 133, 0.1);
}

.notification-item.compact {
  padding: 0.625rem 1rem;
}

.notification-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.notification-item.compact .notification-item-icon {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.notification-item.compact .notification-item-title {
  font-size: 0.8125rem;
}

.notification-item-message {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-item.compact .notification-item-message {
  font-size: 0.75rem;
  -webkit-line-clamp: 1;
}

.notification-item-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notification-item-mark-read {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.notification-item:hover .notification-item-mark-read {
  opacity: 1;
}

.notification-item-mark-read:hover {
  color: var(--text);
}

/* ============ Notifications Page ============ */
.notifications-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.notifications-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.notifications-page h1 {
  margin: 0;
}

.notifications-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.notifications-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.notifications-empty h2 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.notifications-empty p {
  color: var(--text-muted);
}

.notifications-list-full {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notifications-list-full .notification-item {
  padding: 1rem 1.25rem;
}

.notifications-list-full .notification-item-icon {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.notifications-list-full .notification-item-title {
  font-size: 0.9375rem;
}

.notifications-list-full .notification-item-message {
  font-size: 0.875rem;
  -webkit-line-clamp: 3;
}

.notifications-list-full .notification-item-time {
  font-size: 0.75rem;
}

.notifications-list-full .notification-item-mark-read {
  opacity: 1;
}

.notifications-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============ HTMX Loading States ============ */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline;
}

.htmx-request.htmx-indicator {
  display: inline;
}

/* ============ Showdowns Page ============ */
.showdowns-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

/* Showdown Tiles (Record & Streak) */
.showdown-tiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.showdown-tile {
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  color: white;
}

.tile-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.tile-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 50px;
}

.tile-footer {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.record-tile {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.record-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.record-separator {
  opacity: 0.7;
}

.streak-tile-fire {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}

.streak-tile-cold {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.streak-tile-neutral {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.streak-icon {
  font-size: 1.5rem;
}

.streak-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0.25rem;
}

.streak-type {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Moose Button */
.moose-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.moose-button:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(81, 66, 133, 0.3);
}

.moose-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.moose-icon {
  width: 40px;
  height: 40px;
}

.moose-icon-small {
  width: 24px;
  height: 24px;
}

/* Showdown Cards */
.showdowns-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.showdowns-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.showdown-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.showdown-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.showdown-card.invited {
  border-left-color: var(--warning);
  background: rgba(236, 201, 75, 0.05);
}

.showdown-card.completed {
  border-left-color: var(--success);
}

.showdown-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.showdown-card-icon {
  font-size: 1.25rem;
}

.showdown-invite-icon {
  font-size: 1.25rem;
}

.showdown-card-title {
  font-weight: 600;
  font-size: 1rem;
}

.showdown-participant-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.showdown-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.showdown-status {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #e2e8f0;
  color: var(--text-muted);
}

.status-active {
  background: var(--warning);
  color: #975a16;
}

.status-completed {
  background: var(--success);
  color: white;
}

.showdown-week {
  color: var(--text-muted);
}

.showdown-card-score {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.showdown-card-score .winning {
  color: var(--success);
  font-weight: 600;
}

.showdown-card-score .losing {
  color: var(--danger);
}

.showdown-card-link {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.showdown-card-link:hover {
  text-decoration: underline;
}

.showdown-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* No Showdowns Empty State */
.no-showdowns {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.no-showdowns-icon {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.no-showdowns-moose {
  width: 80px;
  height: 67px;
}

.no-showdowns-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.no-showdowns-subtext {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Create Showdown Page */
.create-showdown-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.back-link:hover {
  text-decoration: underline;
}

.create-showdown-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.create-showdown-header h1 {
  font-size: 1.5rem;
}

.create-showdown-info {
  margin-bottom: 1.5rem;
}

.games-info {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.create-showdown-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* User Selector */
.user-selector {
  position: relative;
}

.user-search {
  margin-bottom: 0.5rem;
}

.selected-users {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 36px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.chip-remove {
  background: none;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  opacity: 0.8;
}

.chip-remove:hover {
  opacity: 1;
}

.user-list-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: var(--shadow-lg);
}

.user-list-dropdown.open {
  display: block;
}

.user-option {
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.user-option:hover {
  background: var(--bg);
}

.moose-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Showdown Detail Page */
.showdown-detail-page {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
}

.showdown-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.leave-btn {
  margin-left: auto;
}

.showdown-title-section {
  margin-bottom: 1.5rem;
}

.showdown-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.showdown-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.showdown-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.showdown-status-badge.status-pending {
  background: #e2e8f0;
  color: var(--text-muted);
}

.showdown-status-badge.status-active {
  background: var(--warning);
  color: #975a16;
}

.showdown-status-badge.status-completed {
  background: var(--success);
  color: white;
}

.showdown-week-badge {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Showdown Section */
.showdown-section {
  margin-bottom: 1.5rem;
}

.showdown-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Showdown Standings Table */
.showdown-standings-table {
  width: 100%;
  border-collapse: collapse;
}

.showdown-standings-table th,
.showdown-standings-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.showdown-standings-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.showdown-standings-table .rank {
  width: 40px;
  text-align: center;
}

.showdown-standings-table .picks-count {
  width: 60px;
  text-align: center;
  color: var(--text-muted);
}

.showdown-standings-table .score {
  width: 60px;
  text-align: right;
  font-weight: 600;
}

.showdown-standings-table .status-col {
  width: 80px;
  text-align: right;
}

.showdown-standings-table .current-user {
  background: rgba(123, 91, 161, 0.1);
}

.status-leading {
  color: var(--success);
  font-weight: 600;
  font-size: 0.75rem;
}

.status-behind {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Pick Comparison Table */
.pick-comparison-table-wrapper {
  overflow-x: auto;
}

.pick-comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.pick-comparison-table th,
.pick-comparison-table td {
  padding: 0.625rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.pick-comparison-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  position: sticky;
  top: 0;
}

.pick-comparison-table .game-col {
  text-align: left;
  min-width: 120px;
}

.pick-comparison-table .pick-col {
  width: 80px;
}

.game-matchup-mini {
  font-weight: 600;
  font-size: 0.875rem;
}

.game-matchup-mini .at {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.spread-line {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.final-score-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pick-col.win {
  background: rgba(72, 187, 120, 0.15);
}

.pick-col.loss {
  background: rgba(245, 101, 101, 0.15);
}

.pick-col.push {
  background: rgba(236, 201, 75, 0.15);
}

.pick-col.pending {
  background: transparent;
}

.pick-col.no-pick {
  color: var(--text-muted);
}

.pick-team {
  font-weight: 600;
  font-size: 0.875rem;
}

.pick-result-icon {
  margin-left: 0.25rem;
  font-size: 0.75rem;
}

/* Trash Talk Section */
.trash-talk-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.trash-talk-section h3 {
  margin-bottom: 1rem;
}

.messages-container {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
}

.message {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
}

.message-own {
  background: rgba(81, 66, 133, 0.1);
  border-left: 3px solid var(--primary);
}

.message-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.message-author {
  font-weight: 600;
  color: var(--primary);
}

.message-time {
  color: var(--text-muted);
}

.message-content {
  font-size: 0.9rem;
  word-wrap: break-word;
}

.no-messages {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message-input-row {
  display: flex;
  gap: 0.5rem;
}

.message-input {
  flex: 1;
}

.emoji-picker {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.emoji-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.emoji-btn:hover {
  background: var(--bg);
}

/* Message Reactions */
.message-reactions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
}

.reactions-display {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.reaction-form {
  display: inline-block;
}

.reaction-badge {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.reaction-badge:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.reaction-badge.user-reacted {
  background: var(--primary-light);
  border-color: var(--primary);
}

.reaction-add {
  position: relative;
}

.reaction-add-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.reaction-add-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.reaction-picker {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  gap: 0.125rem;
  flex-wrap: wrap;
  min-width: 150px;
}

.reaction-picker.open {
  display: flex;
}

.reaction-picker-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.reaction-picker-btn:hover {
  background: var(--bg);
}

/* Responsive for Showdowns */
@media (max-width: 639px) {
  .showdown-tiles-grid {
    grid-template-columns: 1fr;
  }

  .pick-comparison-table .pick-col {
    width: 60px;
  }

  .showdown-standings-table .player-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Mobile touch-friendly improvements */
  .showdown-card {
    padding: 1rem;
  }

  .showdown-card-actions {
    flex-wrap: wrap;
  }

  .showdown-card-actions .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.625rem 1rem;
  }

  /* Mobile trash talk */
  .trash-talk-section {
    padding: 0.75rem;
  }

  .messages-container {
    max-height: 250px;
  }

  .message-input-row {
    flex-direction: column;
  }

  .message-input-row .btn {
    min-height: 44px;
  }

  .emoji-picker {
    justify-content: center;
  }

  .emoji-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.5rem;
  }

  /* Mobile reactions */
  .reaction-badge {
    min-height: 32px;
    padding: 0.25rem 0.625rem;
  }

  .reaction-add-btn {
    width: 2rem;
    height: 2rem;
  }

  .reaction-picker {
    left: auto;
    right: 0;
    min-width: 180px;
  }

  .reaction-picker-btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.5rem;
  }

  /* Mobile pick comparison - horizontal scroll */
  .pick-comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .pick-comparison-table {
    min-width: 100%;
  }

  /* Mobile participant list */
  .participant-item {
    padding: 0.75rem;
  }

  /* Mobile user selector */
  .user-chip {
    padding: 0.375rem 0.75rem;
  }

  .chip-remove {
    min-width: 28px;
    min-height: 28px;
  }

  .user-option {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Mobile stats tiles */
  .stats-tile {
    padding: 0.75rem;
  }

  .stats-tile .stat-value {
    font-size: 1.5rem;
  }
}

/* Touch feedback for interactive elements */
@media (hover: none) and (pointer: coarse) {
  .btn:active,
  .showdown-card:active,
  .emoji-btn:active,
  .reaction-badge:active,
  .reaction-picker-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  /* Remove hover states on touch devices */
  .btn:hover,
  .showdown-card:hover {
    transform: none;
  }
}

/* Loading states */
.btn[disabled],
.btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ============ Profile Page ============ */
.profile-page {
  padding-top: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.profile-page h1 {
  margin-bottom: 1.5rem;
}

.profile-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.subsection-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
}

/* Profile Header with Avatar */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.avatar-container {
  flex-shrink: 0;
}

.avatar-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Avatar Upload */
.avatar-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.avatar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}

.avatar-upload-btn svg {
  flex-shrink: 0;
}

.avatar-file-input {
  display: none;
}

.avatar-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.avatar-remove-btn svg {
  flex-shrink: 0;
}

.btn-danger {
  color: var(--error);
  border-color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  color: white;
}

.avatar-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.avatar-loading {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Header Avatar (small, in navigation) */
.header-avatar-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.profile-info h2 {
  margin-bottom: 0.25rem;
}

.profile-info .text-muted {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Profile Cards */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.profile-card-header {
  margin-bottom: 0.5rem;
}

.profile-card-label {
  font-weight: 500;
  font-size: 0.875rem;
}

/* Inline Form (display name) */
.profile-inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.profile-inline-form .form-input {
  flex: 1;
}

/* Password Details/Accordion */
.password-details {
  margin-top: 0.5rem;
}

.password-toggle {
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 0;
  user-select: none;
}

.password-toggle:hover {
  color: var(--primary-dark);
}

.password-form {
  padding-top: 1rem;
}

.password-form .form-group {
  margin-bottom: 1rem;
}

.password-form .btn {
  margin-top: 0.5rem;
}

#password-result {
  margin-top: 0.75rem;
}

/* Notification Card */
.notification-card {
  padding: 0;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  gap: 1rem;
}

.notification-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notification-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
}

.notification-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notification-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(81, 66, 133, 0.2);
}

/* Save Indicator */
.save-indicator {
  font-size: 0.75rem;
  color: var(--success);
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Coming Soon Text */
.coming-soon-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1rem 0;
}

/* Reset Button */
.reset-btn {
  margin-top: 0.5rem;
}

/* Profile Page Responsive */
@media (max-width: 480px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .avatar-upload-container {
    width: 100%;
  }

  .profile-inline-form {
    flex-direction: column;
  }

  .profile-inline-form .btn {
    width: 100%;
  }
}

/* ===========================
   Week Management (Admin)
   =========================== */

.week-management {
  max-width: 1200px;
  margin: 0 auto;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.week-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.week-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.week-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  background: white;
  min-width: 150px;
}

.sync-success {
  color: #22c55e;
  font-size: 0.875rem;
}

.sync-error {
  color: #dc2626;
  font-size: 0.875rem;
}

.sync-info {
  color: #666;
  font-size: 0.875rem;
}

/* Games Table */
.games-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.games-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.games-table th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.games-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

/* Column widths - optimized for desktop admin view */
.col-kickoff { width: 130px; }
.col-matchup { min-width: 280px; }
.col-spread { width: 100px; }
.col-score { width: 220px; }
.col-status { width: 100px; }

/* Row states */
.game-row {
  background: white;
  transition: background-color 0.15s;
}

.game-row:hover {
  background: #f9fafb;
}

.game-row.row-locked {
  background: #f9f8fc;
}

.game-row.row-final {
  background: #f0fdf4;
}

/* Kickoff column */
.kickoff-input {
  display: none;
  width: 100%;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.8rem;
}

.col-kickoff:hover .kickoff-input,
.col-kickoff:focus-within .kickoff-input {
  display: block;
}

.col-kickoff:hover .kickoff-display,
.col-kickoff:focus-within .kickoff-display {
  display: none;
}

.kickoff-display {
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Matchup column */
.matchup-display {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.team-select {
  padding: 0.25rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.875rem;
  background: transparent;
  cursor: pointer;
  min-width: 60px;
}

.team-select:hover,
.team-select:focus {
  border-color: var(--border-color);
  background: white;
}

.spread-inline {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 40px;
}

.at-symbol {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0 0.25rem;
}

/* Spread column */
.spread-input {
  width: 60px;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  text-align: center;
}

.spread-input::placeholder {
  color: #ccc;
}

/* Score column - Improved vertical layout */
.col-score {
  white-space: nowrap;
}

.score-entry {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.25rem 0;
}

.score-team-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: #f9fafb;
  border-radius: 6px;
  min-width: 140px;
}

.score-team-row:hover {
  background: #f3f4f6;
}

.score-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.score-team-logo-placeholder {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.score-team-abbrev {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-color);
  min-width: 36px;
  text-align: left;
}

.score-input {
  width: 48px;
  padding: 0.375rem 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background: white;
  margin-left: auto;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.score-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 80, 140, 0.15);
}

.score-input::placeholder {
  color: #d1d5db;
  font-weight: 400;
}

/* Final score styling */
.row-final .score-team-row {
  background: #ecfdf5;
}

.row-final .score-input {
  background: #d1fae5;
  border-color: #86efac;
  color: #166534;
}

/* Status column */
.col-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lock-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  min-width: 28px;
  min-height: 28px;
}

.lock-btn:hover {
  background: #f3f4f6;
  border-color: var(--border-color);
}

.lock-btn.locked {
  background: var(--primary-color);
  color: white;
}

.status-final {
  color: #22c55e;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-picks {
  color: var(--text-muted);
  font-size: 0.75rem;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.delete-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.game-row:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  background: #fef2f2;
  border-radius: 4px;
}

/* Empty/Loading states */
.loading-cell,
.empty-cell {
  text-align: center;
  padding: 2rem !important;
  color: var(--text-muted);
}

/* Add Game Section */
.add-game-section {
  margin-top: 1rem;
}

.add-game-form {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.add-game-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.add-game-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-game-form .form-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.add-game-form .form-field select,
.add-game-form .form-field input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
}

.add-game-form .form-actions {
  display: flex;
  gap: 0.5rem;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .week-header {
    flex-direction: column;
    align-items: stretch;
  }

  .week-controls {
    justify-content: space-between;
  }

  .games-table {
    display: none;
  }

  /* Mobile card view */
  .games-table-wrapper {
    display: block;
  }

  .game-row {
    display: block;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
  }

  .game-row .col-kickoff,
  .game-row .col-matchup,
  .game-row .col-spread,
  .game-row .col-score,
  .game-row .col-status {
    display: block;
    width: 100%;
    padding: 0.25rem 0;
    border: none;
  }

  .game-row .col-status {
    justify-content: flex-end;
  }

  .kickoff-display {
    font-weight: 600;
  }

  /* Mobile score entry */
  .game-row .col-score {
    margin-top: 0.5rem;
  }

  .score-entry {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .score-team-row {
    flex: 1;
    max-width: 150px;
  }

  .add-game-row {
    flex-direction: column;
  }

  .add-game-form .form-field {
    width: 100%;
  }

  .add-game-form .form-field select,
  .add-game-form .form-field input {
    width: 100%;
  }
}

/* ============================================================================
   GAMBLING ANALYTICS DASHBOARD
   ============================================================================ */

/* Analytics Dashboard Layout */
.analytics-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.analytics-dashboard .page-header {
  margin-bottom: 1.5rem;
}

.analytics-dashboard .page-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Analytics Controls */
.analytics-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.analytics-controls .week-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.analytics-controls .week-selector label {
  font-weight: 600;
}

.analytics-controls .week-selector select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.analytics-controls .analytics-stats {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.analytics-controls .stat {
  color: var(--text-muted);
}

.analytics-controls .stat strong {
  color: var(--text);
}

/* Analytics Tabs */
.analytics-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.analytics-tabs .tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.2s;
  white-space: nowrap;
}

.analytics-tabs .tab:hover {
  background: rgba(81, 66, 133, 0.1);
  color: var(--primary);
}

.analytics-tabs .tab.active {
  background: var(--primary);
  color: white;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-header h2 {
  margin: 0;
}

.section-header .last-updated {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.section-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Lock of the Week Card */
.lock-of-week-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.lock-of-week-card.empty {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 2px dashed var(--border);
}

.lock-of-week-card .lock-icon {
  font-size: 2.5rem;
}

.lock-of-week-card .lock-content {
  flex: 1;
}

.lock-of-week-card .lock-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.lock-of-week-card h3 {
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
}

.lock-of-week-card .result-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.lock-of-week-card .result-tag.win {
  background: var(--success);
}

.lock-of-week-card .result-tag.loss {
  background: var(--danger);
}

.lock-of-week-card .result-tag.push {
  background: var(--warning);
  color: #333;
}

.lock-of-week-card .result-tag.pending {
  background: rgba(255, 255, 255, 0.2);
}

.lock-of-week-card .lock-team {
  margin-bottom: 0.75rem;
}

.lock-of-week-card .team-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.lock-of-week-card .team-abbrev {
  opacity: 0.8;
  margin-left: 0.5rem;
}

.lock-of-week-card .lock-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.lock-of-week-card .stat {
  text-align: center;
}

.lock-of-week-card .stat .value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.lock-of-week-card .stat .label {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Consensus Grid */
.consensus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.consensus-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.consensus-card.final {
  opacity: 0.85;
}

.consensus-card.lock-game {
  border-color: var(--primary);
  border-width: 2px;
}

.consensus-card .game-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.consensus-card .final-badge {
  background: var(--primary);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.consensus-card .game-score {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.consensus-card .team-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.consensus-card .team-info {
  width: 80px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.consensus-card .team-abbrev {
  font-weight: 600;
}

.consensus-card .spread {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.consensus-card .result-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
}

.consensus-card .result-badge.win {
  background: var(--success);
  color: white;
}

.consensus-card .result-badge.loss {
  background: var(--danger);
  color: white;
}

.consensus-card .result-badge.push {
  background: var(--warning);
  color: #333;
}

.consensus-card .pick-bar-container {
  flex: 1;
  height: 24px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.consensus-card .pick-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  transition: width 0.3s ease;
}

.consensus-card .pick-bar.away {
  background: var(--primary);
}

.consensus-card .pick-bar.home {
  background: var(--secondary);
}

.consensus-card .pick-bar.majority {
  background: var(--success);
}

.consensus-card .pick-bar .percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.consensus-card .pick-count {
  width: 30px;
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.consensus-card .total-picks {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ATS Rankings Table */
.ats-rankings-section {
  padding: 1rem 0;
}

.rankings-table-container {
  overflow-x: auto;
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rankings-table th,
.rankings-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.rankings-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.rankings-table tr.top-1 {
  background: rgba(255, 215, 0, 0.15);
}

.rankings-table tr.top-2 {
  background: rgba(192, 192, 192, 0.15);
}

.rankings-table tr.top-3 {
  background: rgba(205, 127, 50, 0.15);
}

.rankings-table .rank-col {
  width: 50px;
  text-align: center;
}

.rankings-table .record-col .wins {
  color: var(--success);
  font-weight: 600;
}

.rankings-table .record-col .losses {
  color: var(--danger);
  font-weight: 600;
}

.rankings-table .record-col .pushes {
  color: var(--warning);
}

.rankings-table .cover-col {
  width: 150px;
}

.rankings-table .cover-bar-container {
  position: relative;
  height: 20px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.rankings-table .cover-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

.rankings-table .cover-bar.hot {
  background: var(--success);
}

.rankings-table .cover-bar.cold {
  background: var(--danger);
}

.rankings-table .cover-value {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
}

.rankings-table .margin-value {
  font-weight: 600;
}

.rankings-table .margin-value.positive {
  color: var(--success);
}

.rankings-table .margin-value.negative {
  color: var(--danger);
}

.rankings-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.rankings-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rankings-legend .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.rankings-legend .legend-color.hot {
  background: var(--success);
}

.rankings-legend .legend-color.cold {
  background: var(--danger);
}

/* Contrarian Section */
.contrarian-section {
  padding: 1rem 0;
}

.contrarian-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contrarian-summary .summary-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contrarian-summary .summary-card.highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
}

.contrarian-summary .summary-card .card-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.contrarian-summary .summary-card .card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contrarian-summary .summary-card.highlight .card-label {
  color: rgba(255, 255, 255, 0.8);
}

.contrarian-summary .summary-card.wins .card-value {
  color: var(--success);
}

.contrarian-summary .summary-card.losses .card-value {
  color: var(--danger);
}

.insight-box {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(81, 66, 133, 0.05);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  margin-bottom: 1.5rem;
}

.insight-box .insight-icon {
  font-size: 1.5rem;
}

.insight-box .insight-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.insight-box .insight-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.contrarian-leaders h3 {
  margin-bottom: 1rem;
}

.contrarian-leaders .leaders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contrarian-leaders .leader-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contrarian-leaders .leader-rank {
  font-weight: 700;
  color: var(--primary);
  min-width: 30px;
}

.contrarian-leaders .leader-info {
  flex: 1;
}

.contrarian-leaders .leader-name {
  font-weight: 600;
  display: block;
}

.contrarian-leaders .leader-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.contrarian-leaders .leader-badge {
  font-size: 1.25rem;
}

/* Segment Section */
.segment-section {
  padding: 1rem 0;
}

.segment-group {
  margin-bottom: 2rem;
}

.segment-group h3 {
  margin-bottom: 1rem;
}

.segment-group.fun-segment {
  background: rgba(81, 66, 133, 0.03);
  padding: 1rem;
  border-radius: var(--radius);
}

.segment-hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.segment-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.segment-card {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
}

.segment-card.hot {
  border-color: var(--success);
}

.segment-card.cold {
  border-color: var(--danger);
}

.segment-card .segment-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.segment-card .segment-label {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.segment-card .win-rate {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.segment-card.hot .win-rate {
  color: var(--success);
}

.segment-card.cold .win-rate {
  color: var(--danger);
}

.segment-card .record {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vs-divider {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* Division Grid */
.division-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.division-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--border);
}

.division-card.hot {
  border-left-color: var(--success);
}

.division-card.cold {
  border-left-color: var(--danger);
}

.division-card .division-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.division-card .division-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.division-card .win-rate {
  font-weight: 700;
  color: var(--text);
}

.division-card.hot .win-rate {
  color: var(--success);
}

.division-card.cold .win-rate {
  color: var(--danger);
}

/* Color Grid */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.color-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.color-card .color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.color-card .color-stats .win-rate {
  font-weight: 700;
  font-size: 1.125rem;
}

.color-card .color-stats .win-rate.hot {
  color: var(--success);
}

.color-card .color-stats .win-rate.cold {
  color: var(--danger);
}

.color-card .picks,
.color-card .teams {
  font-size: 0.625rem;
  color: var(--text-muted);
}

/* Mascot List */
.mascot-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mascot-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
}

.mascot-item .mascot-rank {
  font-weight: 700;
  color: var(--primary);
  min-width: 30px;
}

.mascot-item .mascot-name {
  flex: 1;
  font-weight: 500;
}

.mascot-item .mascot-rate {
  font-weight: 700;
}

.mascot-item .mascot-rate.hot {
  color: var(--success);
}

.mascot-item .mascot-rate.cold {
  color: var(--danger);
}

.mascot-item .mascot-record {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .hint {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Analytics Mobile Responsiveness */
@media (max-width: 768px) {
  .analytics-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analytics-controls .week-selector {
    justify-content: space-between;
  }

  .analytics-controls .analytics-stats {
    justify-content: center;
  }

  .analytics-tabs {
    justify-content: flex-start;
  }

  .consensus-grid {
    grid-template-columns: 1fr;
  }

  .lock-of-week-card {
    flex-direction: column;
    text-align: center;
  }

  .lock-of-week-card .lock-stats {
    justify-content: center;
  }

  .segment-comparison {
    flex-direction: column;
  }

  .segment-card {
    max-width: 100%;
  }

  .vs-divider {
    transform: rotate(90deg);
  }

  .rankings-table th,
  .rankings-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .rankings-table .cover-col {
    display: none;
  }

  .contrarian-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ User Analytics Dashboard ============ */
.analytics-page {
  padding: 1.5rem 1rem;
}

.analytics-page .page-header {
  margin-bottom: 1.5rem;
}

.analytics-page .page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.analytics-page .page-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Metric Cards Grid */
.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .analytics-metrics {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

/* Metric Card - Soft UI Design */
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.metric-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.metric-card-value.positive {
  color: var(--data-positive);
}

.metric-card-value.negative {
  color: var(--data-negative);
}

/* Micro-copy context */
.metric-card-context {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.metric-card-context .change {
  font-weight: 600;
}

.metric-card-context .change.up {
  color: var(--data-positive);
}

.metric-card-context .change.down {
  color: var(--data-negative);
}

/* Active Exposure Card */
.exposure-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.exposure-card .metric-card-label {
  color: rgba(255,255,255,0.8);
}

.exposure-card .metric-card-value {
  color: white;
}

.exposure-card .exposure-breakdown {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.exposure-card .exposure-breakdown span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255,255,255,0.9);
}

.exposure-card .exposure-breakdown .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.exposure-card .exposure-breakdown .dot.upcoming {
  background: var(--chart-2);
}

.exposure-card .exposure-breakdown .dot.in-progress {
  background: var(--chart-3);
}

.exposure-card .exposure-breakdown .dot.awaiting {
  background: var(--chart-4);
}

/* Chart Containers */
.chart-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.chart-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.chart-section-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-container {
  position: relative;
  height: 200px;
}

@media (min-width: 768px) {
  .chart-container {
    height: 280px;
  }
}

/* Donut Chart Center Text */
.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.donut-center-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Bet History Table */
.history-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.history-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.history-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-search {
  flex: 1;
  min-width: 150px;
}

.history-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--text);
}

.history-filters select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--text);
  min-width: 100px;
}

/* History List */
.history-list {
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-team {
  flex: 1;
  min-width: 0;
}

.history-item-matchup {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-matchup .picked {
  color: var(--primary);
}

.history-item-spread {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.history-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.history-item-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.history-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.history-result-badge.win {
  background: var(--data-positive);
  color: white;
}

.history-result-badge.loss {
  background: var(--data-negative);
  color: white;
}

.history-result-badge.push {
  background: var(--warning);
  color: #1a1a1a;
}

.history-result-badge.pending {
  background: var(--text-muted);
  color: white;
}

.history-item-points {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.history-item-points.positive {
  color: var(--data-positive);
}

.history-item-points.negative {
  color: var(--data-negative);
}

/* History Footer */
.history-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.history-pagination button {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}

.history-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.view-all-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Mobile Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 500;
  transition: color 0.2s;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item:hover {
  color: var(--primary);
}

/* Add padding for bottom nav on mobile */
.analytics-page {
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .analytics-page {
    padding-bottom: 2rem;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Stats Record Display */
.stats-record {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stats-record .wins {
  color: var(--data-positive);
}

.stats-record .losses {
  color: var(--data-negative);
}

.stats-record .pushes {
  color: var(--warning);
}

/* Empty State */
.analytics-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.analytics-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.analytics-empty h3 {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.analytics-empty p {
  font-size: 0.875rem;
}

/* Haptic feedback visual indicator */
.pick-confirmed {
  animation: haptic-pulse 0.3s ease-out;
}

@keyframes haptic-pulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
}

/* ============ Admin Analytics Legend ============ */
.analytics-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.legend-title {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text);
}

.legend-bar {
  display: inline-block;
  width: 16px;
  height: 10px;
  border-radius: 2px;
}

.legend-bar.away {
  background: var(--primary);
}

.legend-bar.home {
  background: var(--secondary);
}

.legend-item .result-badge {
  font-size: 0.625rem;
  width: 18px;
  height: 18px;
}

/* Analytics Section Descriptions */
.section-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* Improve pick bar visibility */
.pick-bar.away {
  background: var(--primary);
}

.pick-bar.home {
  background: var(--secondary);
}

.pick-bar.majority {
  box-shadow: 0 0 0 2px var(--success);
}

/* Dark mode adjustments for analytics */
[data-theme="dark"] .analytics-legend {
  background: var(--bg-card);
}

/* ============ Admin Analytics Enhancements ============ */

/* Rankings Legend */
.rankings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.8125rem;
}

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

.rankings-legend .legend-color {
  width: 16px;
  height: 10px;
  border-radius: 2px;
}

.rankings-legend .legend-color.hot {
  background: var(--success);
}

.rankings-legend .legend-color.cold {
  background: var(--danger);
}

.rankings-legend .legend-text {
  color: var(--text-muted);
  font-style: italic;
}

/* Insight Box Styling */
.insight-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--radius);
  margin: 1rem 0;
}

.insight-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.insight-content {
  flex: 1;
}

.insight-content strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.insight-content p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Segment Hints */
.segment-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Hot/Cold indicators with patterns for accessibility */
.cover-bar.hot {
  background: var(--success);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.15) 3px,
    rgba(255,255,255,0.15) 6px
  );
}

.cover-bar.cold {
  background: var(--danger);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.1) 3px,
    rgba(0,0,0,0.1) 6px
  );
}

/* Dark mode adjustments */
[data-theme="dark"] .insight-box {
  background: var(--bg-card);
}

[data-theme="dark"] .rankings-legend {
  background: var(--bg-card);
}

/* Accessibility: Add text labels to color-only indicators */
.segment-card.hot::after,
.division-card.hot::after {
  content: '↑';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.75rem;
  color: var(--success);
}

.segment-card.cold::after,
.division-card.cold::after {
  content: '↓';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.75rem;
  color: var(--danger);
}

.segment-card,
.division-card {
  position: relative;
}
