/* NFL Matchups Page Styles - Dark Mode */
:root {
  --bg: #252525;
  --panel: #2f2f2f;
  --panel-2: #2a2a2a;
  --text: #eaeef6;
  --muted: #a7b0c0;
  --accent: #64748b;
  --primary: #374151;
  --secondary: #4b5563;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #3a3a3a;
  --border-light: #323232;
  --chip: #333333;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 4px 6px rgba(0,0,0,.3);
  --radius: 12px;
  --datacol: 92px;
}

* { box-sizing: border-box; }
html, body { height:100%; }

body {
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container { 
  max-width: 1400px; 
  margin: 20px auto; 
  padding: 0 20px 40px;
}

/* Page Header */
header.top { 
  display:flex; 
  align-items:center; 
  justify-content:space-between; 
  gap: 20px; 
  margin-bottom: 30px;
  padding: 25px 0;
  border-bottom: 2px solid var(--border);
}

.title { 
  display:flex; 
  align-items:center; 
  gap:16px; 
}

.title h1 { 
  font-size: 28px; 
  margin:0; 
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
}

.title .meta { 
  display:flex; 
  gap:12px; 
  font-size:14px; 
  color: var(--muted);
  font-weight: 500;
}

.controls { 
  display:flex; 
  gap:12px; 
  flex-wrap:wrap; 
}

.select, .input {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.select:focus, .input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.2);
}

.select:hover, .input:hover {
  border-color: var(--primary);
}

/* No Games Message */
.no-games {
  background: var(--panel-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  margin: 40px 0;
}

.no-games h3 {
  color: var(--text);
  margin-bottom: 10px;
  font-size: 20px;
}

.no-games p {
  color: var(--muted);
  font-size: 16px;
}

/* Matchups Grid */
.matchups-container h2 {
  color: var(--text);
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.matchups-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1100px) {
  .matchups-container {
    grid-template-columns: 1fr 1fr;
  }
}

/* Game Cards */
.game-matchup {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.game-matchup:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 16px 40px rgba(0,0,0,.45); 
  border-color: var(--primary);
}

/* Game Header with Team Colors */
.game-header { 
  position: relative; 
  overflow: hidden; 
  isolation: isolate;
  display:flex; 
  align-items:center; 
  gap: 16px; 
  padding: 24px 20px;
}

.game-header::before {
  content: "";
  position: absolute; 
  inset: 0;
  background:
    linear-gradient(90deg, var(--away1) 0%, var(--away1) 48%, var(--home1) 52%, var(--home1) 100%),
    radial-gradient(120% 160% at 0% 50%, var(--away2) 0%, transparent 60%),
    radial-gradient(120% 160% at 100% 50%, var(--home2) 0%, transparent 60%);
  opacity: .35;
  z-index: 0;
}

.game-header::after {
  content: "";
  position: absolute; 
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.15));
  z-index: 0; 
}

.game-header > * { 
  position: relative; 
  z-index: 1; 
}

.game-info {
  flex: 1;
}

.game-info h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}

.game-info p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.team-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.team-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 4px;
  box-shadow: 0 0 0 2px var(--away1);
  transition: all 0.2s ease;
}

.team-logo:hover {
  transform: scale(1.05);
}

.team-logo:last-child {
  box-shadow: 0 0 0 2px var(--home1);
}

.vs {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--chip);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(2px);
}

/* Position Tabs */
.position-tabs {
  display: flex;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background: var(--panel);
  color: var(--text);
}

.tab-btn.active {
  background: var(--panel);
  color: var(--text);
  border-bottom-color: var(--primary);
}

/* Position Content */
.position-content {
  display: none;
  padding: 24px;
}

.position-content.active {
  display: block;
}

