/* ==========================================================================
   1. RESET & GLOBAL LAYOUT
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000000; /* Black background */
  color: #ffffff; /* White main text */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 95%;
  max-width: 1000px;
  margin: 30px auto;
}

/* ==========================================================================
   2. PAGE TITLES & LOGO ALIGNMENT
   ========================================================================== */
h1, h2, h3, h4 {
  color: goldenrod;
  text-align: center;
  margin-bottom: 20px;
}

/* Flexbox title container to align logo and text side-by-side */
.page-title {
  color: goldenrod;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* Space between logo and text */
  font-size: 2.2rem;
  margin-bottom: 20px;
}

/* Automatically resizes logo to match the exact height of the title text */
.page-title .title-logo {
  height: 1em; 
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* ==========================================================================
   3. NAVIGATION MENU
   ========================================================================== */
/* Navigation Menu (Single Row with Horizontal Scroll on Mobile) */
header {
  background-color: #111111;
  padding: 12px 10px;
  border-bottom: 1px solid goldenrod;
  width: 100%;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
  padding: 4px 5px;
}

/* Scrollbar styling for navigation */
nav::-webkit-scrollbar {
  height: 3px;
}

nav::-webkit-scrollbar-thumb {
  background-color: goldenrod;
  border-radius: 2px;
}

/* Prevent menu links and user slot from shrinking/wrapping */
nav a, 
nav span {
  flex-shrink: 0;
  color: goldenrod;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05rem;
}

nav a:hover {
  color: #ffffff;
}

/* Align navigation to left on mobile when links overflow screen */
@media (max-width: 650px) {
  nav {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   4. HOME PAGE & GENERAL BUTTONS
   ========================================================================== */
.button-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.btn {
  background-color: goldenrod;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
  padding: 18px 24px;
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #DAA520;
  transform: translateY(-2px);
}

/* ==========================================================================
   5. DROPDOWN CONTROLS (WEEKS PAGE)
   ========================================================================== */
.controls-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 15px;
}

.dropdown-label {
  font-weight: bold;
  color: goldenrod;
  margin-right: 10px;
  font-size: 1rem;
}

.week-dropdown {
  background-color: #1a1a1a;
  color: goldenrod;
  border: 1px solid goldenrod;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  outline: none;
}

.week-dropdown:focus {
  box-shadow: 0 0 5px goldenrod;
}

/* ==========================================================================
   6. TABLES & CHARTS (LEADERBOARD & WEEKS)
   ========================================================================== */
.note-line {
  font-weight: bold;
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 15px;
  text-align: center;
}

/* Scrollable container showing ~20 managers before scroll */
.table-container {
  max-height: 720px; 
  overflow: auto;
  border: 1px solid goldenrod;
  border-radius: 6px;
  background-color: #0a0a0a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.leaderboard-table,
.weeks-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

/* Sticky Headers */
.leaderboard-table th,
.weeks-table th {
  position: sticky;
  top: 0;
  background-color: #181818;
  color: goldenrod;
  padding: 8px 6px;
  border-bottom: 2px solid goldenrod;
  z-index: 10;
}

.leaderboard-table td,
.weeks-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #222222;
  color: #ffffff;
}

.leaderboard-table tr:nth-child(even),
.weeks-table tr:nth-child(even) {
  background-color: #111111;
}

.leaderboard-table tr:hover,
.weeks-table tr:hover {
  background-color: #222222;
}

/* Column Specific Styles */
.col-username,
.col-manager {
  font-weight: bold;
  text-align: left;
  padding-left: 12px;
  min-width: 140px;
  color: #ffffff;
}

.col-overall, 
.col-round,
.col-score {
  font-weight: bold;
  color: goldenrod;
}

.col-player {
  text-align: left;
  min-width: 110px;
}

.col-pts {
  color: #dddddd;
  min-width: 35px;
  border-right: 1px solid #333333;
}

/* Goldenrod Round Expand Buttons */
.btn-round-header {
  background-color: goldenrod;
  color: #000000;
  border: none;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 12px;
  font-family: Arial, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-round-header:hover {
  background-color: #DAA520;
}

.hidden-col {
  display: none;
}

/* ==========================================================================
   7. RULES CONTENT STYLING
   ========================================================================== */
.rules-content {
  line-height: 1.6;
  font-size: 1.05rem;
}

.rules-content p {
  margin-bottom: 15px;
}

.rules-content ul, .rules-content ol {
  margin-left: 25px;
  margin-bottom: 20px;
}

.rules-content li {
  margin-bottom: 8px;
}

/* ==========================================================================
   8. MENU BAR
   ========================================================================== *
/* Active Page Link Underline in Menu Bar */
nav a.nav-active {
  border-bottom: 2px solid goldenrod !important;
  color: goldenrod !important;
  padding-bottom: 2px;
}

/* Nav Bar Profile Dropdown & GO Button */
.nav-profile-select {
  background-color: #1a1a1a;
  color: goldenrod;
  border: 1px solid goldenrod;
  padding: 3px 6px;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.nav-go-btn {
  background-color: goldenrod;
  color: #000000;
  border: none;
  padding: 3px 8px;
  font-weight: bold;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 3px;
}

.nav-go-btn:hover {
  background-color: #DAA520;
}

/* ==========================================================================
   9. FOOTER & BLOG POST (GRASS GREEN)
   ========================================================================== */
footer {
  background-color: #152E15; /* Rich Dark Forest Green background */
  color: #ffffff; /* White text */
  padding: 25px 20px;
  margin-top: 40px;
  border-top: 3px solid #3B7A20;
}

.footer-blog {
  max-width: 800px;
  margin: 0 auto;
}

.footer-blog h3 {
  color: #ffffff; /* White header inside green footer */
  text-align: left;
  margin-bottom: 8px;
}

.footer-blog p {
  font-size: 0.95rem;
  line-height: 1.5;
}