body {
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1A1A2E;
    color: #FFFFFF;
}

header {
    padding: 1rem;
    text-align: center;
    background-color: #2E2E48;
    border-radius: 0 0 12px 12px;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

.gamemode-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #4D4D7A;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.gamemode-tabs .tab {
    padding: 0.5rem 1rem;
    background-color: #2E2E48;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color 0.3s;
}

.gamemode-tabs .tab.active {
    background-color: #6666AA;
}

.gamemode-tabs .tab:hover {
    background-color: #555588;
}

.gamemode-tabs .tab span {
    font-size: 1.2rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.player-rankings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #2E2E48;
    border-radius: 12px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.player-card .rank {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 1rem;
}

.player-card .player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.player-card .player-name {
    font-size: 1.2rem;
    font-weight: 500;
}

.player-card .player-title {
    font-size: 0.9rem;
    color: #CCCCCC;
}

.player-card .stats-btn {
    background-color: #6666AA;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.player-card .stats-btn:hover {
    background-color: #555588;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2E2E48;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    color: #FFFFFF;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #CCCCCC;
}

.close-btn:hover {
    color: #FFFFFF;
}

.modal-content h3 {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    color: #FFFFFF;
}

.modal-content h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
    color: #CCCCCC;
}

.modal-content p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #FFFFFF;
}

.modal-content ul {
    list-style: none;
    padding: 0;
}

.modal-content ul li {
    margin: 0.3rem 0;
    font-size: 1rem;
    color: #CCCCCC;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #2E2E48;
    color: #FFFFFF;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

@media (max-width: 600px) {
    .gamemode-tabs {
        flex-direction: column;
        align-items: center;
    }

    .player-card {
        flex-direction: column;
        text-align: center;
    }

    .player-card .player-info {
        margin-bottom: 0.5rem;
    }

    .player-card .stats-btn {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}
