/* Muffinman V2 - Mobile-First Responsive CSS */

/* ============ Google Fonts ============ */
/* font-display=swap ensures text remains visible during font loading */
@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;
}

/* Enhanced alert with content and actions */
.alert-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.alert-message {
  font-weight: 500;
}

.alert-details {
  font-size: 0.875rem;
  opacity: 0.9;
}

.alert-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.alert-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 500;
}

.alert-link:hover {
  opacity: 0.8;
}

.alert-divider {
  opacity: 0.6;
}

.alert-hint {
  opacity: 0.85;
  font-style: italic;
}

/* ============ Toast Notifications ============ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 80vh;
  overflow-y: auto;
  pointer-events: none;
}

/* Mobile: adjust toast position for safe areas */
@media (max-width: 480px) {
  .toast-container {
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    right: 12px;
    left: 12px;
    align-items: stretch;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  min-width: 280px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mobile: full-width toasts */
@media (max-width: 480px) {
  .toast {
    max-width: 100%;
    min-width: unset;
  }
}

.toast-enter {
  opacity: 1;
  transform: translateX(0);
}

.toast-exit {
  opacity: 0;
  transform: translateX(100%);
}

/* Toast types - using existing color variables with accessible contrast */
.toast-success {
  background-color: #10b981;
  color: white;
}

.toast-error {
  background-color: #ef4444;
  color: white;
}

.toast-warning {
  background-color: #f59e0b;
  color: #1a1a1a;
}

.toast-info {
  background-color: #3b82f6;
  color: white;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  margin-left: auto;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background-color 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.2);
}

.toast-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

/* Dark mode toast adjustments */
[data-theme="dark"] .toast-success {
  background-color: #059669;
}

[data-theme="dark"] .toast-error {
  background-color: #dc2626;
}

[data-theme="dark"] .toast-warning {
  background-color: #d97706;
}

[data-theme="dark"] .toast-info {
  background-color: #2563eb;
}

/* Toast container scrollbar (for many toasts) */
.toast-container::-webkit-scrollbar {
  width: 4px;
}

.toast-container::-webkit-scrollbar-track {
  background: transparent;
}

.toast-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.1s ease;
    transform: none;
  }

  .toast-enter {
    transform: none;
  }

  .toast-exit {
    transform: none;
  }
}

/* ============ Registration Success ============ */
.registration-success {
  text-align: center;
  padding: 1.5rem;
}

.registration-success .success-icon {
  color: #276749;
  margin-bottom: 1rem;
}

.registration-success .success-icon svg {
  background: #c6f6d5;
  border-radius: 50%;
  padding: 0.75rem;
}

.registration-success .success-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #276749;
  margin: 0 0 0.75rem 0;
}

.registration-success .success-message {
  font-size: 1rem;
  color: var(--text-color);
  margin: 0 0 1rem 0;
}

.registration-success .success-notice {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.registration-success .success-notice p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.registration-success .success-notice p:first-child {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.registration-success .success-actions {
  display: flex;
  justify-content: center;
}

/* ============ Auth Pages ============ */
.auth-page {
  /* Use explicit brand purple colors - not affected by dark mode */
  background: linear-gradient(135deg, #514285 0%, #3A2F60 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: #514285;
}

.auth-logo-text {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  font-weight: 400;
}

.auth-logo p {
  color: #666666;
  font-size: 0.875rem;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.auth-links a {
  color: #514285;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links .divider {
  margin: 0 0.75rem;
  color: #666666;
}

/* Auth page buttons always use brand purple */
.auth-page .btn-primary {
  background: #514285;
}

.auth-page .btn-primary:hover:not(:disabled) {
  background: #3A2F60;
}

/* Password visibility toggle */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field .form-input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: #666666;
  transition: all 150ms ease;
}

.toggle-password:hover {
  background-color: rgba(81, 66, 133, 0.1);
  color: #514285;
}

.toggle-password:focus {
  outline: 2px solid #514285;
  outline-offset: 2px;
}

.toggle-password:focus-visible {
  outline: 3px solid #514285;
  outline-offset: 2px;
}

.toggle-password .eye-icon {
  display: block;
}

/* Remember me checkbox */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px 0;
  font-size: 0.875rem;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #514285;
  border-radius: 3px;
}

.remember-me label {
  cursor: pointer;
  user-select: none;
  color: #374151;
  transition: color 150ms ease;
}

.remember-me label:hover {
  color: #514285;
}

/* Enhanced auth-card styles for polish */
.auth-card {
  transition: box-shadow 200ms ease;
}

.auth-card:focus-within {
  box-shadow: var(--shadow-lg), 0 0 0 2px rgba(81, 66, 133, 0.1);
}

/* Auth page form input focus enhancement */
.auth-page .form-input:focus {
  border-color: #514285;
  box-shadow: 0 0 0 3px rgba(81, 66, 133, 0.15);
}

/* Auth page valid input state */
.auth-page .form-input.valid {
  border-color: #10b981;
}

.auth-page .form-input.valid:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Auth page error input state */
.auth-page .form-input.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.auth-page .form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Auth page form label colors - ensures readability on white background */
.auth-page .form-label {
  color: #514285;
}

/* Auth page password requirements - ensure visibility on white background */
.auth-page .password-requirements {
  color: #666666;
}

.auth-page .password-requirement {
  color: #666666;
}

.auth-page .password-requirement.unmet {
  color: #dc3545;
}

.auth-page .password-requirement.met {
  color: #28a745;
}

/* Enhanced field error animation */
.auth-page .field-error {
  animation: slideDown 200ms ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced auth button hover */
.auth-page .btn-primary {
  transition: all 150ms ease;
}

.auth-page .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(81, 66, 133, 0.3);
}

.auth-page .btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

/* Auth links hover animation */
.auth-links a {
  position: relative;
  transition: color 200ms ease;
}

.auth-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #514285;
  transition: width 200ms ease;
}

.auth-links a:hover::after {
  width: 100%;
}

.auth-links a:hover {
  text-decoration: none;
}

/* Mobile optimizations for auth enhancements */
@media (max-width: 480px) {
  .password-field .form-input {
    padding-right: 48px;
  }

  .toggle-password {
    padding: 10px;
  }

  .remember-me {
    margin: 16px 0 20px 0;
  }

  .remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .remember-me label {
    font-size: 0.9375rem;
  }
}

.pending-message {
  text-align: center;
  padding: 1rem 0;
}

.pending-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.pending-note {
  color: #666666;
  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.25);
  box-shadow: 0 0 0 1px var(--secondary);
}

.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);
  color: var(--text);
}

.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;
}

/* Player email (admin only) */
.player-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
  margin-top: 0.125rem;
}

/* ============ 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;
}

/* User Management Actions */
.user-actions-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.user-actions-cell .btn {
  white-space: nowrap;
}

.user-action-reset {
  color: var(--warning);
  border-color: var(--warning);
}

.user-action-reset:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.1);
}

/* User Stats Summary in Edit Modal */
.user-stats-summary {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.user-stats-summary .stat {
  font-size: 0.875rem;
}

.user-stats-summary .stat strong {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

/* Removed Users Section */
.removed-users-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--warning);
}

.removed-user-row {
  opacity: 0.7;
}

.removed-user-row:hover {
  opacity: 1;
}

