/*
 * NFL Football Theme Design System
 * Dark greens, gold accents, stadium vibes
 */

/* ============================================
   LIGHT MODE (Default)
   ============================================ */
:root {
  /* NFL Brand Colors */
  --nfl-dark-green: #013220;
  --nfl-field-green: #228B22;
  --nfl-field-green-light: #2d9e2d;
  --nfl-gold: #FFB612;
  --nfl-gold-dark: #d49a00;
  --nfl-white: #FFFFFF;
  --nfl-brown: #654321;

  /* Primary Theme Colors */
  --primary-color: var(--nfl-dark-green);
  --primary-hover: #024630;
  --primary-light: #e8f5e9;
  --accent-color: var(--nfl-gold);
  --accent-hover: var(--nfl-gold-dark);

  /* Semantic Colors */
  --success-color: var(--nfl-field-green);
  --success-light: #d4edda;
  --success-dark: #155724;
  --danger-color: #dc3545;
  --danger-light: #f8d7da;
  --danger-dark: #721c24;
  --warning-color: #ffc107;
  --warning-light: #fff3cd;
  --warning-dark: #856404;
  --info-color: #17a2b8;
  --info-light: #d1ecf1;
  --info-dark: #0c5460;

  /* Background & Surface */
  --bg-primary: #f5f5f5;
  --bg-secondary: #e8e8e8;
  --bg-card: #ffffff;
  --bg-header: linear-gradient(135deg, var(--nfl-dark-green) 0%, #024630 50%, var(--nfl-dark-green) 100%);
  --bg-field: linear-gradient(180deg, var(--nfl-field-green) 0%, #1a6b1a 100%);

  /* Text Colors */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #999999;
  --text-on-primary: #ffffff;
  --text-on-accent: #013220;

  /* Borders & Shadows */
  --border-color: #ddd;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(255, 182, 18, 0.3);

  /* Component-specific */
  --nav-bg: var(--bg-header);
  --nav-text: var(--nfl-white);
  --nav-accent: var(--nfl-gold);
  --card-border: 1px solid var(--border-color);
  --input-bg: var(--bg-card);
  --input-border: var(--border-color);
  --input-focus: var(--nfl-field-green);

  /* Table Colors */
  --table-header-bg: var(--nfl-dark-green);
  --table-header-text: var(--nfl-white);
  --table-row-alt: #f8f9fa;
  --table-hover: #e8f5e9;

  /* Status Colors */
  --status-open-bg: var(--success-light);
  --status-open-text: var(--success-dark);
  --status-closed-bg: var(--danger-light);
  --status-closed-text: var(--danger-dark);

  /* Animation */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
  /* Background & Surface */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #21262d;
  --bg-header: linear-gradient(135deg, #0a1a12 0%, #0d2818 50%, #0a1a12 100%);

  /* Text Colors */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Borders */
  --border-color: #30363d;

  /* Shadows (darker for dark mode) */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 182, 18, 0.2);

  /* Components */
  --input-bg: #0d1117;
  --input-border: #30363d;

  /* Table */
  --table-row-alt: #161b22;
  --table-hover: #1a2d1f;

  /* Semantic adjustments for dark mode */
  --primary-light: #1a3d28;
  --success-light: #1a3d1f;
  --success-dark: #3fb950;
  --danger-light: #3d1a1f;
  --danger-dark: #f85149;
  --warning-light: #3d351a;
  --warning-dark: #d29922;
  --info-light: #1a2d3d;
  --info-dark: #58a6ff;

  /* Status adjustments */
  --status-open-bg: #1a3d1f;
  --status-open-text: #3fb950;
  --status-closed-bg: #3d1a1f;
  --status-closed-text: #f85149;
}

/* ============================================
   NFL-SPECIFIC DECORATIVE ELEMENTS
   ============================================ */

/* Field Line Pattern (for backgrounds) */
.field-pattern {
  position: relative;
}

.field-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 49px,
    rgba(255, 255, 255, 0.1) 49px,
    rgba(255, 255, 255, 0.1) 50px
  );
  pointer-events: none;
  z-index: 1;
}

/* End Zone Styling */
.end-zone {
  background: var(--bg-header);
  color: var(--nav-text);
  padding: 24px;
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
}

.end-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 19%,
    rgba(255, 255, 255, 0.05) 19%,
    rgba(255, 255, 255, 0.05) 20%
  );
  pointer-events: none;
}

/* Gold Accent Border */
.gold-accent {
  border-left: 4px solid var(--accent-color);
}

.gold-accent-top {
  border-top: 4px solid var(--accent-color);
}

