/* Base styles */
html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-size: 1vw;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to top, #006400 0%, white 35%, #eeeeee 100%);
    min-width: 320px;
}

.container {
    max-width: 1420px;
    padding: 0 20px;
    margin: 0 auto;
}

/* Card Styles */
.card {
    margin: 20px auto 85px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: auto;
    max-width: 1400px;
}

.card-header {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

/* Specific table column styles */
.team-name-col {
    width: 35%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.score-col {
    width: 13%;
    text-align: center;
}

/* Mobile adjustments for tables */
@media (max-width: 768px) {
    th, td {
        padding: 8px;
        font-size: 3.5vw;
    }
    
    .team-name-col {
        font-size: 3.5vw;
    }
}

/* Player Score Table Styling */
.player-scores-table, .main-leaderboard {
    background-color: #333;
    color: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.player-scores-table th, 
.player-scores-table td,
.main-leaderboard th,
.main-leaderboard td {
    padding: 5px 10px;
    font-size: 0.85em;
    border: none;
    color: #e0e0e0;
}

.player-scores-table tr,
.main-leaderboard tr {
    background-color: #333;
}

.player-scores-table tr:nth-child(even),
.main-leaderboard tr:nth-child(even) {
    background-color: #444;
}

.player-scores-table th,
.main-leaderboard th {
    background-color: #444;
    color: #f0f0f0;
    border-bottom: 2px solid #555;
}

.player-scores-table tr:hover,
.main-leaderboard tr:hover {
    background-color: #555;
    transition: background-color 0.3s ease;
}

/* Navigation Bar Styling */
.nav-bar {
    background-color: #006400;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: flex;
    width: 100%;
    overflow: hidden;
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.title {
    font-size: 2.8em;
    font-weight: bold;
    color: white;
    display: inline-flex;
    align-items: center;
    margin-right: 25px;
}

.subtitle {
    font-size: 2.0em;
    color: white;
    margin-right: 20px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    flex: 1;
}

.navbar-nav .nav-item .nav-link {
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.2em;
    padding: 5px 10px;
    white-space: nowrap;
    transition: color 0.3s;
    display: block;
}

.navbar-nav .nav-item .nav-link:hover {
    color: #ddd;
}

.logo {
    width: 100px;
    max-width: 100%;
    height: auto;
    margin: 10px;
    padding: 5px;
}
/* Form Styling */
.label-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
label {
    font-size: min(1.4vw, 16px) !important;
}

button {
    background-color: #006400;
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    width: 100%;
}

button:hover {
    background-color: #004d00;
}

/* Team Styling */
.team {
    display: flex;
    align-items: center;
    margin: 5px 0;
    width: 100%;
}

.team-logo {
    max-width: 2.5vw;
    width: auto;
    height: auto;
    max-height: 2.5vw !important;
    margin-right: 5px;
}

.team-name {
    flex: 1;
    min-width: 60px;
    text-align: center;
    height: 2.2vw !important;
    font-size: 1.4vw !important;
    justify-content: center;
    display: flex;
    align-items: center;
}

.team-name.selected {
    color: darkgray !important;
    background-color: gray !important;
}

.team-logo.selected {
    filter: grayscale(100%) contrast(1.2);
}
button {
    font-size: min(1.4vw, 16px) !important;
    border-radius: 1vw !important;

  }
  
select, input {
    width: 25vw !important;
    max-width: 400px !important;
    min-width: 100px !important;
    height: 4vw !important;
    max-height: 60px !important;
    padding: 1vw 2vw !important;
    font-size: min(1.4vw, 16px) !important;
    margin: 0.3vw 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}
label[for="tiebreaker"] {
    width: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    margin-right: 4vw !important;
    margin-left: 10vw !important;

}
input#tiebreaker {
    font-size: 1.4vw !important;
    border: 1px solid #000 !important;
    border-radius: 0.5vw !important;
    width: 10vw !important;
    max-width: 10vw !important;
    min-width: 10vw !important;
    margin: 0 0vw !important;

}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Ensure no child element exceeds the viewport width */
    * {
        box-sizing: border-box; /* Include padding and border in width calculation */
    }
    /* Navigation */
    .nav-bar {
        padding: 2px;
        max-width: 100%;
        min-width: 100%;
        flex-wrap: wrap; /* Allows wrapping if space is constrained */
        justify-content: center; /* Center horizontally */
        align-items: center; /* Center vertically */
    }

    .navbar-nav {
        gap: 4vw;
        justify-content: center;
        align-items: center;
    }

    /* Add hover effects to the empty matches */
    .navbar-nav .nav-item .nav-link {
        color: white;
        font-weight: bold;
        text-decoration: underline;
        text-transform: uppercase;
        font-size: 3.8em;
        padding: 2px 2px;
        white-space: nowrap; /* Prevents wrapping for nav links */
        transition: color 0.3s;
        display: block; /* Ensure nav-link behaves like a block element */
      }
    

      .title {
        font-size: 12.6em;
        color: white;
      }
      .subtitle {
        font-size: 5.0em;
        color: white;
        margin: 0;
        padding-left: 3vw;

      }
      .navbar-brand {
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
    /* body */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .container {
        width: 100%;
        margin: 0px;
        padding: 0px;
    }
    .label-container {
        display: flex;
        align-items: center;
        padding: 0;
        margin: 0;
    }
    /* Form Elements */
    label {
        font-size: 4vw !important;
        margin: 2vw 4vw !important;
        height: 5vw !important;
        max-height: 60px !important;
        width: 10vw !important;
        min-width: 10vw !important;
        max-width: 10vw !important;
    }

    label[for="email"],
    label[for="teamName"] {
        width: 20vw !important;
        min-width: 20vw !important;
        max-width: 20vw !important;
    }

    label[for="tiebreaker"] {
        width: 40vw !important;
        min-width: 40vw !important;
        max-width: 40vw !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    select, input {
        width: 55vw !important;
        max-width: 55vw !important;
        min-width: 55vw !important;
        height: 8vw !important;
        padding: 1vw 2vw !important;
        font-size: 3.5vw !important;
        margin: 1vw 0 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    input#tiebreaker {
        width: 20vw !important;
        font-size: 4.5vw !important;
    }

    input[type="email"], 
    input[type="text"], 
    select {
        width: 100% !important;
        padding: 12px !important;
        font-size: 3.5vw !important;
        margin-bottom: 10px !important;
    }

    /* NFL Teams container styling for mobile */
    #nfl-teams {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        gap: 10px;
        padding: 10px;
    }

    .team {
        flex: 0 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 1vw !important;
        max-width: 30vw !important;
        height: 12vw !important;
    }

    .team-logo {
        width: 12vw !important;
        max-width: 12vw !important;
        height: auto !important;
        max-height: 12vw !important;
    }

    .team-name {
        font-size: 4.5vw !important;
        padding: 1vw 2vw !important;
        height: 12vw !important;
        min-width: 22vw !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Adjust grid layout for form sections */
    .grid.grid-cols-1.md\:grid-cols-12 {
        display: flex;
        flex-direction: column;
    }

    .md\:col-span-5 {
        width: 100%;
    }

    .md\:col-span-2 {
        width: 100%;
    }

    /* Make form buttons larger on mobile */
    button[type="submit"] {
        font-size: 6vw !important;
        padding: 4vw !important;
        margin-top: 2vw !important;
        border-radius: 1vw !important;
    }
    label {
        font-size: 4vw !important;
        margin-bottom: 10px !important;
        min-width: auto !important;  /* Remove fixed width constraints */
        max-width: none !important;
        line-height: 1.2 !important;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .w-1\/3 {  /* This targets the label width class used in your HTML */
        width: 40% !important;  /* Override Tailwind width */
    }
    .col-md-5,
        .col-md-2 {
    padding-left: 10px; /* Remove padding */
    padding-right: 10px; /* Remove padding */
    }
    /* Adjust tiebreaker input specifically */
    input#tiebreaker {
        width: 50vw !important;
        max-width: 50vw !important;
        text-align: center !important;
        margin: 0 !important;
    }
}

/* Grid System */
.col-md-1 { width: 6%; }
.col-md-2 { width: 9%; }
.col-md-3 { width: 24%; }
.col-md-4 { width: 33.33%; }
.col-md-5 { width: 41%; }
.col-md-6 { width: 50%; }
.col-md-7 { width: 58.33%; }
.col-md-8 { width: 66.67%; }
.col-md-9 { width: 75%; }
.col-md-10 { width: 83.33%; }
.col-md-11 { width: 91.67%; }
.col-md-12 { width: 100%; }

/* Help Link Style */
.help-link {
    color: #006400;
    text-decoration: underline;
    cursor: pointer;
}

.help-link:hover {
    color: #004d00;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15px;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close-button:hover {
    color: #000;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .help-link {
        font-size: 3.5vw !important;  /* Increased from 3vw */
    }

    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 5vw !important;    /* Larger title size */
        margin-bottom: 4vw !important; /* Increased spacing */
    }

    .modal-content p {
        font-size: 3.8vw !important;   /* Larger paragraph text */
        line-height: 1.4 !important;   /* Better readability */
    }

    .close-button {
        font-size: 7vw !important;     /* Larger close button */
        right: 3vw;
        top: 1vw;
    }
    #teamsError {
        font-size: 4vw !important;
    }
}

/* Make the help link styles more specific */
.card-header .help-link {
    color: #006400 !important;
    text-decoration: underline !important;
    cursor: pointer;
    font-size: 1vw;
}

.card-header .help-link:hover {
    color: #004d00 !important;
}

.highest-score-row {
    background-color: #4CAF50 !important;
    color: white !important;
    font-weight: bold;
}

.highest-score-row:hover {
    background-color: #45a049 !important;
}

.highest-score-row td {
    border-color: #45a049 !important;
}



 