.badge-muted {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

/* 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; }

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.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 #514285;
}

.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: #514285;
  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 #514285;
  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(81, 66, 133, 0.15);
  border-color: #7B5BA1;
}

.lastplace-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: #514285;
  margin-bottom: 0.5rem;
}

.lastplace-lantern {
  margin-bottom: 0.5rem;
}

.purple-lantern {
  filter: drop-shadow(0 2px 6px rgba(81, 66, 133, 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: #514285;
  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 !important;
  visibility: hidden;
  opacity: 0;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline !important;
  visibility: visible;
  opacity: 1;
}

/* ============ 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;
}

/* Participant Pills (Admin View) */
.showdown-card-participants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.participant-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: var(--primary);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.vs-separator {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Admin Stats Tile */
.admin-stats-tile {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #4338ca) 100%);
  color: white;
}

.admin-stats-tile .tile-header {
  color: rgba(255, 255, 255, 0.9);
}

.admin-stats-tile .tile-footer {
  color: rgba(255, 255, 255, 0.7);
}

.admin-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
}

/* 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;
}

/* Multi-Week Badge */
.multi-week-badge,
.week-range-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  margin-left: 0.5rem;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Duration Selector (Create Showdown) */
.duration-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duration-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.duration-option:hover {
  border-color: var(--primary);
}

.duration-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(123, 91, 161, 0.05);
}

.duration-option input[type="radio"] {
  accent-color: var(--primary);
}

.duration-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.duration-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Week Range Inputs */
.week-range-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.week-range-field {
  flex: 1;
}

.week-range-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.week-range-separator {
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
}

/* Weekly Breakdown Table */
.weekly-breakdown-wrapper {
  overflow-x: auto;
}

.weekly-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 350px;
}

.weekly-breakdown-table th,
.weekly-breakdown-table td {
  padding: 0.625rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.weekly-breakdown-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  position: sticky;
  top: 0;
}

.weekly-breakdown-table .week-col {
  text-align: left;
  min-width: 90px;
}

.weekly-breakdown-table .score-col {
  width: 70px;
}

.weekly-breakdown-table .winner-col {
  min-width: 80px;
  text-align: right;
}

.week-label {
  font-weight: 500;
  font-size: 0.875rem;
}

.week-live-badge {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--warning);
  color: #975a16;
  text-transform: uppercase;
}

.week-winner {
  background: rgba(72, 187, 120, 0.15);
  font-weight: 600;
}

.current-user-col {
  background: rgba(123, 91, 161, 0.08);
}

.week-leader {
  color: var(--success);
  font-weight: 600;
  font-size: 0.8rem;
}

.week-tie {
  color: var(--warning);
  font-weight: 600;
  font-size: 0.8rem;
}

.week-upcoming {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.total-row {
  border-top: 2px solid var(--border);
  background: var(--bg);
}

.total-score {
  font-size: 1rem;
}

/* Week Navigator */
.pick-comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pick-comparison-header h2 {
  margin: 0;
}

.pick-comparison-week-select {
  max-width: 160px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .duration-selector {
    gap: 0.375rem;
  }

  .duration-option {
    padding: 0.625rem 0.75rem;
    flex-wrap: wrap;
  }

  .duration-desc {
    width: 100%;
    margin-left: 1.75rem;
    margin-top: 0.125rem;
  }

  .weekly-breakdown-table .score-col {
    width: 55px;
    font-size: 0.8rem;
  }

  .weekly-breakdown-table .winner-col {
    min-width: 60px;
    font-size: 0.75rem;
  }

  .week-range-inputs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .week-range-separator {
    text-align: center;
    padding-bottom: 0;
  }
}

/* ============ Slack-Style 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: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius);
}

/* Message with Avatar (Slack-style) */
.message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.625rem;
  border-radius: var(--radius);
  position: relative;
  transition: background 0.15s;
}

.message:hover {
  background: rgba(0, 0, 0, 0.03);
}

.message-own {
  background: rgba(81, 66, 133, 0.05);
}

.message-own:hover {
  background: rgba(81, 66, 133, 0.1);
}

.message-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-avatar .avatar-initials {
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.message-body {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.message-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-content {
  font-size: 0.9375rem;
  line-height: 1.4;
  word-wrap: break-word;
}

/* @Mention highlighting */
.message-content .mention {
  background: rgba(81, 66, 133, 0.15);
  color: var(--primary);
  padding: 0.0625rem 0.25rem;
  border-radius: 3px;
  font-weight: 500;
}

/* No messages state */
.no-messages {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.no-messages-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.no-messages p {
  margin: 0;
  font-size: 0.9375rem;
}

/* Message Input Area */
.message-form {
  position: relative;
}

.message-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.message-input-container {
  flex: 1;
  position: relative;
}

.message-input {
  width: 100%;
  padding-right: 2.5rem;
}

.emoji-picker-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: all 0.15s;
}

.emoji-picker-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.emoji-picker-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.send-btn {
  white-space: nowrap;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 70px;
}

.send-btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.send-btn[aria-busy="true"] .send-btn-text {
  opacity: 0.7;
}

.send-btn .send-btn-loading {
  display: none;
}

.send-btn.htmx-request .send-btn-loading,
.send-btn[aria-busy="true"] .send-btn-loading {
  display: inline-flex;
}

.send-btn .spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  background: var(--success, #22c55e);
}

.toast-error {
  background: var(--error, #ef4444);
}

/* Validation Error */
.validation-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error, #ef4444);
  color: var(--error, #ef4444);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* @Mention Dropdown */
.mention-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-bottom: 0.25rem;
}

.mention-dropdown.open {
  display: block;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.mention-item:hover {
  background: var(--bg);
}

.mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.mention-name {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============ Slack-Style Emoji Picker ============ */

/* Backdrop overlay */
.emoji-picker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 199;
}

.emoji-picker-overlay.open {
  display: block;
}

.emoji-picker-panel {
  display: none;
  position: fixed;
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 200;
}

.emoji-picker-panel.open {
  display: flex;
  flex-direction: column;
}

.emoji-picker-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.emoji-picker-header .emoji-search {
  flex: 1;
}

.emoji-picker-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  flex-shrink: 0;
}

.emoji-picker-close:hover {
  background: var(--bg);
  color: var(--text);
}

.emoji-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--bg);
}

.emoji-search:focus {
  outline: none;
  border-color: var(--primary);
}

.emoji-picker-tabs {
  display: flex;
  padding: 0.25rem;
  gap: 0.125rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

.emoji-tab {
  background: none;
  border: none;
  padding: 0.375rem 0.5rem;
  font-size: 1.125rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s;
  flex-shrink: 0;
}

.emoji-tab:hover {
  background: var(--bg);
}

.emoji-tab.active {
  background: var(--primary-light);
}

.emoji-picker-body {
  flex: 1;
  min-height: 0;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.emoji-category-section {
  margin-bottom: 0.75rem;
}

.emoji-category-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
  padding: 0 0.25rem;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.125rem;
}

.emoji-item {
  background: none;
  border: none;
  padding: 0.375rem;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-item:hover {
  background: var(--bg);
}

.emoji-no-results {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============ Message Reactions ============ */
.message-reactions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  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.8125rem;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.reaction-badge:hover {
  background: rgba(81, 66, 133, 0.1);
  border-color: var(--primary);
}

.reaction-badge.user-reacted {
  background: rgba(81, 66, 133, 0.15);
  border-color: var(--primary);
}

.reaction-count {
  font-size: 0.75rem;
  font-weight: 500;
}

.reaction-add-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 26px;
  height: 26px;
  cursor: pointer;
  transition: all 0.15s;
  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);
}

/* Slack-style Hover Reaction Bar */
.reaction-hover-bar {
  position: absolute;
  top: -12px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  display: none;
  gap: 0.125rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.reaction-hover-bar.visible {
  display: flex;
}

.reaction-form-quick {
  display: inline-block;
}

.reaction-quick-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reaction-quick-btn:hover {
  background: var(--bg);
}

.reaction-more-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.375rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.reaction-more-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

/* Expanded Reaction Picker */
.reaction-expanded-picker {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  z-index: 50;
  margin-top: 0.25rem;
}

.reaction-expanded-picker.open {
  display: block;
}

.reaction-expanded-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.125rem;
  max-width: 280px;
}

.reaction-expanded-btn {
  background: none;
  border: none;
  padding: 0.375rem;
  font-size: 1.125rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.reaction-expanded-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 Slack-style trash talk */
  .trash-talk-section {
    padding: 0.75rem;
  }

  .messages-container {
    max-height: 300px;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
  }

  .message-avatar .avatar-initials {
    font-size: 0.75rem;
  }

  .message-input-wrapper {
    flex-wrap: wrap;
  }

  .message-input-container {
    width: 100%;
    order: 1;
  }

  .emoji-picker-btn {
    order: 2;
    min-width: 44px;
    min-height: 44px;
  }

  .send-btn {
    order: 3;
    min-height: 44px;
    flex: 1;
  }

  /* Mobile toast positioning */
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    align-items: stretch;
  }

  .toast {
    max-width: none;
    transform: translateY(100%);
  }

  .toast.show {
    transform: translateY(0);
  }

  /* Mobile emoji picker - full width modal */
  .emoji-picker-panel {
    width: calc(100vw - 2rem);
    max-width: none;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }

  .emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .emoji-item {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.375rem;
  }

  /* Mobile reactions */
  .reaction-badge {
    min-height: 32px;
    padding: 0.25rem 0.625rem;
  }

  .reaction-add-btn {
    width: 32px;
    height: 32px;
  }

  .reaction-hover-bar {
    position: static;
    margin-top: 0.375rem;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    display: none;
  }

  .message:active .reaction-hover-bar {
    display: flex;
  }

  .reaction-quick-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 1.125rem;
  }

  .reaction-expanded-grid {
    grid-template-columns: repeat(6, 1fr);
    max-width: 240px;
  }

  .reaction-expanded-btn {
    min-width: 36px;
    min-height: 36px;
  }

  /* Mobile mention dropdown */
  .mention-dropdown {
    max-height: 150px;
  }

  .mention-item {
    min-height: 44px;
  }

  /* 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) {
  /* Active states for tactile feedback on touch */
  .btn:active,
  .showdown-card:active,
  .game-card:active:not(.locked),
  .team:active:not(.disabled),
  .emoji-btn:active,
  .reaction-badge:active,
  .reaction-picker-btn:active,
  .card:active,
  .message:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  /* Remove hover states on touch devices - hover doesn't apply */
  .btn:hover,
  .showdown-card:hover,
  .game-card:hover,
  .team:hover,
  .card:hover,
  .message:hover,
  .user-menu-item:hover,
  .alert-close:hover,
  .modal-close:hover {
    transform: none;
    box-shadow: inherit;
  }

  /* Keep essential visual feedback without transform */
  .team:hover:not(.disabled) {
    border-color: var(--border);
  }

  .team.selected {
    border-color: var(--secondary);
    background: rgba(123,91,161,0.25);
    box-shadow: 0 0 0 1px var(--secondary);
  }
}

