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

/* Body / full-page background */
body {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  background: linear-gradient(to bottom, #f5f7fa, #e0e7f1);
  color: #333;
  min-height: 100vh;
}

/* Top Navigation Bar */
.top-nav {
  background-color: #1e1e1e;
  padding: 16px 0;
  display: flex;
  justify-content: center; /* center the inner container horizontally */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  position: fixed;  /* keeps header at top while scrolling */
  top: 0;           /* sticks to top */
  left: 0;
  width: 100%;      /* spans full width */
  z-index: 1000;    /* stays above other content */
}

.nav-container {
  display: flex;
  align-items: center;        /* vertically center logo + links */
  justify-content: flex-start; /* everything on one line */
  width: 100%;
  max-width: 1200px;          /* matches main content width */
  padding: 0 32px;            /* left/right padding */
  gap: 48px;                  /* space between logo and links */
  flex-wrap: nowrap;           /* prevent wrapping */
}

.logo {
  display: block;
  height: 64px;
}

.nav-links a {
  text-decoration: none;
  color: #B22222;            /* change from white to red */
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #ff0000;       /* green on hover (keep as is) */
}

.nav-links {
  display: flex;    /* horizontal layout */
  gap: 48px;        /* space between links, increase or decrease as needed */
}

/* Main content */
.main-content {
  display: block;            /* stack children vertically */
  margin: 16px auto;
  padding: 32px;
  max-width: 1200px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-content > header {
  margin-bottom: 24px;       /* space between header and content */
}

.main-content {
    padding-top: 96px; /* space for the fixed header */
}


/* Standings wrapper - left side */
.standings-wrapper {
  max-width: 600px;   /* keeps standings narrower */
  margin-top: 16px;   /* spacing from header */
}

#standings {
  font-family: monospace;
  white-space: pre;
  background-color: #f8f8f8;
  padding: 16px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}


/* Header titles */
header h1 {
  font-weight: 700;
  font-size: 2rem;
  color: #2c3e50;
}

header h2 {
  font-weight: 400;
  font-size: 1.2rem;
  color: #555;
  margin-top: 8px;
}

/* Footer */
footer {
  margin-top: 32px;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}
/* Teams section styling */
#teams-section {
  font-family: "Courier New", Courier, monospace; /* fixed-width font */
  max-width: 600px;
  margin-top: 16px;
}

#teams-section .teams-grid {
  display: grid;
  grid-template-columns: 1fr; /* single column */
  gap: 2px;                   /* smaller spacing between rows */
  padding: 0;
}

#teams-section .team {
  padding: 2px 8px;           /* smaller top/bottom padding */
  font-weight: bold;           /* bold text */
  border-bottom: 1px solid #eee;
}

#teams-section .team:last-child {
  border-bottom: none;
}

/* Link styling */
#teams-section .team a {
  text-decoration: none;       /* remove underline */
  color: #0000ee;              /* classic blue */
  font-weight: bold;           /* bold text */
  font-family: inherit;        /* inherit monospace from parent */
}

#teams-section .team a:visited,
#teams-section .team a:hover,
#teams-section .team a:active {
  color: #0000ee;              /* never change color */
  text-decoration: none;       /* never underline */
}




/* Ensure tables are responsive */
@media (max-width: 768px) {
  /* Nav adjustments */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-links {
    flex-direction: column;
    gap: 12px;
  }

  /* Main content padding for fixed header */
  .main-content {
    padding-top: 280px !important; /* adjust for taller mobile header */
  }

  /* Standings tables block for mobile */
  .standings-wrapper table,
  .standings-wrapper thead,
  .standings-wrapper tbody,
  .standings-wrapper th,
  .standings-wrapper td,
  .standings-wrapper tr {
    display: block;
  }

  .standings-wrapper th {
    display: none; /* hide header on mobile */
  }

  .standings-wrapper td {
    position: relative;
    padding-left: 50%;
    border-bottom: 1px solid #eee;
  }

  .standings-wrapper td::before {
    position: absolute;
    top: 0;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
  }

  /* Labels for each column */
  .standings-wrapper td:nth-of-type(1)::before { content: "Team"; }
  .standings-wrapper td:nth-of-type(2)::before { content: "WON"; }
  .standings-wrapper td:nth-of-type(3)::before { content: "LOST"; }
  .standings-wrapper td:nth-of-type(4)::before { content: "PCT"; }
  .standings-wrapper td:nth-of-type(5)::before { content: "GB"; }
  .standings-wrapper td:nth-of-type(6)::before { content: "MAGIC#"; }

  /* Optional: full-width adjustments for standings wrapper and teams section */
  .standings-wrapper,
  #teams-section {
    max-width: 100%;
  }
}

/* Baseball Reference style table */
.stats-table {
    border-collapse: collapse;
    width: 100%;
    font-family: "Courier New", Courier, monospace !important; 
    font-size: 0.9rem;
}


.stats-table th,
.stats-table td {
    border: 1px solid #999;
    padding: 4px 6px;
    color: #222;
}

/* Header styling */
.stats-table th {
    background-color: #f2f2f2;
    color: #900;
    text-align: center;
    font-weight: bold;
}

/* Numeric columns right-aligned */
.stats-table td.numeric {
    text-align: right;
}

/* Alternating row colors */
.stats-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stats-table tr:nth-child(odd) {
    background-color: #fff;
}

/* Optional: hover highlight */
.stats-table tr:hover {
    background-color: #e0e0e0;
}

.stats-table td.no-wrap {
    white-space: nowrap;
}

.stats-table td.right {
    text-align: right;
    color: #222;
}

.records-grid {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
}

/* Lock link appearance */
.records-grid a,
.records-grid a:link,
.records-grid a:visited,
.records-grid a:hover,
.records-grid a:active {
    color: #0645ad;        /* classic blue */
    font-weight: bold;
    text-decoration: none;
}

/* Make the whole record block clickable */
.records-grid a {
    display: block;
}

.records-grid .record {
    display: block;
}


#seasons-section a,
#seasons-section a:link,
#seasons-section a:visited,
#seasons-section a:hover,
#seasons-section a:active {
    color: #0645ad;
    font-weight: bold !important;
    text-decoration: none;
}



#seasons-section {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
}

#seasons-section ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

#seasons-section li {
    font-weight: bold !important;
}

.record-nav {
  font-family: "Fira Code", "Courier New", monospace;
  font-weight: bold;
}

.record-nav a,
.record-nav a:link,
.record-nav a:visited,
.record-nav a:hover,
.record-nav a:active {
  color: #3074b7;          /* slightly lighter dark blue */
  font-weight: 700 !important;  /* force bold */
  text-decoration: none;   /* no underline */
  font-family: inherit;    /* inherit fixed-width font */
}

.stats-table .highlight {
    background-color: #7e80c7;  /* subtle yellow */
    font-weight: bold;
}

