:root {
  --primary-color: #0A2239;
  --accent-color: #FFD700;
  --text-color: #ffffff;
  --bg-dark: #1a1a1a;
  --bg-light: #2c2c2c;
}

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

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-dark);
}

.header-container, .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
.site-header {
  background-color: var(--primary-color);
  padding: 15px 0;
  border-bottom: 3px solid var(--accent-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.site-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  color: var(--accent-color);
  font-size: 2.2em;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.site-header .logo:hover {
  color: #fff;
}

.main-nav ul {
  list-style: none;
  display: flex;
}

.main-nav ul li {
  margin-left: 30px;
}

.main-nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05em;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--accent-color);
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
  width: 100%;
}

/* New Auth Buttons Styles */
.auth-buttons {
  display: flex;
  gap: 10px;
  margin-left: 20px; /* Space from main nav */
}

.auth-button {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.95em;
  white-space: nowrap;
}

.auth-button.register-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
}

.auth-button.register-button:hover {
  background-color: #fff;
  color: var(--primary-color);
  border-color: #fff;
}

.auth-button.login-button {
  background-color: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.auth-button.login-button:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}

.site-header.active .hamburger-menu .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.site-header.active .hamburger-menu .bar:nth-child(2) {
  opacity: 0;
}
.site-header.active .hamburger-menu .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Footer Styles */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-color);
  padding: 40px 0 20px;
  border-top: 3px solid var(--accent-color);
  font-size: 0.9em;
}

.site-footer .footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  color: var(--accent-color);
  font-size: 1.3em;
  margin-bottom: 15px;
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-col p {
  margin-bottom: 10px;
  color: #bbb;
}

.footer-col a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent-color);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav ul li {
  margin-bottom: 8px;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Header Layout (Hamburger left, Logo center, Buttons below) */
  .site-header .header-container {
    display: grid;
    grid-template-columns: auto 1fr auto; /* Hamburger | Logo (fills space) | (empty or other) */
    grid-template-rows: auto auto; /* Top row for hamburger/logo, second row for buttons */
    align-items: center;
    gap: 10px 0; /* Vertical gap 10px, horizontal gap 0 */
  }

  .hamburger-menu {
    display: block;
    grid-column: 1 / 2; /* First column */
    grid-row: 1 / 2; /* First row */
    justify-self: start; /* Align to start of its grid cell */
    margin: 0; /* Reset any default margin */
  }

  .site-header .logo {
    font-size: 1.8em;
    grid-column: 2 / 3; /* Second column, takes up remaining space */
    grid-row: 1 / 2; /* First row */
    justify-self: center; /* Center horizontally in its grid cell */
    text-align: center; /* Ensure text is centered if it wraps */
  }

  .main-nav {
    /* On mobile, main-nav is absolutely positioned and slides down, so hide it from the grid flow */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
    opacity: 0;
    visibility: hidden;
    /* Re-enable display when active */
  }

  .site-header.active .main-nav {
    display: flex; /* Override display: none when active */
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .auth-buttons {
    grid-column: 1 / -1; /* Span all columns */
    grid-row: 2 / 3; /* Second row, below logo */
    display: flex; /* Keep buttons side-by-side */
    justify-content: center; /* Center buttons within this new row */
    gap: 10px;
    margin: 0; /* Reset desktop margin */
    padding: 0 15px; /* Add padding to align with container edges */
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
  }

  .main-nav ul li {
    margin: 15px 0;
    width: 100%;
  }

  .main-nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 1.1em;
  }

  .main-nav ul li a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .site-footer .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
}