body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #1b1b1b;
    color: white;
}

nav {
    background-color: #2b2b2b;
    text-align: center;
    padding: 12px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    position: relative;
    padding-bottom: 12px;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-color: #899449;
    opacity: 0;
    transition: opacity 0.2s;
}

nav a:hover::after,
nav a.active::after {
    opacity: 1;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

h1 {
    margin: 0;
}

header {
    background-color: #000;
    padding-top: 10px;
    padding-bottom: 5px;
    text-align: center;
    border-bottom: 3px solid #899449;
}

header img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.welcome {
    font-size: 1.2rem;
    line-height: 1.6;
}

.hero {
    text-align: center;
    padding: 50px 20px 10px;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero h2 {
    color: #899449;
    font-size: 28px;
}

.hero p {
    max-width: 700px;
    margin: 20px auto;
    font-size: 18px;
    line-height: 1.6;
}

.hero button {
    background-color: #899449;
    color: black;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.hero button:hover {
    opacity: 0.8;
}

.stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.stats button {
    background-color: #899449;
    color: black;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.stats button:hover {
    opacity: 0.8;
}

.card {
    background-color: #2b2b2b;
    width: 200px;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #444;
}

.card h3 {
    margin-top: 0;
    color: #899449;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

.latest-event {
    text-align: center;
    padding: 40px 20px;
}

.latest-event h2 {
    color: #899449;
}

.event-card {
    background-color: #2b2b2b;
    max-width: 500px;
    margin: 20px auto;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #444;
}

.event-card h3 {
    margin-top: 0;
}

.event-card button {
    background-color: #899449;
    color: black;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
}

.page-header {
    text-align: center;
    padding: 50px 20px 20px;
}

.page-header h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
}

.page-header p {
    font-size: 18px;
}

.rules-section {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
}

.rules-section.card {
    padding: 25px;
}

.rules-section h2 {
    color: #899449;
    margin-top: 0;
}

.rules-section p {
    line-height: 1.6;
}

.rules-section h3 {
    color: #899449;
    margin-top: 25px;
}

.rules-section li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.formula {
    background-color: #1a1a1a;
    border: 1px solid #444;
    padding: 15px;
    margin: 15px 0;
    font-family: monospace;
    text-align: left;
}

.rules-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 25px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    text-align: left;
}

.rules-section h2 {
    text-align: center;
}

.rules-section a {
    color: #899449;
    text-decoration: underline;
    font-weight: normal;
}

.rules-section a:hover {
    color: #899449;
}

.button-link {
    display: inline-block;
    background-color: #899449;
    color: black;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.button-link:hover {
    opacity: 0.8;
}

.player-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}


.player-card h2 {
    color: #899449;
    margin-top: 0;
}


.player-card {
    width: 250px;
    text-align: left;
    transition: transform 0.2s;
}

.player-card {
    background-color: #2b2b2b;
    width: 250px;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #444;
    text-align: left;
    transition: transform 0.2s;
}


.player-card:hover {
    transform: translateY(-5px);
}

.player-card .button-link {
    display: inline-block;
    margin-top: 15px;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}


.event-card {
    background-color: #2b2b2b;
    max-width: 500px;
    width: 100%;
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #444;
}


.event-card h2 {
    color: #899449;
    margin-top: 0;
}

.standings-card {
    max-width: 900px;
    margin: 20px auto;
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
}


table {
    width: 100%;
    border-collapse: collapse;
}


th {
    color: #899449;
    font-size: 18px;
}


th,
td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #444;
}


tbody tr:hover {
    background-color: #333;
}

.metagame-card {
    max-width: 900px;
    margin: 20px auto;
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
}

.standings-section {
    max-width: 900px;
    margin: 0px auto;
}


.standings-section h2 {
    color: #899449;
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
}


.standings-card {
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
}

.metagame-section {
    max-width: 900px;
    margin: 0px auto;
}


.metagame-section h2 {
    color: #899449;
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
}


.metagame-card {
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
}

#season-select {
    background-color: #2b2b2b;
    color: white;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    margin-bottom: 20px;
}


#season-select:hover {
    border-color: #899449;
}