/* Football Lacing Effect */
.lacing-border {
  position: relative;
  border: 2px solid var(--nfl-brown);
  border-radius: var(--border-radius);
}

.lacing-border::after {
  content: '|||';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--nfl-white);
  background: var(--nfl-brown);
  padding: 2px 8px;
  border-radius: 3px;
}

/* Stadium Glow Effect */
.stadium-glow {
  box-shadow: var(--shadow-glow);
  transition: box-shadow var(--transition-normal);
}

.stadium-glow:hover {
  box-shadow: 0 0 30px rgba(255, 182, 18, 0.4);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--nav-accent);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--nav-text);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(255, 182, 18, 0.2);
  transform: scale(1.05);
}

.theme-toggle .light-icon,
.theme-toggle .dark-icon {
  font-size: 16px;
}

/* Show/hide icons based on current mode */
.theme-toggle .dark-icon {
  display: inline;
}
.theme-toggle .light-icon {
  display: none;
}

body.dark-mode .theme-toggle .dark-icon {
  display: none;
}
body.dark-mode .theme-toggle .light-icon {
  display: inline;
}

/* ============================================
   NFL-THEMED COMPONENTS
   ============================================ */

/* NFL Header */
.nfl-header {
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 16px 24px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
}

.nfl-header .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.nfl-header .football-icon {
  font-size: 24px;
}

.nfl-header a {
  color: var(--nav-text);
  transition: color var(--transition-fast);
}

.nfl-header a:hover {
  color: var(--nav-accent);
}

/* NFL Card */
.nfl-card {
  background: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.nfl-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.nfl-card.featured {
  border-left: 4px solid var(--accent-color);
}

/* NFL Button */
.btn-nfl {
  background: var(--accent-color);
  color: var(--text-on-accent);
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-nfl:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-nfl:active {
  transform: translateY(0);
}

/* NFL Table Headers */
.nfl-table thead th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  padding: 12px 16px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.nfl-table thead th:first-child {
  border-left: 3px solid var(--accent-color);
}

/* NFL Stats Card */
.stat-card {
  background: var(--bg-card);
  border: var(--card-border);
  border-radius: var(--border-radius);
  padding: 16px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card.positive .stat-value {
  color: var(--success-color);
}

.stat-card.negative .stat-value {
  color: var(--danger-color);
}

/* ============================================
   PICK BUTTONS (Sheet Page)
   ============================================ */
.pick-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pick-btn:hover {
  border-color: var(--nfl-field-green);
  background: var(--primary-light);
}

.pick-btn.selected {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-on-accent);
  font-weight: 600;
}

.pick-btn.winner {
  background: var(--success-light);
  border-color: var(--success-color);
  color: var(--success-dark);
}

.pick-btn.loser {
  background: var(--danger-light);
  border-color: var(--danger-color);
  color: var(--danger-dark);
}

/* ============================================
   LIVE INDICATOR
   ============================================ */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger-color);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--danger-color);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */
.countdown-card {
  background: var(--bg-header);
  color: var(--nav-text);
  padding: 16px 24px;
  border-radius: var(--border-radius);
  text-align: center;
  border: 2px solid var(--accent-color);
}

.countdown-card .countdown-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.countdown-card .countdown-time {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

/* ============================================
   LEADERBOARD HIGHLIGHTS
   ============================================ */
.week-winner {
  background: linear-gradient(90deg, var(--success-light) 0%, transparent 100%);
  border-left: 3px solid var(--success-color);
}

.week-loser {
  background: linear-gradient(90deg, var(--danger-light) 0%, transparent 100%);
  border-left: 3px solid var(--danger-color);
}

.season-leader {
  background: linear-gradient(90deg, rgba(255, 182, 18, 0.2) 0%, transparent 100%);
  border-left: 3px solid var(--accent-color);
}

/* ============================================
   PROFILE AVATAR
   ============================================ */
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.avatar-sm {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 32px;
  border-width: 4px;
}

/* ============================================
   BALANCE DISPLAY
   ============================================ */
.balance-display {
  font-size: 32px;
  font-weight: 700;
}

.balance-display.positive {
  color: var(--success-color);
}

.balance-display.negative {
  color: var(--danger-color);
}

.balance-display.zero {
  color: var(--text-secondary);
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.2);
}

body.dark-mode input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-primary);
}

body.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.bg-primary { background-color: var(--primary-color); }
.bg-accent { background-color: var(--accent-color); }
.bg-success { background-color: var(--success-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-card { background-color: var(--bg-card); }

.text-accent { color: var(--accent-color); }
.text-on-dark { color: var(--nav-text); }

.border-accent { border-color: var(--accent-color); }
.border-primary { border-color: var(--primary-color); }
