/* ===== Fonts ===== */
@font-face {
    font-family: 'Minecraft_Mojangles';
    src: url('/static/fonts/Minecraft_Mojangles.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===== Body ===== */
body {
    font-family: 'Minecraft_Mojangles', Arial, sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    margin: 0;
    padding: 20px;
}

a {
    color: #38bdf8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: auto;
}

/* ===== Headings ===== */
h1, h2, h3, h4 {
    margin-bottom: 10px;
}

h1 a {
    color: #fbbf24; /* gold-ish Minecraft color */
    text-decoration: none;
}

.card h2 {
    color: #facc15; /* category color */
    margin-top: 15px;
}

.card h3 {
    color: #f472b6; /* stat color */
    margin-top: 10px;
}

/* ===== Cards ===== */
.card {
    background: #1e293b;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* ===== Leaderboard Entries ===== */
.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #334155;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.rank {
    font-weight: bold;
    margin-right: 10px;
}

.leaderboard-entry .value {
    font-weight: bold;
}

/* ===== Player Stats Page ===== */
.player-stats {
    display: flex;
    flex-direction: column;
}

/* Sticky category header */
.player-stats .category-header {
    position: sticky;
    top: 0;
    background-color: #1e293b;
    color: #facc15;
    font-weight: bold;
    font-size: 18px;
    padding: 8px 12px;
    margin-left: -5px;
    border-bottom: 1px solid #334155;
    z-index: 20;
}

/* Sticky stat column headers */
.player-stats .stat-header {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    font-weight: bold;
    color: #f472b6;
    background-color: #1e293b;
    position: sticky;
    margin-left: -5px;
    top: 45px; /* below category header */
    z-index: 15;
}

/* Single line per stat: name | rank | value */
.player-stats .stat-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    border-bottom: 1px solid #334155;
}

.player-stats .stat-entry:last-child {
    border-bottom: none;
}

.player-stats .stat-name {
    flex-grow: 1;
    text-align: left;
}

.player-stats .stat-rank {
    width: 50px; /* fixed width for rank */
    text-align: right;
    font-weight: bold;
    margin-left: 20px;
}

.player-stats .stat-value {
    width: 120px; /* more space for scores */
    text-align: right;
    font-weight: bold;
    margin-left: 20px;
}

/* ===== Voting Links ===== */
.links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.vote-link {
    display: inline-block;
    padding: 6px 12px;
    background: #38bdf8;
    color: #0f172a;
    border-radius: 5px;
    text-decoration: none;
}

.vote-link:hover {
    background: #0ea5e9;
    color: #fff;
}

/* ===== Stat Groups ===== */
.stat-group h4 {
    margin: 8px 0;
    font-size: 16px;
    color: #facc15; /* yellow for stat names */
}

/* ===== Optional spacing for leaderboard cards ===== */
.category-card .stat-group {
    margin-top: 10px;
}
/* ===== Stats Page Sticky Headers ===== */
.category-card {
    margin-bottom: 20px;
    position: relative;
}

.category-card .category-header {
    position: sticky;
    top: 0;
    background-color: #1e293b;
    color: #facc15;
    font-weight: bold;
    font-size: 18px;
    padding: 8px 12px;
    margin-left: -5px;
    border-bottom: 1px solid #334155;
    z-index: 10;
}
