/* --- Global Reset and Fonts --- */
body {
    background-color: transparent; /* Game window handles background */
    margin: 0;
    padding: 0;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    overflow: hidden;
    user-select: none;
}

/* --- Main Layout --- */
#window-container {
    /* If the game window provides the border, keep transparent. 
       If you need the black box, use background-color: #050505; */
    background-color: #080808; 
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
}

#content-area {
    padding: 10px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* --- Header Section --- */
#header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align tabs bottom */
    margin-bottom: 5px;
    border-bottom: 2px solid #5a4a2a; /* Gold/Brown line under tabs */
    padding-bottom: 2px;
}

/* Tabs */
#tab-container {
    display: flex;
    gap: 2px;
}

.tab-button {
    /* Glassy Blue Gradient */
    background: linear-gradient(to bottom, #7da0c8 0%, #35587e 50%, #264365 51%, #4f739a 100%);
    color: #a0b0c0;
    width: 110px; /* Wider tabs */
    padding: 6px 0;
    text-decoration: none;
    border: 1px solid #1a2a3a;
    border-bottom: none;
    border-radius: 6px 6px 0 0; /* Slightly rounded top */
    font-weight: bold;
    text-align: center;
    font-size: 12px;
    text-shadow: 1px 1px 2px #000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.tab-button:hover {
    filter: brightness(1.2);
}

.tab-button.active {
    /* Brighter, more silver/white active state */
    background: linear-gradient(to bottom, #aebcd0 0%, #6882a6 50%, #466289 51%, #6e8ab3 100%);
    color: #ffffff;
    text-shadow: 0 0 5px #fff, 1px 1px 2px #000;
    border-color: #4a5a6a;
}

/* Points Info */
#points-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.info-text {
    color: #00ddff; /* Cyan color */
    font-weight: bold;
    font-size: 11px;
    text-shadow: 1px 1px 1px #000;
}

.blue-dot {
    color: #00ffff;
    font-size: 10px;
    margin-right: 3px;
    text-shadow: 0 0 5px #00ffff;
}

#current-points {
    color: #ffffff;
}

#learn-more-btn {
    /* Gold Button Style */
    background: linear-gradient(to bottom, #d4af37 0%, #a67c00 50%, #856300 51%, #b38b10 100%);
    color: #fff;
    border: 1px solid #554400;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 10px;
    text-shadow: 1px 1px 1px #000;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
#learn-more-btn:hover {
    filter: brightness(1.15);
}

.icon-i {
    background: #fff;
    color: #856300;
    border-radius: 50%;
    width: 11px;
    height: 11px;
    display: inline-block;
    text-align: center;
    line-height: 11px;
    font-family: serif;
    font-weight: bold;
}

/* --- Tier Section (The "Clean" Look) --- */
#tier-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #050505;
    border-bottom: 1px solid #333;
    padding: 10px 0;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
}

/* Separator between tiers */
.tier-separator {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #444, transparent);
}

.tier-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    padding: 5px 0;
}

/* The Background Glows */
.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.3; /* Subtle glow */
    pointer-events: none;
}

/* Specific Colors for Glows */
.tier-bronze .glow-bg { background: radial-gradient(circle, #cd7f32 0%, transparent 70%); }
.tier-silver .glow-bg { background: radial-gradient(circle, #e0e0e0 0%, transparent 70%); }
.tier-gold .glow-bg { background: radial-gradient(circle, #ffd700 0%, transparent 70%); }
.tier-platinum .glow-bg { background: radial-gradient(circle, #e5e4e2 0%, transparent 70%); }
.tier-diamond .glow-bg { background: radial-gradient(circle, #00ffff 0%, transparent 70%); }

.tier-icon {
    width: 36px;
    height: 36px;
    z-index: 1;
}

.tier-text {
    z-index: 1;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1.2;
}

.pts {
    font-size: 12px;
    color: #fff;
    text-shadow: 0 0 2px #000;
}

/* Specific text colors matching the rank */
.tier-bronze .tier-text { color: #cd7f32; }
.tier-silver .tier-text { color: #a0a0a0; }
.tier-gold .tier-text { color: #d4af37; }
.tier-platinum .tier-text { color: #dda0dd; }
.tier-diamond .tier-text { color: #00ffff; }


/* --- Ranking Table --- */
#ranking-table-container {
    flex-grow: 1;
    border: 1px solid #444;
    background: #000;
    display: flex;
    flex-direction: column;
}

#ranking-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures column widths stay fixed */
}

#ranking-table thead th {
    /* Crystal/Glass Header */
    background: linear-gradient(to bottom, #7da0c8 0%, #35587e 50%, #264365 51%, #4f739a 100%);
    color: #fff;
    font-family: "Times New Roman", Times, serif; /* Serif font for header */
    font-size: 13px;
    font-weight: bold;
    text-transform: capitalize;
    padding: 6px 5px;
    text-align: center;
    border-right: 1px solid rgba(0,0,0,0.5);
    border-left: 1px solid rgba(255,255,255,0.2);
    text-shadow: 2px 2px 2px #000;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

#ranking-table tbody tr {
    background-color: #000;
    height: 28px; /* Fixed height for 10 rows */
}

#ranking-table tbody td {
    border-bottom: 1px solid #1a1a1a;
    padding: 0 10px;
    font-size: 12px;
    color: #fff;
    font-weight: bold;
}

/* Column Alignments */
.col-rank { text-align: center; color: #fff; }
.col-name { text-align: left; color: #fff; }
.col-lvl { text-align: center; color: #fff; }
.col-pts { text-align: right; color: #fff; }


/* --- Pagination --- */
#pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 5px;
    gap: 10px;
}

.nav-arrow {
    width: 0; 
    height: 0; 
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    cursor: pointer;
}

.nav-arrow.left {
    border-right: 8px solid #d4af37;
}
.nav-arrow.left:hover { border-right-color: #ffd700; }

.nav-arrow.right {
    border-left: 8px solid #d4af37;
}
.nav-arrow.right:hover { border-left-color: #ffd700; }

.nav-arrow.disabled {
    opacity: 0.3;
    cursor: default;
}

.page-display {
    display: flex;
    align-items: center;
}

.page-box {
    background-color: #111;
    border: 1px solid #444;
    color: #d4af37;
    padding: 1px 8px;
    font-weight: bold;
    font-size: 11px;
}