/* Projections Layout */
.projections-matchup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.team-projections h4 {
  color: var(--text);
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

/* Header Grid */
.projections-header {
  display: grid;
  grid-template-columns: 1fr 50px 60px 60px;
  gap: 8px;
  padding: 8px 10px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-player {
  text-align: left;
}

.header-position {
  text-align: center;
}

.header-rating,
.header-projection {
  text-align: right;
}

/* Consolidated Players List */
.all-players-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.position-divider {
  height: 8px;
  margin: 4px 0;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr 50px 60px 60px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: var(--panel);
  border-radius: 4px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.player-row:hover {
  background: rgba(55, 65, 81, 0.15);
  border-color: var(--primary);
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-info .player-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.player-info .player-salary {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
}

.player-position {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.player-rating {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--warning);
  font-variant-numeric: tabular-nums;
}

.player-projection {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

/* DVP Layout */
.dvp-matchup {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dvp-position-block {
  margin-bottom: 24px;
}

.dvp-position-block h4 {
  color: var(--text);
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

/* Tables */
.dvp-table-container,
.projections-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dvp-table,
.projections-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.dvp-table th,
.projections-table th {
  background: linear-gradient(135deg, var(--panel-2), var(--chip));
  color: var(--text);
  padding: 14px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.dvp-table td,
.projections-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.dvp-table tr:nth-child(even),
.projections-table tr:nth-child(even) {
  background-color: rgba(21, 25, 34, 0.3);
}

.dvp-table tr:hover,
.projections-table tr:hover {
  background-color: rgba(55, 65, 81, 0.1);
}

/* Special Column Styling */
.team-name {
  font-weight: 600;
  color: var(--text);
  text-align: left !important;
}

.player-name {
  font-weight: 600;
  color: var(--text);
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dk-pts,
.fd-pts {
  font-weight: 600;
  color: var(--success);
}

.fppg {
  font-weight: 600;
  color: var(--success);
}

.rating {
  font-weight: 600;
  color: var(--warning);
}

.no-data {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 40px 20px;
  background: var(--panel-2);
  border-radius: 8px;
  border: 2px dashed var(--border);
}

.no-data-small {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 12px;
  font-size: 12px;
}

/* Team Stats Layout */
.team-stats-content {
  padding: 20px;
}

.team-stats-content h4 {
  color: var(--text);
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

/* Chips and Pills */
.chip {
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    margin: 0;
    padding: 10px;
  }
  
  .container {
    max-width: 100%;
    margin: 10px auto;
    padding: 0 15px 32px;
  }
  
  header.top {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
    padding: 20px 0;
  }
  
  .title {
    justify-content: center;
    text-align: center;
  }
  
  .title h1 {
    font-size: 24px;
  }
  
  .controls {
    justify-content: center;
  }
  
  .select, .input {
    min-width: 120px;
  }
  
  .matchups-container {
    grid-template-columns: 1fr;
  }
  
  .matchups-container h2 {
    font-size: 28px;
  }
  
  .game-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 20px;
  }
  
  .team-logos {
    gap: 12px;
  }
  
  .team-logo {
    width: 40px;
    height: 40px;
  }
  
  .tab-btn {
    padding: 14px 8px;
    font-size: 13px;
  }
  
  .position-content {
    padding: 20px;
  }
  
  .projections-matchup {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .dvp-table th,
  .projections-table th {
    padding: 10px 6px;
    font-size: 10px;
  }
  
  .dvp-table td,
  .projections-table td {
    padding: 10px 6px;
    font-size: 12px;
  }
  
  /* Hide some columns on mobile */
  @media (max-width: 600px) {
    .dvp-table th:nth-child(n+6),
    .dvp-table td:nth-child(n+6),
    .projections-table th:nth-child(n+6),
    .projections-table td:nth-child(n+6) {
      display: none;
    }
  }
  
  /* Very small screens */
  @media (max-width: 480px) {
    .tab-btn {
      padding: 12px 6px;
      font-size: 12px;
    }
    
    .dvp-table th:nth-child(n+5),
    .dvp-table td:nth-child(n+5),
    .projections-table th:nth-child(n+5),
    .projections-table td:nth-child(n+5) {
      display: none;
    }
  }
}

/* WordPress Integration Styles */
.entry-content .container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Ensure compatibility with WordPress themes */
.game-matchup table {
  margin-bottom: 0;
}

.game-matchup table th,
.game-matchup table td {
  border: none;
}