/* Disabled button state */
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
/* ============ 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;
}

/* Password Input with Visibility Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-input {
  padding-right: 2.75rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: color 0.2s, background-color 0.2s;
}

.password-toggle-btn:hover {
  color: var(--text);
  background-color: var(--bg-subtle);
}

.password-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.password-toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--primary);
}

.password-toggle-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Email Change Section */
.email-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.email-label {
  color: var(--text-muted);
}

.email-value {
  font-weight: 500;
}

.email-change-details {
  margin-top: 0.5rem;
}

.email-change-toggle {
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  padding: 0.5rem 0;
  user-select: none;
}

.email-change-toggle:hover {
  color: var(--primary-dark);
}

.email-change-form {
  padding-top: 1rem;
}

.email-change-form .form-group {
  margin-bottom: 1rem;
}

.email-change-form .btn {
  margin-top: 0.5rem;
}

/* Pending Email Change State */
.email-pending-section {
  margin-top: 0.5rem;
}

.email-pending-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--warning-bg, rgba(245, 158, 11, 0.1));
  border: 1px solid var(--warning-border, rgba(245, 158, 11, 0.3));
  border-radius: var(--radius);
  color: var(--text);
}

.email-pending-alert.email-pending-success {
  background: var(--success-bg, rgba(16, 185, 129, 0.1));
  border-color: var(--success-border, rgba(16, 185, 129, 0.3));
}

.email-pending-icon {
  flex-shrink: 0;
  color: var(--warning, #f59e0b);
  margin-top: 0.125rem;
}

.email-pending-success .email-pending-icon {
  color: var(--success, #10b981);
}

.email-pending-content {
  flex: 1;
  min-width: 0;
}

.email-pending-content strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.email-pending-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.email-pending-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.email-pending-actions .btn {
  font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
}

#email-result {
  margin-top: 0.75rem;
}

/* Email Confirmation Page */
.email-confirm-details {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1.5rem 0;
}

.email-confirm-details.success {
  background: var(--success-bg, rgba(16, 185, 129, 0.1));
  border: 1px solid var(--success-border, rgba(16, 185, 129, 0.2));
}

.email-confirm-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-confirm-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.email-confirm-value {
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
}

.email-confirm-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0;
  line-height: 1.5;
}

.email-confirm-note strong {
  color: var(--text);
}

