:root{
    --bg: #0f1720;
    --card: #0b1220;
    --muted: #9aa5ad;
    --accent: #1f7a4c; /* forest green accent */
    --white: #f5f7f9;
    --radius: 10px;
    --shadow: 0 6px 20px rgba(0,0,0,0.6);
    font-family: Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

body{
    margin:0;
    background: linear-gradient(180deg, #071018 0%, #071219 100%);
    color:var(--white);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}


.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.section-left {
    width: 25%;
}

.section-center {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.section-right {
    width: 25%;
}

.logo-left img {
    height: 80px;
}

.logo-center img {
    height: 120px;
}

.logo-center {
    text-align: center;
}

.navigation ul,
.user-functions ul {
    list-style: none;
    gap: 15px;
}

a {
    text-decoration: none;
}

.navigation a,
.user-functions button {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.user-functions button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-functions svg {
    width: 20px;
    height: 20px;
}

/* Modal box */
.modal {
    position: relative;
    background: white;
    max-width: 400px;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease-out;
}

.modal h2 {
    color: #0f1720;
}

/* Close button */
.modal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 18px;
    cursor: pointer;
    color: #0f1720
}

/* Form */
.modal form {
    display: flex;
    flex-direction: column;
}
.modal input {
    margin: 8px 0;
    padding: 10px;
    font-size: 14px;
}
.modal button {
    margin-top: 10px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}
.modal button:hover {
    background-color: #45a049;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hamburger menu icon */
.menu-icon {
    width: 30px;
    cursor: pointer;
    margin: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    margin-left: auto;
}
.menu-icon .bar {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
}

/* Menu panel */
.menu-panel {
    display: none;
    position: absolute;
    top: 50px; /* below menu icon */
    left: 15px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 5px;
    padding: 10px;
    flex-direction: column;
    z-index: 1000;
}

/* Menu buttons */
.menu-btn {
    background: none;
    border: none;
    padding: 10px;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    color: purple;
}
.menu-btn:hover {
    background-color: #f0f0f0;
}

body {
  font-family: Arial, sans-serif;
}

h2 {
  text-align: center;
}

/* Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
}

/* Modal wrapper for sliding */
.modal-wrapper {
  position: relative;
  width: 300%;
  display: flex;
  transition: transform 0.4s ease;
  background-color: lightgrey;
}

.show-login .modal-wrapper {
  transform: translateX(-33.3%);
}

.show-register .modal-wrapper {
  transform: translateX(-66.6%);
}

.show-reset-password .modal-wrapper {
  transform: translateX(33.3%);
}

/* Panel */
.modal {
  width: 50%;
  padding: 20px;
  background: white;
  box-sizing: border-box;
  position: relative;
}

/* Container */
.modal-container {
  max-width: 400px;
  margin: 10% auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: white;
}

/* Close button */
.close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 18px;
  cursor: pointer;
}

/* Form styles */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 30px;
}
input {
  padding: 10px;
  font-size: 14px;
}
.error-msg {
  display: none;
  font-size: 12px;
  color: red;
  margin-top: -6px;
  text-align: center;
}
.success-msg {
  display: none;
  font-size: 12px;
  color: green;
  margin-top: -6px;
  text-align: center;
}

button {
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}
button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
button:hover:enabled {
  background-color: #45a049;
}

.switch-link {
    text-align: center;
    margin-top: 12px;
}

.switch-link a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.switch-link a:hover {
    text-decoration: underline;
}

/* Profile Page Container */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

/* Page Title */
.profile-page .page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--white);
}

/* Card Style (Reusable) */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* User Info Section */
.user-info .profile-field {
    margin: 8px 0;
    font-size: 1rem;
    color: var(--muted);
}

/* Leagues Section */
.user-leagues h2 {
    margin-bottom: 15px;
}

.league-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.league-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.league-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.league-name {
    font-weight: bold;
    color: var(--white);
}

.league-role {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Pick Settings Section */
.pick-settings p {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--muted);
}

/* Buttons */
.btn {
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Primary Button */
.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background: #239a5e; /* lighter green hover */
}

