
/* ==========================================================================
   Base Styles & Typography
   ========================================================================== */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: #F5F5F7;           /* Off-white text for readability */
    background-color: #2D3238; /* Dark slate-grey page background */
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a {
    color: #FFD700;           /* Starfleet Gold links */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover, a:focus {
    color: #FFFACD;           /* Brightens to lemon chiffon on hover */
    text-decoration: underline;
}

/* Headers */
h1, h2, h3, h4, h5 {
    color: #FFFFFF;
    margin-top: 0;
}
h2 { font-size: 1.5em; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
h3 { font-size: 1.2em; color: #FFD700; margin-bottom: 10px; }

/* Image Stability */
img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
#masthead {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#siteName {
    font-size: 2em;
    padding-bottom: 15px;
}

/* Main Content Wrapper */
#pagecell1 {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background-color: #1a1613; /* Deep dark brown for the content card */
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    overflow: hidden;
}

/* ==========================================================================
   Navigation (Flexbox Menus)
   ========================================================================== */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.main-nav .glink {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.05); /* Transparent button backgrounds */
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
    color: #F5F5F7;
    font-weight: 500;
}

.main-nav .glink:hover {
    background-color: rgba(255, 215, 0, 0.15);
    color: #FFFACD;
    text-decoration: none;
    border-color: #FFD700;
}

/* Search Bar alignment inside nav */
#search {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 10px;
}

#search input {
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #222;
    color: #fff;
}

/* Sub-Navigation (Seasons) */
.sub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 15px;
    background-color: #110e0c; /* Darkest brown for high contrast */
    border-radius: 8px;
    margin-bottom: 15px;
}

.sub-nav a {
    color: #FFD700;
    font-weight: bold;
}

/* ==========================================================================
   Sidebar (Left Column)
   ========================================================================== */
#pageNav {
    flex: 1 1 250px;
    max-width: 300px;
    background-color: rgba(0, 0, 0, 0.2); /* Slightly darker than the main card */
    padding: 25px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#sectionLinks h3, .relatedLinks h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

#sectionLinks a, .relatedLinks a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.relatedLinks ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Main Content Column
   ========================================================================== */
#content {
    flex: 3 1 600px;
    padding: 30px;
}

.feature {
    margin-bottom: 40px;
}

.feature img {
    float: left;
    margin: 0 20px 20px 0;
    border-radius: 8px;
}

.story {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#siteInfo {
    width: 100%;
    text-align: center;
    padding: 20px;
    background-color: #110e0c;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    color: #888;
}

/* Hide old screen reader skips visually */
.skipLinks { display: none; }

/* ==========================================================================
   Data Tables (Seasons Archive)
   ========================================================================== */
.season-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 50px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.season-table caption {
    text-align: left;
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px 0;
    color: #FFFFFF;
}

.season-table caption a {
    font-size: 0.6em;
    font-weight: normal;
    margin: 0 10px;
    color: #FFD700;
    background-color: blue;
}

.season-table a,a:hover,a:visited, a:active, a:link {
    font-size: 0.6em;
    font-weight: normal;
    margin: 0 10px;
    color: #FFD700;
    background-color: blue;
}
.season-table th {
    background-color: #110e0c; /* Deep brown header row */
    color: #FFD700;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.season-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
    color: #F5F5F7;
}

/* Zebra striping for readability */
.season-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Row highlight on interaction */
.season-table tr:hover {
    background-color: rgba(255, 215, 0, 0.05);
}

/* ==========================================================================
   Table Caption Navigation Links
   ========================================================================== */

/* 1. Container: Fixes the scrunched text by adding a gap */
.season-table caption h3 {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px; /* Spaces the links out evenly */
    margin: 15px 0 5px 0;
}

/* 2. Base Button Styling */
.season-table caption h3 a {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: blue;
    border: 1px solid rgba(255, 215, 0, 0.3); /* Faint gold border */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.15s ease-in-out;
    display: inline-block;
    text-decoration:none;
}

/* 3. Unclicked State */
.season-table caption h3 a:link {
    color: #FFD700; /* Starfleet Gold */
}

/* 4. Previously Visited State */
.season-table caption h3 a:visited {
    color: #C5A059; /* A muted, antique brass/gold to show it was clicked */
    border-color: rgba(197, 160, 89, 0.3);
}

/* 5. Hover State */
.season-table caption h3 a:hover,
.season-table caption h3 a:focus {
    color: #FFFACD; /* Brightens to Lemon Chiffon */
    background-color: rgba(255, 215, 0, 0.15); /* Adds a gold highlight box */
    border-color: #FFD700;
    text-decoration: none;
}

/* 6. Active State (When actively clicking the mouse down) */
.season-table caption h3 a:active {
    color: #FFFFFF; /* Flashes white */
    background-color: rgba(255, 140, 0, 0.4); /* Flashes a subtle alert-orange */
    border-color: #FF8C00;
    transform: scale(0.95); /* Slightly shrinks to give a physical "button press" feel */
}

.button {
  display: inline-block;
  padding: 10px 18px;
  background-color: #00643c;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
}

.button:hover {
  background-color: #00492b;
}

button.link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: #069;
  text-decoration: underline;
  cursor: pointer;
}
