/* ==========================================================================
   MLB.GRIMALDI.TV - Premium Design System & Stylesheet
   Dark Glassmorphism, Dynamic Gradients, Sports Aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Oswald:wght@500;600;700&display=swap');

:root {
  --bg-main: #07090e;
  --bg-card: rgba(15, 20, 32, 0.75);
  --bg-card-hover: rgba(22, 30, 48, 0.9);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(59, 130, 246, 0.3);
  
  --electric-blue: #3b82f6;
  --electric-blue-hover: #2563eb;
  --gold-accent: #f59e0b;
  --red-accent: #dc2626;
  --green-win: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --nav-height: 64px;
  --banner-height: 38px;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Oswald', 'Impact', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(220, 38, 38, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* ==========================================================================
   Header & Slide-out Navigation Drawer
   ========================================================================== */

#grimaldi-unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hamburger-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

#grimaldi-nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#grimaldi-nav-logo img {
  height: 44px;
  width: auto;
  max-width: min(280px, 58vw);
  object-fit: contain;
  display: block;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vip-badge-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.vip-badge-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}

#static-promo-banner {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(90deg, #b91c1c 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slide-out Menu Drawer */
#grimaldiMenuDrawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 290px;
  height: 100%;
  background-color: #0b0f19;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1000011;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 10px 0 30px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
}

#grimaldiMenuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000010;
  display: none;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 20px;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.grit-nav-link {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-size: 16px !important;
  color: var(--electric-blue) !important;
  text-decoration: none !important;
  padding: 14px 20px !important;
  display: block !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.grit-nav-link:hover {
  color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.1);
}

/* Main Layout Wrapper */
main.main-content {
  margin-top: calc(var(--nav-height) + var(--banner-height) + 16px);
  padding: 0 16px 40px 16px;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Hero Section & Live Ticker
   ========================================================================== */

.hero-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid var(--border-card);
  overflow: hidden;
  margin-bottom: 24px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--electric-blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  line-height: 1.1;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 750px;
  margin-bottom: 20px;
}

/* Live Ticker */
.ticker-container {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.ticker-label {
  background: var(--red-accent);
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  animation: tickerSlide 30s linear infinite;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-tag {
  color: var(--gold-accent);
  font-weight: 700;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.nav-tabs-bar {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.nav-tabs-bar::-webkit-scrollbar {
  display: none !important;
  height: 0px !important;
  width: 0px !important;
}

.nav-tab-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab-btn.active {
  color: #ffffff;
  background: var(--electric-blue);
  border-color: var(--electric-blue);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Tab Panes */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Filter & Search Header Bar
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
}

.filter-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover, .filter-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--electric-blue);
  color: #ffffff;
}

.search-box {
  position: relative;
  min-width: 240px;
}

.search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 8px 14px 8px 36px;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--electric-blue);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

/* ==========================================================================
   News & Stories Feed Grid
   ========================================================================== */

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  background: var(--bg-card-hover);
}

.story-img-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  background: #111;
  overflow: hidden;
}

.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .story-img {
  transform: scale(1.05);
}

.story-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gold-accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.story-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 8px;
}

.story-title {
  font-family: var(--font-heading);
  font-size: 20px;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 8px;
}

.story-summary {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.story-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--electric-blue);
  font-weight: 700;
  font-size: 13px;
}

/* ==========================================================================
   AI Grimaldi Bets - Picks Section
   ========================================================================== */

.picks-summary-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-value.green { color: var(--green-win); }
.stat-value.blue { color: var(--electric-blue); }
.stat-value.gold { color: var(--gold-accent); }

.stat-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pick-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}

.pick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.pick-league-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--electric-blue);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.pick-result-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.pick-result-badge.win {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pick-result-badge.loss {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.pick-result-badge.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pick-matchup {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.2;
}

.pick-winner-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pick-winner-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-accent);
}

.confidence-bar-wrapper {
  margin-bottom: 14px;
}

.confidence-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.confidence-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  border-radius: 4px;
}

.pick-notes {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-left: 3px solid var(--electric-blue);
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}

/* ==========================================================================
   Live Scoreboard & Game Schedule Cards
   ========================================================================== */

.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 20px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.game-status-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.game-teams {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.game-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-team-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-logo-small {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.team-name-text {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #ffffff;
}

.game-pitcher-duel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   Matchup & Pitcher Simulator Engine
   ========================================================================== */

.simulator-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 28px;
}

.sim-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .sim-selectors {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.sim-team-select-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.sim-select-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.sim-dropdown {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.sim-vs-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red-accent);
  color: white;
  font-family: var(--font-heading);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}

.sim-btn {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  font-family: var(--font-heading);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 30px;
}

.sim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.7);
}

.sim-results-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 24px;
}

.sim-win-prob-wrapper {
  margin-bottom: 24px;
}

.sim-win-prob-bar {
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  margin-top: 8px;
}

.sim-prob-left {
  background: var(--electric-blue);
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-weight: 800;
  font-size: 13px;
}

.sim-prob-right {
  background: var(--red-accent);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  font-weight: 800;
  font-size: 13px;
}

/* Modal Reader for Articles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 100010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  color: var(--text-main);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}
