﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0b0d10;
    color: #e8e8e8;
    font-family: Arial, sans-serif;
}


/* Header */

header {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111419;
    border-bottom: 1px solid #252a31;
}

h1 {
    margin: 0;
    font-size: 24px;
}

header span {
    color: #777;
    font-size: 12px;
}

nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

    nav a {
        color: #777;
        font-size: 12px;
        font-weight: bold;
        text-decoration: none;
        letter-spacing: 1px;
    }

        nav a:hover,
        nav a.active {
            color: #e8e8e8;
        }


/* Layout */

main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 14px;
    letter-spacing: 2px;
    color: #999;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title {
    margin-bottom: 30px;
}

    .page-title h2 {
        margin-bottom: 8px;
    }

    .page-title span {
        color: #777;
        font-size: 12px;
    }


/* Server Info */

.server-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.card {
    padding: 20px;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
}

    .card strong {
        display: block;
        margin-top: 10px;
        font-size: 22px;
    }

.label {
    color: #777;
    font-size: 11px;
}


/* Factions */

.factions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.faction {
    padding: 20px;
    background: #15191f;
    border: 1px solid #252a31;
    border-left: 4px solid;
    border-radius: 8px;
}

    .faction strong {
        font-size: 24px;
    }


/* Player Table */

.table-container {
    overflow-x: auto;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #252a31;
}

th {
    color: #777;
    font-size: 11px;
}

td {
    font-size: 14px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.empty {
    padding: 40px;
    text-align: center;
    color: #666;
}


/* Server Connection */

.online {
    color: #54d17a;
    font-size: 12px;
}

.offline {
    color: #e05252;
    font-size: 12px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #54d17a;
}

.offline .dot {
    background: #e05252;
}


/* Player Chart */

.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
}


/* Leaderboards */

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.leaderboard {
    overflow: hidden;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
}

    .leaderboard h2 {
        margin: 0;
        padding: 18px;
        border-bottom: 1px solid #252a31;
    }

.leaderboard-row {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #252a31;
}

    .leaderboard-row:last-child {
        border-bottom: 0;
    }

.rank {
    color: #777;
    font-size: 12px;
    font-weight: bold;
}

.leaderboard-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-value {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
}

.online-marker {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #54d17a;
}
/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .profile-header h2 {
        margin: 8px 0 0;
        color: #e8e8e8;
        font-size: 28px;
        letter-spacing: 0;
    }

.logout-button {
    padding: 10px 16px;
    color: #999;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 6px;
}

    .logout-button:hover {
        color: #e8e8e8;
        border-color: #3a414b;
    }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
    overflow: hidden;
}

.profile-stat {
    padding: 28px;
    border-right: 1px solid #252a31;
}

    .profile-stat:last-child {
        border-right: 0;
    }

    .profile-stat strong {
        display: block;
        margin: 12px 0 8px;
        font-size: 26px;
    }

.profile-rank {
    color: #777;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.profile-error {
    padding: 40px;
    text-align: center;
    background: #15191f;
    border: 1px solid #252a31;
    border-radius: 8px;
}

.profile-error h2 {
    color: #e8e8e8;
}

.profile-error p {
    color: #777;
}

#accountLink {
    margin-left: 15px;
}



/* Footer */

footer {
    padding: 30px;
    text-align: center;
    color: #555;
    font-size: 12px;
}


/* Responsive */

@media (max-width: 1000px) {
    .leaderboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    header {
        padding: 0 20px;
    }

    nav {
        gap: 12px;
    }

    .server-info,
    .factions {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-stat:nth-child(2) {
        border-right: 0;
    }

    .profile-stat:nth-child(-n+2) {
        border-bottom: 1px solid #252a31;
    }
}

@media (max-width: 600px) {
    .leaderboard-grid,
    .server-info,
    .factions {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-stat {
        border-right: 0;
        border-bottom: 1px solid #252a31;
    }

        .profile-stat:last-child {
            border-bottom: 0;
        }

    .profile-header {
        align-items: flex-start;
    }
}
