html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: white;
  font-family: sans-serif;
}

.container {
  padding: 20px;
  overflow-y: auto;
}

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
  color: #e0e0e0;
  z-index: 10;
}

.header-back {
  color: #00fa9a;
  font-weight: bold;
  text-decoration: none;
  z-index: 2;
}

.header-user {
  min-width: 120px;
  text-align: right;
  font-weight: bold;
  color: #00fa9a;
  z-index: 2;
}

.header-login-button {
  background-color: #00fa9a;
  /* Neon green */
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  color: black;
  cursor: pointer;
  transition: background-color 0.2s;
}

.header-login-button:hover {
  background-color: #00d78a;
}

.header-city {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 18px;
  color: #e5c559;
  white-space: nowrap;
  z-index: 1;
}

.tournaments-intro {
  text-align: center;
  margin-top: 0px;
}

.tournaments-intro h2 {
  margin-top: 5px;
  margin-bottom: 10px;
}

.league-button {
  padding: 12px 20px;
  margin: 10px 5px;
  background-color: #00fa9a;
  color: black;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

section h3 {
  color: #e5c559;
  margin-bottom: 10px;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.league-button {
  width: 200px;
  margin: 10px auto;
}

/* Mobile responsive header */
@media (max-width: 600px) {
  .header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    /* prevent wrapping */
    padding: 12px 20px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
    position: relative;
    z-index: 10;
  }

  .header-back,
  .header-user {
    flex: 1;
  }

  .header-back {
    text-align: left;
  }

  .header-user {
    text-align: right;
  }

  .header-city {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    color: #e5c559;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }
  footer {
    text-align: center;
    font-size: 12px;
  }
}

footer {
  margin-top: 40px;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  background-color: #1a1a1a;
}

footer a {
  color: #00fa9a;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background-color: #1e1e1e;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #333;
  width: 90%;
  max-width: 400px;
  color: white;
  border-radius: 8px;
  position: relative;
  max-height: 90vh;
  /* 90% of the viewport height */
  overflow-y: auto;
  padding-right: 16px;
  /* to avoid content cutoff from scrollbar */
}

.modal-form label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.modal-form input,
.modal-form textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  background-color: #2a2a2a;
  border: 1px solid #555;
  color: white;
  border-radius: 4px;
}

.submit-btn {
  background-color: #00fa9a;
  color: black;
  padding: 10px;
  border: none;
  margin-top: 15px;
  width: 100%;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

.submit-btn:hover {
  background-color: #00d78a;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

.close-btn:hover {
  color: white;
}

.flatpickr-input + .flatpickr-calendar {
  color-scheme: light dark;
  /* optional for dark mode support */
}

.flatpickr-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  /* turns dark icon to white */
  opacity: 1;
}

.ts-control {
  background-color: #fff !important;
  color: #000 !important;
  border-radius: 6px;
  font-size: 16px;
}

.dark-mode .ts-control {
  background-color: #222 !important;
  color: #fff !important;
}

.tournament-card {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-left: 4px solid #00fa9a;
  /* neon green accent */
  padding: 15px 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #e0e0e0;
  box-shadow: 0 0 8px rgba(0, 250, 154, 0.1);
  transition: transform 0.2s ease;
}

.tournament-card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 12px rgba(0, 250, 154, 0.2);
}

.tournament-card h3 {
  margin: 0 0 6px;
  color: #00fa9a;
  font-size: 20px;
}

.tournament-card p {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #ccc;
}

.tournament-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background-color 0.2s;
}

.tournament-link:hover .tournament-card {
  background-color: #2a2a2a;
}

.tournaments-intro {
  max-width: 980px;
  margin: 20px auto 8px; /* reduced top and bottom spacing */
  padding: 0 16px;
  text-align: center;
}

.tournaments-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem); /* smaller font */
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00fa9a;
  text-shadow: 0 0 8px rgba(0, 250, 154, 0.4);
  margin: 6px 0 8px; /* tighter spacing */
}

/* neon accent bar matching styles.css, scaled for h2 */
.tournaments-intro h2::after {
  content: "";
  display: block;
  height: 3px; /* slightly thinner */
  width: 100px; /* shorter bar */
  margin: 6px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #00fa9a, rgba(0, 250, 154, 0));
}