/* Secondary Button */
.btn-secondary {
    background: #444c56;
    color: var(--white);
}
.btn-secondary:hover {
    background: #59636e;
}

/* Success Button */
.btn-success {
    background: #2d8659;
    color: var(--white);
}
.btn-success:hover {
    background: #39a373;
}

/* Link Button */
.btn-link {
    background: none;
    color: var(--accent);
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 0;
}
.btn-link:hover {
    color: #23a35f;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .profile-page {
        padding: 10px;
    }

    .league-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Not Found Page */
.not-found-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 40px 20px;
    color: var(--white);
}

/* Large 404 Code */
.not-found-code {
    font-size: 6rem;
    font-weight: bold;
    color: var(--accent);
    margin: 0;
    text-shadow: 0 0 10px rgba(31, 122, 76, 0.5);
}

/* Title */
.not-found-title {
    font-size: 1.8rem;
    margin: 15px 0 10px;
    color: var(--white);
}

/* Message */
.not-found-message {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 25px;
    max-width: 500px;
}

/* Button reuses existing theme */
.not-found-page .btn-primary {
    padding: 12px 20px;
    font-size: 1rem;
}

.fantasy-golf-simplified {
    font-size: 6rem;
    font-weight: bold;
    color: var(--accent);
    margin: 0;
    text-shadow: 0 0 10px rgba(31, 122, 76, 0.5);
}

.table-theme {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 20px 0;
}

.table-theme th,
.table-theme td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-theme th {
    background: var(--accent);
    color: var(--white);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-theme tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table-theme tr:last-child td {
    border-bottom: none;
}

.btn-add-wrapper {
    margin-left: auto;
    float: right;
}

/* Center navigation container */
.section-center.navigation {
    display: flex;
    justify-content: center;   /* Center horizontally */
    align-items: center;       /* Vertically center items */
    flex: 1;
}

/* Remove list styling and display items horizontally */
.section-center.navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;                 /* Space between links */
    margin: 0;
    padding: 0;
}

/* Style individual nav links */
.section-center.navigation ul li a.nav-link {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    color: #2e4d2c;            /* Dark forest green text */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

/* Hover and active states */
.section-center.navigation ul li a.nav-link:hover,
.section-center.navigation ul li a.nav-link:focus {
    color: #3fa34d;            /* Lighter forest green on hover */
    border-bottom: 2px solid #3fa34d;  /* Underline with accent */
}

/* Optional: show active page link */
.section-center.navigation ul li a.nav-link.active {
    color: #3fa34d;
    border-bottom: 2px solid #3fa34d;
}

/* Responsive: Stack vertically on small screens */
@media (max-width: 768px) {
    .section-center.navigation ul {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* Modal container */
#createLeagueModal .modal {
    max-width: 400px;
    padding: 20px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--white);
    position: relative;
}

#createLeagueModal h2 {
    color: var(--white);
}

/* Close button */
#createLeagueModal .close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

/* Input fields */
#createLeagueModal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

#createLeagueModal label {
    margin-bottom: 6px;
    font-weight: bold;
    color: var(--white);
}

#createLeagueModal input[type="text"] {
    padding: 10px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    background-color: rgba(255,255,255,0.05);
    color: var(--white);
}

#createLeagueModal .checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

#createLeagueModal input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Action button */
#createLeagueModal .btn-submit {
    width: 100%;
    padding: 10px;
    background-color: var(--accent);
    color: var(--white);
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#createLeagueModal .btn-submit:hover {
    background-color: #2da868; /* slightly lighter forest green */
}

.btn-add-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.search-wrapper {
    display: flex;
    align-items: center;
}

#search-leagues-input {
    height: 36px;
    border-radius: 6px 0 0 6px;
    border: 1px solid #ccc;
    padding: 0 10px;
    outline: none;
}

#search-leagues-input:focus {
    border-color: #2f855a;  /* match green theme */
    box-shadow: 0 0 4px rgba(47, 133, 90, 0.4);
}

#search-leagues-btn {
    height: 36px;
    border-radius: 0 6px 6px 0;
    border: 1px solid #2d3748;
    cursor: pointer;
}

footer {
    font-size: xx-small;
    margin-left: 5px;
    color: var(--accent);
}