#season-select,
#metagame-season-select {
    background-color: #2b2b2b;
    color: white;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    margin-bottom: 20px;
}


#season-select:hover,
#metagame-season-select:hover {
    border-color: #899449;
}

.profile-card {
    max-width: 900px;
    margin: 20px auto;
    padding: 25px;
    background-color: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    text-align: left;
}


.profile-card h2 {
    color: #899449;
    margin-top: 0;
}

.champion-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}


.champion-card {
    background-color: #2b2b2b;
    width: 500px;
    max-width: 90%;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #444;
    text-align: center;
}


.champion-card h2 {
    color: #899449;
    margin-top: 0;
}


.champion-card h1 {
    margin: 15px 0;
}

.champion-images {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
}


.champion-images img {
    width: 220px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #444;
}

@media (max-width: 600px) {

    .metagame-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .metagame-table-container table {
        min-width: 700px;
    }

    .profile-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-table-container table {
        min-width: 600px;
    }

    #head-to-head {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #head-to-head table {
        min-width: 700px;
    }

    nav {
        padding: 10px;
    }

    nav a {
        display: inline-block;
        margin: 8px 10px;
        font-size: 14px;
    }


    header img {
        max-width: 280px;
    }


    main {
        margin: 25px auto;
        padding: 0 10px;
    }


    .hero {
        padding: 30px 10px 10px;
    }


    .hero h1 {
        font-size: 32px;
    }


    .hero h2 {
        font-size: 24px;
    }


    .card,
    .event-card,
    .profile-card,
    .rules-section,
    .champion-card {
        width: auto;
        max-width: 100%;
        padding: 20px;
    }


    .champion-images {
        flex-direction: column;
    }


    .champion-images img {
        width: 90%;
        max-width: 300px;
    }


    table {
        font-size: 14px;
    }


    th,
    td {
        padding: 8px;
    }

}

.admin-card,
.admin-panel {
    background-color: #2b2b2b;
    max-width: 600px;
    margin: 25px auto;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #444;
    text-align: left;
}


.admin-card h2,
.admin-panel h2 {
    color: #899449;
    text-align: center;
}


.admin-panel input,
.admin-panel select,
.admin-card input {
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0 15px;
    padding: 10px;
    background-color: #1b1b1b;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
}


.admin-panel label {
    font-weight: bold;
}


.admin-panel button,
.admin-card button {
    background-color: #899449;
    color: black;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}


.admin-panel button:hover,
.admin-card button:hover {
    opacity: .8;
}

.site-button {
    background-color: #899449;
    color: black;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}


.site-button:hover {
    opacity: 0.8;
}

.admin-logout {
    margin-bottom: 50px;
}

.player-section {
    margin-bottom: 40px;
}

.player-section h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.player-section+.player-section {
    margin-top: 30px;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    color: #899449;
}

.sort-arrow {
    font-size: 0.75em;
    margin-left: 5px;
}

.champion-placement {
    padding: 30px 20px 15px 20px;
    border-top: 1px solid #444;
}

.champion-placement h3 {
    color: #899449;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.champion-placement h1 {
    margin-top: 0;
}

.champion-placement p {
    margin: 12px 0;
}

.champion-first {
    border-top: none;
    padding-top: 0;
}

.champion-list {
    padding-bottom: 60px;
}

.expandable-image {
    cursor: pointer;
}

.image-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;

    background: rgba(0, 0, 0, 0.85);

    justify-content: center;
    align-items: center;

    padding: 40px;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;

    object-fit: contain;

    border-radius: 8px;

    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: fixed;

    top: 20px;
    right: 30px;

    background: none;
    border: none;

    color: white;

    font-size: 40px;
    line-height: 1;

    cursor: pointer;

    z-index: 10000;
}

.champion-card a {
    color: #899449;
    text-decoration: underline;
}

.champion-card a:visited {
    color: #899449;
}

.champion-card a:hover {
    color: #a8b65a;
}

.stats .card {
    min-width: 300px;
}