/* Success/Error Icons for Auth Pages */
.success-icon,
.error-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.success-icon svg {
  color: var(--success, #10b981);
}

.error-icon svg {
  color: var(--danger, #ef4444);
}

/* 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;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

/* Reset Button - Hover State */
.reset-btn:hover:not(:disabled):not(.htmx-request) {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reset-btn:active:not(:disabled):not(.htmx-request) {
  transform: translateY(0);
  box-shadow: none;
}

/* Reset Button Text States - Default visibility */
.reset-btn-text {
  display: inline-flex;
  align-items: center;
}

.reset-btn-loading,
.reset-btn-success {
  display: none;
  align-items: center;
  gap: 0.375rem;
}

/* Reset Button - Loading State */
.reset-btn.htmx-request {
  opacity: 0.8;
  cursor: wait;
  pointer-events: none;
}

.reset-btn.htmx-request .reset-btn-text {
  display: none;
}

.reset-btn.htmx-request .reset-btn-loading {
  display: inline-flex;
}

/* Spinner animation */
.reset-spinner {
  animation: spin 1s linear infinite;
}

/* Reset Button - Success State */
.reset-btn.reset-success {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.reset-btn.reset-success .reset-btn-text,
.reset-btn.reset-success .reset-btn-loading {
  display: none;
}

.reset-btn.reset-success .reset-btn-success {
  display: inline-flex;
}

/* Reset Button - Error State */
.reset-btn.reset-error {
  border-color: var(--danger);
  color: var(--danger);
}

/* Reset result messages */
.reset-success-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.reset-error-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section Description */
.section-desc {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ============ Session Activity ============ */
.session-section {
  margin-bottom: 1.5rem;
}

.session-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.session-card-current {
  border-color: var(--primary);
  border-width: 2px;
}

.session-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.session-device-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.session-info {
  flex: 1;
  min-width: 0;
}

.session-device-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.session-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.session-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.session-details {
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.session-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.session-detail-label {
  color: var(--text-muted);
}

.session-detail-value {
  font-weight: 500;
}

.session-active-now {
  color: var(--success);
}

.session-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.session-actions-global {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.session-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.session-privacy-notice {
  margin-top: 1rem;
}

.text-small {
  font-size: 0.75rem;
}

/* 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%;
  }

  /* Session Activity Mobile */
  .session-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-device-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .session-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
  }

  .session-actions .btn,
  .session-actions-global .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: #f9fafb;
}


/* 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;
}

/* Flexible datetime input enhancements */
.flexible-datetime-input {
  font-family: inherit;
}

.flexible-datetime-input.valid {
  border-color: #22c55e;
  background-color: rgba(34, 197, 94, 0.05);
}

.flexible-datetime-input.error {
  border-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.05);
}

.datetime-error {
  display: block;
  color: #ef4444;
  font-size: 0.7rem;
  margin-top: 0.125rem;
  line-height: 1.3;
}

.datetime-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-top: 0.125rem;
  line-height: 1.3;
}

/* Hide hint when input has value */
.flexible-datetime-input:not(:placeholder-shown) + .datetime-error + .datetime-hint,
.flexible-datetime-input:not(:placeholder-shown) + .datetime-hint {
  display: none;
}

/* Show hint on focus */
.flexible-datetime-input:focus + .datetime-error + .datetime-hint,
.flexible-datetime-input:focus + .datetime-hint {
  display: block;
}

/* Dark mode support for datetime inputs */
.dark .flexible-datetime-input.valid {
  background-color: rgba(34, 197, 94, 0.1);
}

.dark .flexible-datetime-input.error {
  background-color: rgba(239, 68, 68, 0.1);
}

/* 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 - neutral background for completed games */
.row-final .score-team-row {
  background: #f3f4f6;
}

/* Winner vs spread - light green score box */
.score-input.score-win {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

/* Loser vs spread - light red score box */
.score-input.score-loss {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

/* Push - neutral styling */
.score-input.score-push {
  background: #fef9c3 !important;
  border-color: #fde047 !important;
  color: #854d0e !important;
}

/* Status column */
.col-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.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;
}

/* Admin game status badges - scoped to avoid conflicts with showdown status styles */
.game-status-final {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.game-status-locked {
  display: inline-flex;
  align-items: center;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.game-status-active {
  display: inline-flex;
  align-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.game-status-none {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.status-picks {
  color: var(--text-muted);
  font-size: 0.7rem;
  background: #e5e7eb;
  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 .datetime-hint,
.add-game-form .datetime-error {
  font-size: 0.7rem;
  margin-top: 0.125rem;
}

.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;
}

/* ============ Best/Worst Bets Highlight Cards ============ */
.bets-highlight-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bets-highlight-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}

.bets-highlight-card.best-bets {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, var(--bg-card) 100%);
}

.bets-highlight-card.worst-bets {
  border-color: var(--danger);
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, var(--bg-card) 100%);
}

.bets-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.bets-icon {
  font-size: 1.25rem;
}

.bets-card-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.bets-card-content {
  min-height: 80px;
}

.bets-card-content .no-bets {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem 0;
  margin: 0;
}

.bets-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bet-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.bet-rank {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.bet-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bet-team .team-badge {
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.bet-team .team-badge.away {
  background: #2a9d8f;
}

.bet-team .team-badge.home {
  background: #9b7bc1;
}

.bet-team .team-name {
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bet-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.bet-stats .pick-pct {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.bet-stats .pick-count {
  font-size: 0.625rem;
  color: var(--text-muted);
}

.bet-item .result-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  color: white;
  min-width: 20px;
  text-align: center;
}

.bet-item .result-badge.win {
  background: var(--success);
}

.bet-item .result-badge.loss {
  background: var(--danger);
}

/* 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 .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.consensus-card .game-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.consensus-card .final-badge {
  background: var(--primary);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.consensus-card .team-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.consensus-card .team-info {
  width: 130px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.consensus-card .team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.consensus-card .team-abbrev {
  font-weight: 600;
}

.consensus-card .team-score {
  font-weight: 700;
  color: var(--primary);
}

.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: #2a9d8f;
}

.consensus-card .pick-bar.home {
  background: #9b7bc1;
}

.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 {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 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;
}

/* Reusable Empty State Container */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state-container.compact {
  min-height: 200px;
  padding: 30px 20px;
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state-icon svg {
  width: 64px;
  height: 64px;
}

.empty-state-icon .emoji-icon {
  font-size: 64px;
  line-height: 1;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}

.empty-state-description {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.empty-state-container .btn {
  min-width: 150px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .empty-state-container {
    min-height: 200px;
    padding: 30px 15px;
  }

  .empty-state-icon svg {
    width: 48px;
    height: 48px;
  }

  .empty-state-icon .emoji-icon {
    font-size: 48px;
  }

  .empty-state-title {
    font-size: 18px;
  }

  .empty-state-description {
    max-width: 100%;
    font-size: 13px;
  }
}

/* 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;
  }

  .bets-highlight-container {
    grid-template-columns: 1fr;
  }

  .bet-item {
    gap: 0.375rem;
  }

  .bet-team .team-name {
    font-size: 0.75rem;
    max-width: 100px;
  }

  .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);
}

/* Current Week Card */
.current-week-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.current-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.current-week-label {
  font-size: 1.125rem;
  font-weight: 600;
}

.current-week-record {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
}

.current-week-empty {
  text-align: center;
  padding: 1rem 0;
}

.current-week-empty p {
  margin-bottom: 0.75rem;
  color: rgba(255,255,255,0.85);
}

.current-week-empty .current-week-hint {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.current-week-empty .btn-sm {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.current-week-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.team-pick-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.team-pick-badge:hover {
  transform: scale(1.1);
}

.team-pick-badge.win {
  border-color: var(--data-positive);
  background: rgba(52, 199, 89, 0.2);
}

.team-pick-badge.loss {
  border-color: var(--data-negative);
  background: rgba(255, 69, 58, 0.2);
}

.team-pick-badge.push {
  border-color: var(--chart-3);
  background: rgba(255, 214, 10, 0.2);
}

.team-pick-badge.pending {
  border-color: rgba(255,255,255,0.3);
}

.team-pick-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.team-pick-abbrev {
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.result-indicator {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: white;
}

.result-indicator.win {
  background: var(--data-positive);
}

.result-indicator.loss {
  background: var(--data-negative);
}

.result-indicator.push {
  background: var(--chart-3);
  color: #000;
}

/* Team Selection Legend */
.team-selection-legend {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.team-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-legend-abbrev {
  font-weight: 600;
  min-width: 2.5rem;
}

.team-legend-record {
  color: var(--text-muted);
}

.team-legend-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Team Selection Diverging Bar Chart */
.team-diverging-chart {
  padding: 0.5rem 0;
}

.diverging-axis-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.axis-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.axis-label.left {
  text-align: right;
}

.axis-label.center {
  text-align: center;
  min-width: 70px;
}

.axis-label.right {
  text-align: left;
}

.diverging-chart-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.diverging-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  min-height: 32px;
}

.diverging-left {
  display: flex;
  justify-content: flex-end;
}

.diverging-right {
  display: flex;
  justify-content: flex-start;
}

.diverging-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 70px;
  padding: 0 0.25rem;
}

.team-logo-small {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.team-abbrev-badge {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
}

.team-name-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  min-width: 2rem;
}

.bar-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 120px;
}

.bar-container.left {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.bar-container.right {
  flex-direction: row;
  justify-content: flex-start;
}

.bar {
  height: 20px;
  border-radius: 3px;
  min-width: 2px;
  transition: width 0.3s ease;
}

.win-bar {
  background: linear-gradient(90deg, var(--data-positive) 0%, #2ecc71 100%);
}

.loss-bar {
  background: linear-gradient(90deg, #e74c3c 0%, var(--data-negative) 100%);
}

.bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 1.25rem;
}

.bar-value.left {
  text-align: right;
  margin-right: 0.375rem;
}

.bar-value.right {
  text-align: left;
  margin-left: 0.375rem;
}

.diverging-summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.summary-stat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.summary-divider {
  color: var(--border);
}

@media (min-width: 640px) {
  .bar-container {
    max-width: 150px;
  }

  .diverging-center {
    min-width: 90px;
  }

  .team-name-label {
    min-width: 2.5rem;
  }
}

/* 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: #2a9d8f;
}

.legend-bar.home {
  background: #9b7bc1;
}

.legend-item .result-badge {
  font-size: 0.625rem;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-weight: 700;
  color: white;
}

.legend-item .result-badge.win {
  background: var(--success);
}

.legend-item .result-badge.loss {
  background: var(--danger);
}

.legend-item .result-badge.push {
  background: var(--warning);
  color: #333;
}

/* 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: #2a9d8f;
}

.pick-bar.home {
  background: #9b7bc1;
}

.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;
}

/* ============================================
   Spread Change Confirmation Modal
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card, #fff);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted, #6b7280);
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary, #111827);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* Impact Summary */
.impact-summary {
  margin-bottom: 1.5rem;
}

.impact-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger, #dc2626);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.impact-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--primary, #2563eb);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
}

/* Impact Details */
.impact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.impact-game {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 1rem;
}

.impact-game-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.impact-game-id {
  font-weight: 600;
  color: var(--text-primary);
}

.impact-spread-change {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.impact-pick-count {
  font-size: 0.75rem;
  background: var(--primary, #6366f1);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}

/* Impact Table */
.impact-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.impact-table th,
.impact-table td {
  padding: 0.5rem;
  text-align: left;
}

.impact-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.impact-table td {
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}

.impact-table tr:last-child td {
  border-bottom: none;
}

/* Result Colors */
.impact-win {
  color: var(--success, #16a34a);
  font-weight: 600;
}

.impact-loss {
  color: var(--danger, #dc2626);
  font-weight: 600;
}

.impact-push {
  color: var(--warning, #ca8a04);
  font-weight: 600;
}

.impact-pending {
  color: var(--text-muted, #6b7280);
}

.impact-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Dark mode */
[data-theme="dark"] .modal-content {
  background: var(--bg-card);
}

[data-theme="dark"] .impact-game {
  background: var(--bg-secondary);
}

[data-theme="dark"] .modal-close:hover {
  color: var(--text-primary);
}

/* ============================================
   Reset Confirmation Dialog
   ============================================ */

.reset-confirmation-dialog .reset-dialog-content {
  max-width: 420px;
}

.reset-dialog-warning {
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}

.reset-dialog-affected {
  background: var(--bg-elevated, #f9fafb);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.reset-dialog-affected-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
}

.reset-dialog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reset-dialog-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.reset-dialog-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reset-dialog-list li:first-child {
  padding-top: 0;
}

.reset-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Reset dialog footer buttons */
.reset-confirmation-dialog .modal-footer {
  gap: 0.75rem;
}

.reset-confirmation-dialog .modal-footer .btn {
  min-width: 100px;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
}

.reset-confirmation-dialog .btn-danger {
  background: var(--danger, #dc2626);
  color: white;
  border-color: var(--danger, #dc2626);
}

.reset-confirmation-dialog .btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Dark mode styles */
[data-theme="dark"] .reset-dialog-affected {
  background: var(--bg-secondary);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .reset-confirmation-dialog .reset-dialog-content {
    max-width: calc(100vw - 2rem);
    margin: 1rem;
  }

  .reset-confirmation-dialog .modal-header {
    padding: 1rem;
  }

  .reset-confirmation-dialog .modal-body {
    padding: 1rem;
  }

  .reset-confirmation-dialog .modal-footer {
    padding: 1rem;
    flex-direction: column-reverse;
  }

  .reset-confirmation-dialog .modal-footer .btn {
    width: 100%;
  }
}

/* ============ Sync Approval Modal ============ */
.modal-lg {
  max-width: 800px;
}

.sync-section {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.sync-section:last-child {
  margin-bottom: 0;
}

.sync-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.sync-section-header h4 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.sync-section-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

.sync-section-icon.auto {
  background: rgba(72, 187, 120, 0.2);
  color: var(--success);
}

.sync-section-icon.approval {
  background: rgba(237, 137, 54, 0.2);
  color: #ed8936;
}

.sync-section-icon.skipped {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.sync-section-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-left: auto;
}

.sync-approval-controls {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sync-changes-table-wrapper {
  overflow-x: auto;
}

.sync-changes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sync-changes-table th,
.sync-changes-table td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.sync-changes-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.sync-changes-table td {
  border-bottom: 1px solid var(--border);
}

.sync-changes-table tr:last-child td {
  border-bottom: none;
}

.sync-changes-table tr.new-game {
  background: rgba(72, 187, 120, 0.05);
}

.sync-changes-table .checkbox-col {
  width: 50px;
  text-align: center;
}

.sync-changes-table .matchup-cell {
  font-weight: 500;
}

.sync-changes-table .matchup-cell .team {
  font-weight: 600;
}

.sync-changes-table .matchup-cell .at {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.sync-changes-table .arrow-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.sync-changes-table .spread-cell,
.sync-changes-table .score-cell {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.sync-changes-table .spread-cell.current,
.sync-changes-table .score-cell.current {
  color: var(--text-muted);
}

.sync-changes-table .spread-cell.new,
.sync-changes-table .score-cell.new {
  color: var(--primary);
  font-weight: 600;
}

.sync-changes-table .status-cell {
  text-align: right;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-new {
  background: rgba(72, 187, 120, 0.15);
  color: var(--success);
}

.badge-live {
  background: rgba(66, 153, 225, 0.15);
  color: var(--info);
}

.badge-empty {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.badge-final {
  background: rgba(245, 101, 101, 0.15);
  color: var(--danger);
}

.badge-exists {
  background: rgba(237, 137, 54, 0.15);
  color: #ed8936;
}

/* Skipped list */
.sync-skipped-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skipped-game {
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
}

/* No changes state */
.sync-no-changes {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Sync result messages */
.sync-info {
  color: var(--info);
}

/* Dark mode sync styles */
[data-theme="dark"] .sync-section {
  border-color: var(--border);
}

[data-theme="dark"] .sync-section-header {
  background: var(--bg-elevated);
}

[data-theme="dark"] .sync-changes-table th {
  background: var(--bg-elevated);
}

[data-theme="dark"] .sync-changes-table tr.new-game {
  background: rgba(72, 187, 120, 0.08);
}

/* ============ Admin Selections Page ============ */
.selections-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.selections-summary .summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.selections-summary .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.selections-summary .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.user-filter label {
  font-weight: 500;
}

.user-filter select {
  min-width: 200px;
}

.selections-games-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.selections-game-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.selections-game-card.final {
  border-left: 4px solid var(--success);
}

.selections-game-card.locked {
  border-left: 4px solid var(--warning);
}

.selections-game-card.open {
  border-left: 4px solid var(--info);
}

.selections-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  font-size: 0.875rem;
}

.selections-game-header .game-status-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.selections-game-header .game-status-badge.final {
  background: rgba(72, 187, 120, 0.15);
  color: var(--success);
}

.selections-game-header .game-status-badge.locked {
  background: rgba(236, 201, 75, 0.15);
  color: var(--warning);
}

.selections-game-header .game-status-badge.open {
  background: rgba(66, 153, 225, 0.15);
  color: var(--info);
}

.selections-game-header .game-time {
  color: var(--text-muted);
}

.selections-game-header .pick-count {
  color: var(--text-muted);
}

.selections-game-body {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  align-items: stretch;
}

.selections-game-body .team-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.selections-game-body .team-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selections-game-body .team-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.selections-game-body .team-details {
  display: flex;
  flex-direction: column;
}

.selections-game-body .team-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.selections-game-body .team-spread {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.selections-game-body .vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

.selections-game-body .pickers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  min-height: 32px;
  align-content: flex-start;
}

.selections-game-body .no-pickers {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
}

.selections-game-body .picker-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* User chips */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.user-chip:hover {
  background: var(--border);
}

.user-chip.win {
  background: rgba(72, 187, 120, 0.15);
}

.user-chip.loss {
  background: rgba(245, 101, 101, 0.15);
}

.user-chip.push {
  background: rgba(236, 201, 75, 0.15);
}

.user-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.user-chip-initial {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
}

.user-chip-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-badge {
  font-weight: 700;
  font-size: 0.625rem;
  margin-left: 0.125rem;
}

.result-badge.win {
  color: var(--success);
}

.result-badge.loss {
  color: var(--danger);
}

.result-badge.push {
  color: var(--warning);
}

.result-badge.pending {
  color: var(--text-muted);
}

/* User Selections Modal */
.user-selections-modal {
  max-width: 500px;
  width: 100%;
}

.user-modal-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-modal-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
}

.user-modal-title h3 {
  margin: 0;
  font-size: 1.125rem;
}

.user-modal-title .user-email {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.user-week-stats {
  margin-bottom: 1.5rem;
}

.user-week-stats h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.stats-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stats-row .stat {
  font-size: 0.875rem;
}

.stats-row .stat.win strong {
  color: var(--success);
}

.stats-row .stat.loss strong {
  color: var(--danger);
}

.stats-row .stat.push strong {
  color: var(--warning);
}

.stats-row .stat.total strong {
  color: var(--primary);
}

.picks-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.picks-detail-table th,
.picks-detail-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.picks-detail-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.picks-detail-table .team-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.picks-detail-table .team-logo-sm {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.picks-detail-table tr.win {
  background: rgba(72, 187, 120, 0.05);
}

.picks-detail-table tr.loss {
  background: rgba(245, 101, 101, 0.05);
}

.picks-detail-table tr.push {
  background: rgba(236, 201, 75, 0.05);
}

.picks-detail-table .result-cell.win {
  color: var(--success);
  font-weight: 600;
}

.picks-detail-table .result-cell.loss {
  color: var(--danger);
  font-weight: 600;
}

.picks-detail-table .result-cell.push {
  color: var(--warning);
  font-weight: 600;
}

.picks-detail-table .result-cell.pending {
  color: var(--text-muted);
}

/* ============ User-Facing Weekly Picks Grid ============ */
.weekly-breakdown-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.weekly-picks-section h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.weekly-picks-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.picks-grid-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.picks-grid-empty .hint {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.picks-grid-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.picks-grid-card.final {
  border-left: 3px solid var(--success);
}

.picks-grid-card.locked {
  border-left: 3px solid var(--warning);
}

.picks-grid-card.open {
  border-left: 3px solid var(--info);
}

.picks-grid-status {
  display: flex;
  justify-content: flex-end;
  padding: 0.375rem 0.75rem;
  background: var(--bg-elevated);
}

.picks-grid-status .status-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.picks-grid-status .status-badge.final {
  background: rgba(72, 187, 120, 0.15);
  color: var(--success);
}

.picks-grid-status .status-badge.locked {
  background: rgba(236, 201, 75, 0.15);
  color: var(--warning);
}

.picks-grid-status .status-badge.open {
  background: rgba(66, 153, 225, 0.15);
  color: var(--info);
}

.picks-grid-body {
  display: flex;
  padding: 0.75rem;
  gap: 0.5rem;
  align-items: stretch;
}

.picks-grid-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.picks-grid-team.winner {
  background: rgba(72, 187, 120, 0.1);
}

.picks-grid-team .team-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.picks-grid-team .team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.picks-grid-team .team-abbrev {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
}

.picks-grid-team .team-meta {
  display: flex;
  flex-direction: column;
}

.picks-grid-team .team-name {
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.2;
}

.picks-grid-team .team-spread {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.picks-grid-team .pickers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 28px;
}

.picks-grid-team .no-pickers {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.picks-grid-team .picker-count {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Picker bubbles */
.picker-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
}

.picker-bubble.win {
  border-color: var(--success);
}

.picker-bubble.loss {
  border-color: var(--danger);
}

.picker-bubble.push {
  border-color: var(--warning);
}

.picker-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.picker-initial {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--primary);
}

.picker-result {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.picker-result.win {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.picker-result.loss {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.picker-result.push {
  background: var(--warning);
  color: #333;
  border-color: var(--warning);
}

/* Game center divider */
.game-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 0 0.25rem;
}

.game-center .at-symbol {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.game-center .game-info {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .picks-grid-body {
    flex-direction: column;
  }

  .game-center {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .picks-grid-team .team-header {
    flex-direction: row;
  }

  .selections-game-body {
    flex-direction: column;
  }

  .selections-game-body .vs-divider {
    padding: 0.5rem 0;
  }

  .user-chip-name {
    display: none;
  }

  .user-chip {
    padding: 0.125rem;
  }
}

/* Dark mode overrides */
[data-theme="dark"] .selections-game-card,
[data-theme="dark"] .picks-grid-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .selections-game-header,
[data-theme="dark"] .picks-grid-status {
  background: var(--bg-elevated);
}

[data-theme="dark"] .user-chip {
  background: var(--bg-elevated);
}

[data-theme="dark"] .user-chip:hover {
  background: var(--border);
}

[data-theme="dark"] .picks-grid-team {
  background: var(--bg-elevated);
}

[data-theme="dark"] .picker-bubble {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .picker-result {
  background: var(--bg-card);
/* ============================================================================
   MOBILE RESPONSIVE DESIGN
   ============================================================================ */

/* ============ Touch Target Optimization ============ */

/* Minimum 44x44px touch targets */
.btn {
  min-height: 44px;
  min-width: 44px;
}

.btn-sm {
  min-height: 36px;
  min-width: 36px;
}

/* Form inputs touch optimization */
.form-input,
select.form-input {
  min-height: 44px;
  font-size: 16px; /* Prevents iOS zoom */
}

/* Notification bell touch target */
.notification-bell-btn {
  min-width: 44px;
  min-height: 44px;
}

/* User menu touch target */
.user-menu-toggle {
  min-height: 44px;
}

/* User menu items touch target */
.user-menu-item {
  min-height: 44px;
}

/* ============ Mobile Button Styles ============ */
@media (max-width: 480px) {
  /* Full-width buttons on mobile */
  .btn-mobile-full {
    width: 100%;
  }

  /* Stack button groups vertically */
  .btn-group-mobile {
    flex-direction: column;
    width: 100%;
  }

  .btn-group-mobile .btn {
    width: 100%;
  }

  /* Page header buttons */
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header .btn {
    width: 100%;
  }

  /* Picks summary */
  .picks-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .picks-summary .btn {
    width: 100%;
  }
}

/* ============ Mobile Team Card Layout ============ */
@media (max-width: 480px) {
  .game-card {
    padding: 0.75rem;
  }

  .game-matchup {
    flex-direction: column;
    gap: 0.5rem;
  }

  .team {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.875rem;
    min-height: 60px;
  }

  .team-info {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .team-logo {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
  }

  .team-abbrev {
    font-size: 1.125rem;
  }

  .team-spread {
    font-size: 0.875rem;
  }

  .team-score {
    font-size: 1.5rem;
  }

  .vs-divider {
    display: none;
  }

  /* Add "vs" indicator between teams */
  .game-matchup .team:first-child::after {
    content: 'vs';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
    position: absolute;
    bottom: -0.875rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .game-matchup {
    position: relative;
  }
}

/* ============ Mobile Table Styles ============ */
@media (max-width: 639px) {
  /* Standings table mobile view */
  .standings-table {
    font-size: 0.875rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.625rem 0.375rem;
  }

  /* Hide less important columns on small screens */
  .standings-table .hide-mobile {
    display: none;
  }

  /* Users table mobile view */
  .users-table th,
  .users-table td {
    padding: 0.625rem 0.375rem;
    font-size: 0.875rem;
  }

  .users-table .hide-mobile {
    display: none;
  }

  /* User actions stack on mobile */
  .user-actions-cell {
    flex-direction: column;
    gap: 0.375rem;
  }

  .user-actions-cell .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============ Mobile Notification Dropdown ============ */
@media (max-width: 480px) {
  .notification-dropdown {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    max-height: calc(100vh - var(--header-height) - 1rem);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  .notification-dropdown-content {
    max-height: calc(100vh - var(--header-height) - 8rem);
  }

  .notification-item {
    padding: 1rem;
  }
}

/* ============ Mobile Form Optimization ============ */
@media (max-width: 480px) {
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-label {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
  }

  .form-input {
    padding: 0.75rem;
  }

  /* Auth card padding on small screens */
  .auth-card {
    padding: 1.5rem 1rem;
  }

  /* Full-width form buttons */
  .auth-card .btn {
    width: 100%;
  }

  .auth-links {
    font-size: 0.9375rem;
  }
}

/* ============ Mobile Header Adjustments ============ */
@media (max-width: 480px) {
  .header-content {
    padding: 0 0.75rem;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .header-actions {
    gap: 0.25rem;
  }

  /* Hide user name on very small screens */
  .user-menu-toggle-name {
    display: none;
  }
}

/* ============ Extra Small Screen Optimizations (320px) ============ */
@media (max-width: 359px) {
  .container {
    padding: 0.75rem;
  }

  .game-card {
    padding: 0.625rem;
  }

  .team {
    padding: 0.625rem;
  }

  .team-logo {
    width: 28px;
    height: 28px;
  }

  .team-abbrev {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.125rem;
  }
}

/* ============ Small Phone Breakpoint (360px - 479px) ============ */
/* Optimized for iPhone SE, iPhone 12 mini, and similar 375px devices */
@media (min-width: 360px) and (max-width: 479px) {
  .container {
    padding: 0.875rem;
  }

  .game-card {
    padding: 0.75rem;
  }

  .team {
    padding: 0.75rem;
    min-height: 56px;
  }

  .team-logo {
    width: 32px;
    height: 32px;
  }

  .team-abbrev {
    font-size: 1.0625rem;
  }

  /* Optimize picks summary for 375px */
  .picks-summary {
    padding: 0.875rem;
  }

  /* Standings table optimization */
  .standings-table th,
  .standings-table td {
    padding: 0.5rem 0.25rem;
  }

  /* Better button spacing */
  .btn {
    padding: 0.625rem 0.875rem;
  }

  /* Auth card padding */
  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  /* Week selector compact layout */
  .week-selector select {
    min-width: 100px;
    font-size: 0.8125rem;
  }
}

/* ============ Tablet Breakpoint (480px - 768px) ============ */
@media (min-width: 480px) and (max-width: 767px) {
  .games-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .game-matchup {
    flex-direction: column;
  }

  .vs-divider {
    display: none;
  }
}

/* ============ Logo Text Visibility ============ */
@media (min-width: 480px) {
  .logo-text {
    display: inline;
  }
}

/* ============ Safe Area Insets for Notched Devices ============ */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  header {
    padding-left: max(0, env(safe-area-inset-left));
    padding-right: max(0, env(safe-area-inset-right));
  }
}

/* ============ UI Animations & Visual Polish ============ */

/* -- Button Hover/Click Effects -- */
.btn {
  position: relative;
  transform: translateY(0);
  transition: all 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  transition-duration: 50ms;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(81, 66, 133, 0.3);
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

/* Button loading pulse animation */
.btn.loading {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

/* Button error shake animation */
.btn.error-shake {
  animation: shake 400ms ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Button success pulse */
.btn.success-pulse {
  animation: successPulse 300ms ease;
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* -- Game Card Hover Effects -- */
.game-card {
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.game-card:hover:not(.locked) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.game-card:active:not(.locked) {
  transform: translateY(0) scale(0.99);
  transition-duration: 50ms;
}

/* Team selection hover/active effects */
.team {
  transition: all 150ms ease;
  position: relative;
  overflow: hidden;
}

.team:hover:not(.disabled) {
  transform: scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(81, 66, 133, 0.15);
}

.team:active:not(.disabled) {
  transform: scale(0.98);
  transition-duration: 50ms;
}

.team.selected {
  animation: selectPulse 200ms ease;
}

@keyframes selectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Selection border glow effect */
.team.selected::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--secondary);
  pointer-events: none;
  opacity: 1;
}

/* -- Input Focus Enhancements -- */
.form-input {
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.form-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(81, 66, 133, 0.1);
}

/* Input error state */
.form-input.error,
.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
  background-color: rgba(245, 101, 101, 0.05);
}

.form-input.error:focus,
.form-input:invalid:not(:placeholder-shown):focus {
  outline-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.1);
}

/* -- Alert Entrance Animations -- */
.alert {
  animation: alertSlideIn 300ms ease;
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Alert dismissal animation */
.alert.dismissing {
  animation: alertSlideOut 200ms ease forwards;
}

@keyframes alertSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Alert close button hover */
.alert-close {
  transition: opacity 150ms ease, transform 150ms ease;
}

.alert-close:hover {
  transform: scale(1.1);
}

/* -- Trash Talk Message Animations -- */
.message {
  animation: messageEnter 300ms ease;
}

@keyframes messageEnter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* New message highlight effect */
.message.new-message {
  animation: messageEnter 300ms ease, messageHighlight 2s ease;
}

@keyframes messageHighlight {
  0%, 100% { background: transparent; }
  20%, 50% { background: rgba(81, 66, 133, 0.1); }
}

/* Message hover effect enhancement */
.message {
  transition: background 150ms ease, transform 150ms ease;
}

.message:hover {
  transform: translateX(2px);
}

/* -- Showdown Card Enhancements -- */
.showdown-card {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  cursor: pointer;
}

.showdown-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.showdown-card:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 50ms;
}

.showdown-card.invited:hover {
  border-left-color: var(--warning);
  box-shadow: 0 12px 24px rgba(236, 201, 75, 0.2);
}

/* Invitation pulse animation */
.showdown-card.invited {
  animation: invitePulse 3s ease-in-out infinite;
}

@keyframes invitePulse {
  0%, 100% { border-left-color: var(--warning); }
  50% { border-left-color: #f59e0b; }
}

/* -- Modal Animations -- */
.modal-overlay {
  animation: modalOverlayFadeIn 200ms ease;
}

@keyframes modalOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  animation: modalSlideIn 300ms ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal closing animations */
.modal-overlay.closing {
  animation: modalOverlayFadeOut 200ms ease forwards;
}

@keyframes modalOverlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modal-overlay.closing .modal-content {
  animation: modalSlideOut 200ms ease forwards;
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
}

/* Modal close button hover */
.modal-close {
  transition: color 150ms ease, transform 150ms ease;
}

.modal-close:hover {
  transform: scale(1.1) rotate(90deg);
}

/* -- Link Hover Effects -- */
.nav-link {
  transition: all 200ms ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: all 200ms ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Auth links and card links */
.auth-links a,
.showdown-card-link {
  transition: color 200ms ease;
  position: relative;
}

.auth-links a::after,
.showdown-card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 200ms ease;
}

.auth-links a:hover::after,
.showdown-card-link:hover::after {
  width: 100%;
}

/* -- Card General Hover Effects -- */
.card {
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* -- Loading State Animations -- */

/* Shimmer loading effect */
.skeleton,
.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--border) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading spinner enhancement */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Pulsing dot loader */
.loading-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* -- Pick Confirmation Animation -- */
.pick-confirmation {
  animation: confirmationEnter 300ms ease;
}

@keyframes confirmationEnter {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirmation-icon {
  animation: confirmationBounce 500ms ease;
}

@keyframes confirmationBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* -- User Menu Dropdown Animation -- */
.user-menu-dropdown {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 150ms ease, transform 150ms ease, display 150ms ease;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
  opacity: 1;
  transform: translateY(0);
}

/* User menu item hover enhancement */
.user-menu-item {
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.user-menu-item:hover {
  transform: translateX(4px);
}

/* -- Notification Badge Animation -- */
.menu-badge,
.notification-badge {
  animation: badgePop 300ms ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Badge pulse for attention */
.menu-badge.pulse,
.notification-badge.pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 101, 101, 0); }
}

/* -- Page Transition Effects -- */
.page-enter {
  animation: pageEnter 300ms ease;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -- Status Badge Transitions -- */
.game-status,
.showdown-status {
  transition: background 200ms ease, color 200ms ease;
}

/* -- Registration Success Animation -- */
.registration-success {
  animation: successFadeIn 400ms ease;
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.registration-success .success-icon svg {
  animation: successIconPop 500ms ease 200ms both;
}

@keyframes successIconPop {
  0% { transform: scale(0) rotate(-180deg); }
  60% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* -- Tooltip Animation -- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  padding: 0.375rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 1000;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* -- Focus Ring Animation -- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  animation: focusRing 150ms ease;
}

@keyframes focusRing {
  from {
    outline-offset: 0px;
    outline-color: transparent;
  }
  to {
    outline-offset: 2px;
    outline-color: var(--primary);
  }
}

/* -- Dark Mode Animation Adjustments -- */
[data-theme="dark"] .team.selected,
[data-theme="dark"] button.team.selected {
  background: rgba(123, 91, 161, 0.3);
  border-color: var(--secondary);
  box-shadow: 0 0 0 1px var(--secondary), 0 0 12px rgba(123, 91, 161, 0.3);
}

[data-theme="dark"] .team:hover:not(.disabled) {
  box-shadow: 0 4px 12px rgba(123, 91, 161, 0.25);
}

[data-theme="dark"] .game-card:hover:not(.locked) {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .showdown-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .skeleton,
[data-theme="dark"] .loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    #38383D 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
}

/* ============ Reduce Motion for Accessibility ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Reset transforms on interactive elements */
  .btn:hover:not(:disabled),
  .btn:active:not(:disabled),
  .team:hover:not(.disabled),
  .team:active:not(.disabled),
  .game-card:hover:not(.locked),
  .game-card:active:not(.locked),
  .showdown-card:hover,
  .showdown-card:active,
  .card:hover,
  .message:hover,
  .user-menu-item:hover,
  .alert-close:hover,
  .modal-close:hover {
    transform: none !important;
  }

  /* Keep essential visual feedback without motion */
  .btn:hover:not(:disabled) {
    filter: brightness(0.9);
  }

  .team.selected::after {
    animation: none;
    opacity: 1;
  }

  .showdown-card.invited {
    animation: none;
  }

  /* Ensure dropdowns still work */
  .user-menu-dropdown {
    transition: none;
  }
}

/* ============ Form Validation States ============ */
/* Error state */
.form-input.error,
input.error,
textarea.error,
select.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.form-input.error:focus,
input.error:focus,
textarea.error:focus,
select.error:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Valid state */
.form-input.valid,
input.valid,
textarea.valid,
select.valid {
  border-color: #10b981 !important;
}

.form-input.valid:focus,
input.valid:focus,
textarea.valid:focus,
select.valid:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Dark mode adjustments */
[data-theme="dark"] .form-input.error,
[data-theme="dark"] input.error,
[data-theme="dark"] textarea.error,
[data-theme="dark"] select.error {
  background-color: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .form-input.valid,
[data-theme="dark"] input.valid,
[data-theme="dark"] textarea.valid,
[data-theme="dark"] select.valid {
  background-color: rgba(16, 185, 129, 0.05);
}

/* Error message styling */
.field-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

/* Character counter */
.char-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: #ef4444;
}

/* Input wrapper for validation icons */
.input-with-validation {
  position: relative;
}

.input-with-validation .validation-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.input-with-validation .validation-icon.success {
  color: #10b981;
}

.input-with-validation .validation-icon.error {
  color: #ef4444;
}

.input-with-validation input {
  padding-right: 2.5rem;
}

/* ============ Button Loading States ============ */

/* Default state: spinner is hidden, text is visible */
.btn {
  position: relative; /* Anchor for absolute spinner positioning */
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-spinner {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

/* Loading state: text is hidden, spinner is visible */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading .btn-text {
  visibility: hidden;
}

.btn.loading .btn-spinner {
  display: flex !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Spinner animation */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Button disabled during loading */
.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* HTMX loading indicator state */
.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
  opacity: 1;
}

/* ============ Toast Notification System ============ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  max-width: 400px;
  pointer-events: auto;
  animation: slideIn 0.3s ease-out;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast.toast-info {
  border-left-color: #3b82f6;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-icon.success { color: #10b981; }
.toast-icon.error { color: #ef4444; }
.toast-icon.warning { color: #f59e0b; }
.toast-icon.info { color: #3b82f6; }

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

.toast.hiding {
  animation: slideOut 0.2s ease-in forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Mobile toast adjustments */
@media (max-width: 480px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
  }

  .toast {
    max-width: none;
  }
}

/* ============ Form Validation Inline Styles ============ */
/* Profile form specific validation */
.profile-inline-form {
  position: relative;
}

.profile-inline-form .field-error {
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  white-space: nowrap;
}

/* Password form validation */
.password-form .form-group {
  position: relative;
}

.password-form .field-error {
  margin-top: 0.25rem;
}

.password-requirements {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.password-requirement {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

.password-requirement.met {
  color: #10b981;
}

.password-requirement.unmet {
  color: var(--text-muted);
}

.password-requirement-icon {
  width: 12px;
  height: 12px;
}

/* Message form validation (Trash Talk) */
.message-form {
  position: relative;
}

.message-form .field-error {
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  font-size: 0.7rem;
}

.message-form .char-counter {
  position: absolute;
  bottom: -1.25rem;
  right: 0;
  font-size: 0.7rem;
}

/* Picks form validation */
.picks-validation-message {
  color: #ef4444;
  font-size: 0.875rem;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  display: none;
}

.picks-validation-message.visible {
  display: block;
}

/* ============ Form Submit Loading States ============ */
/* Save Picks button */
#picks-form .btn-success {
  min-width: 100px;
  transition: all 0.2s;
}

#picks-form .btn-success.loading {
  background: var(--success);
}

/* Profile form buttons */
.profile-inline-form .btn,
.password-form .btn {
  min-width: 80px;
  transition: all 0.2s;
}

/* Trash Talk send button */
.message-form .send-btn {
  min-width: 70px;
  transition: all 0.2s;
}

.message-form .send-btn.loading {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Generic form validation wrapper */
.form-field-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.form-field-wrapper .form-input {
  width: 100%;
}

.form-field-wrapper .field-error {
  margin-top: 0.25rem;
}

/* ============ Accessibility Utilities ============ */

/* Screen reader only - hide visually but keep accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible styles for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Reset focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure links are distinguishable */
a:not(.btn):not(.nav-link):not(.logo):not(.user-menu-item) {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 150ms ease, text-decoration-color 150ms ease, text-decoration-thickness 150ms ease;
}

/* Hover and focus state for links */
a:hover,
a:focus {
  text-decoration-thickness: 2px;
  color: var(--primary);
}

/* Active state for links - tactile feedback */
a:active {
  opacity: 0.8;
}

/* Interactive element focus states */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Disabled elements shouldn't have focus ring */
[disabled]:focus,
[aria-disabled="true"]:focus {
  outline: none;
}

/* Modal focus trap indicator */
.modal-overlay:focus-within {
  outline: none;
}

/* Skip link (positioned off-screen, visible on focus) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
  left: 8px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
    --text-muted: #333333;
  }

  button,
  input,
  select,
  textarea {
    border-width: 2px;
  }
}

/* Focus within for containers */
.game-card:focus-within,
.message:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Ensure placeholder text has sufficient contrast */
::placeholder {
  color: #666666;
  opacity: 1;
}

[data-theme="dark"] ::placeholder {
  color: #8E8E93;
}

/* Improve contrast for disabled states */
button:disabled,
input:disabled,
select:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Live region styles (for screen reader announcements) */
[aria-live] {
  position: relative;
}

/* Loading indicator accessibility */
.loading-spinner[aria-busy="true"]::after {
  content: "Loading...";
  position: absolute;
  left: -9999px;
}

/* ============ GameCard Button Styling ============ */
/* Ensure team selection buttons maintain same appearance as divs */
button.team {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  transition: all 0.2s ease;
  width: 100%;
}

button.team:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

button.team:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

button.team.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 25%, var(--bg-card));
  box-shadow: 0 0 0 1px var(--primary);
}

button.team.disabled,
button.team:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.team.win {
  border-color: var(--win);
}

button.team.lose {
  border-color: var(--lose);
}

button.team.push {
  border-color: var(--push);
}
