/* ============================================================
   V3 SPLIT GAME CARD (COMPACT LAYOUT)
   ============================================================ */

.v3-game-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  background: #ffffff; /* Clean white base */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid #e2e8f0 !important; /* Subtle border to define the card edge */
}

.v3-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.v3-hero-section {
  position: relative;
  height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.v3-split-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}

.v3-owner-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: 3px;
  display: flex;
  z-index: 3;
}

.v3-owner-half {
  flex: 1;
  display: flex;
  justify-content: center;
}

.v3-owner-text {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.5);
  white-space: nowrap;
}

/* --- Logos & Center @ Row --- */
.v3-logos-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 0 20px;
}

.v3-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

.v3-logo-fallback {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  padding: 4px;
}

/* --- Center Divider with Stacked @ and Kickoff --- */
.v3-matchup-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 2px;
}

.v3-at {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
  line-height: 1;
}

.v3-kickoff-sub {
  font-size: 0.55rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* --- Badges Row (when present) --- */
.v3-meta-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #e2e8f0; /* Lightened for white background */
  padding-top: 6px;
}

.v3-rivalry-tag {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc2626;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  z-index: 3;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* --- Tightened Footer Section (White Theme) --- */
.v3-footer-section {
  background: #ffffff;
  padding: 8px 14px 10px 14px;
  color: #0f172a; /* Dark text */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-matchup-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.v3-team-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.v3-team-info.away {
  text-align: left;
}

.v3-team-info.home {
  text-align: right;
}

.v3-team-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.v3-rank {
  color: #64748b;
  font-weight: 700;
  font-size: 0.7rem;
}

.v3-score-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.v3-team-info.away .v3-score-block { justify-content: flex-start; }
.v3-team-info.home .v3-score-block { justify-content: flex-end; }

.v3-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a; /* Black score text */
}

.v3-gp {
  font-size: 0.7rem;
  font-weight: 800;
  color: #0284c7; /* Darker blue for visibility on white */
}

.v3-meta-text {
  font-size: 0.5rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  gap: 2px;
}

.v3-time { color: #475569; }
.v3-venue { text-transform: uppercase; }

.v3-badges {
  display: flex;
  gap: 4px;
}

.v3-badge {
  background: #f1f5f9; /* Light grey background */
  color: #334155; /* Dark text */
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}


/* ============================================================
   V3 MINI CARD (GAMES PAGE LIST)
   ============================================================ */

.mini-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
}

.v3-mini-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff; /* Clean white base */
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0; /* Defined edge */
  transition: transform 0.1s ease;
}

.v3-mini-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.v3-mini-hero {
  position: relative;
  height: 52px; 
  display: flex;
  justify-content: center;
  align-items: center;
}

.v3-mini-logos-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 16px 0;
}

.v3-mini-logo {
  width: 32px; 
  height: 32px;
  object-fit: contain;
}

.v3-mini-at {
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Tighter Footer Elements (White Theme) */
.v3-mini-footer {
  background: #ffffff;
  padding: 4px 8px; 
  color: #0f172a;
}

.v3-mini-matchup-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.v3-mini-team-name {
  font-size: 0.72rem; 
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px; 
  color: #0f172a;
}

.v3-mini-team.away { text-align: left; justify-content: flex-end;}
.v3-mini-team.home { text-align: right; justify-content: flex-end;}

.v3-mini-score {
  font-size: 0.85rem;
  font-weight: 900;
  margin-top: -2px;
  color: #0f172a;
}

.v3-mini-kickoff {
  font-size: 0.45rem;
  color: #64748b;
  font-weight: 700;
  text-align: center;
  flex: 1;
  padding: 0 4px;
}

/* Score and Blue GP Side-by-Side Grouping */
.v3-mini-score-group {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px;
  margin-top: 1px;
}

.v3-mini-gp {
  font-size: 0.6rem;
  font-weight: 800;
  color: #0284c7; /* Visible blue on white */
}

/* Much smaller, sleek owner tag pill */
.v3-mini-owner-tag {
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}


/* ============================================================
   V3 HERO CARD (GAME DETAILS PAGE)
   ============================================================ */
.v3-hero-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff; /* Clean White Edge */
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
}

.v3-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 44px; /* Leaves room for footer */
  z-index: 1;
}

.v3-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 30px;
}

.v3-hero-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 3;
}

.v3-hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 12px;
}

.v3-hero-name {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.v3-hero-scoreboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  z-index: 3;
}

.v3-hero-score-text {
  font-size: 4rem;
  font-weight: 900;
  text-shadow: 0 4px 10px rgba(0,0,0,0.6);
  line-height: 1;
}

.v3-hero-week {
  background: rgba(0,0,0,0.4);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 10px;
}

/* White Theme Hero Footer */
.v3-hero-footer {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 12px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.v3-hero-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #475569; /* Darker grey for white bg */
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.dot-divider {
  color: #cbd5e1;
}

/* ============================================================
   GAME CARD — RIVALRY GLOW & STRUCTURE
   ============================================================ */

.game-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 0 !important;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none !important;
  padding-top: 0 !important;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Thick red shadow/glow around the entire card for rivalry games */
.game-card.rivalry {
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.65), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(220, 38, 38, 0.5) !important;
}

.game-card.rivalry:hover {
  box-shadow: 0 0 22px rgba(220, 38, 38, 0.85), 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Narrow Flush Owner Header Banner */
.card-owner-header {
  display: flex;
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
}

.owner-header-half {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
}

.owner-header-half:empty,
.owner-header-half[style*="background: transparent"] {
  background: transparent !important;
}

.owner-header-name {
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

/* Rivalry Banner Positioned Cleanly Below Owner Bar */
.rivalry-banner {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #dc2626;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.index-game-table {
  width: 100%;
  margin: 0;
  padding: 10px 12px 0 12px;
  box-sizing: border-box;
  border-collapse: collapse;
}

.game-card.rivalry .index-game-table {
  margin-top: 8px; /* Clears space for the rivalry banner */
}


/* ============================================================
   GAMES PAGE TIGHT DASHBOARD STYLES
   ============================================================ */

.games-page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.page-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Owner Games / All Games Toggle Tabs */
.view-toggle-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #e2e8f0;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:hover {
  color: #0f172a;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Week Tabs Header (Compact Numbers) */
.week-tabs-container {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
}

.week-tabs-scroll {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.week-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.week-tab-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1rem;
  font-weight: 900;
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.week-tab-btn:hover { color: #0f172a; }
.week-tab-btn.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
}

/* ============================================================
   RIVALRY CARD RED GLOW SHADOW
   ============================================================ */

.game-card.rivalry,
.v3-game-card.rivalry,
.v3-mini-card.rivalry,
.index-game-card.rivalry {
  box-shadow: 0 0 26px rgba(220, 38, 38, 0.6), 0 8px 18px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(220, 38, 38, 0.4) !important;
}

.game-card.rivalry:hover,
.v3-game-card.rivalry:hover,
.v3-mini-card.rivalry:hover,
.index-game-card.rivalry:hover {
  box-shadow: 0 0 32px rgba(220, 38, 38, 0.8), 0 8px 20px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(220, 38, 38, 0.4) !important;
}