/* --- Global Reset and Fonts --- */
body {
    background-color: transparent; /* Makes the main body invisible against the game client */
    margin: 0;
    padding: 0;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    color: #FFFFFF;
    overflow: hidden; /* Prevent body scrollbars */
}

/* --- Main Layout Structure --- */
#window-container {
    background-color: #0d0d0d; /* Dark background for the window area */
    border: 1px solid #333;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    height: 100vh; /* Fill the entire WebView2 container */
    overflow: hidden; /* Prevent inner scrollbars on the window itself */
}

#title-bar {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #444;
    color: #FFD700; /* Goldish title */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

#content-area {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for flex child with overflow-y auto */
}

/* --- Header Section (Tabs and Points) --- */
#header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align to the bottom of the flex container */
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px; /* Space between tabs and line */
}

/* Tabs */
#tab-container {
    display: flex;
    gap: 2px;
}

.tab-button {
    background-color: #1a1a1a;
    color: #999;
    padding: 8px 20px;
    text-decoration: none;
    border: 1px solid #333;
    border-bottom: none; /* Hide bottom border for default */
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s, color 0.2s;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.tab-button:hover {
    background-color: #2a2a2a;
    color: #bbb;
}

.tab-button.active {
    background-color: #2c2c2c;
    color: #FFD700; /* Gold color for active tab */
    border-top: 2px solid #FFD700;
    border-left-color: #FFD700;
    border-right-color: #FFD700;
    border-bottom: 1px solid #2c2c2c; /* Blend with content area */
    box-shadow: none; /* Remove inner shadow for active */
}

/* Points Info */
#points-info {
    display: flex;
    align-items: center;
    color: #bbb;
    font-size: 11px;
    gap: 5px; /* Space between elements */
}

.icon-bullet {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #00FF00; /* Green bullet */
    border-radius: 50%;
    border: 1px solid #00AA00;
}

#current-points {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255,215,0,0.5);
}

#learn-more-btn {
    background: linear-gradient(to bottom, #444, #222);
    color: #FFD700;
    border: 1px solid #666;
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
    box-shadow: inset 0 1px 3px rgba(255,215,0,0.2);
}

#learn-more-btn:hover {
    background: linear-gradient(to bottom, #555, #333);
    border-color: #FFD700;
}

/* --- Tier Icons (Bronze, Gold, etc.) --- */
#tier-icons {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.tier-item {
    text-align: center;
    padding: 5px;
    opacity: 0.5; /* Dim inactive tiers */
    transition: opacity 0.2s, color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    /* Removed cursor: pointer; if tiers aren't clickable/functional */
}

.tier-item.active {
    opacity: 1;
    color: #FFD700;
    /* Optional: A subtle glow for the active one */
    text-shadow: 0 0 5px rgba(255,215,0,0.7);
}

.tier-icon {
    width: 32px; /* Adjust size of your rank images */
    height: 32px;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.8)); /* Small shadow for depth */
}

/* --- Ranking Table --- */
#ranking-table-container {
    flex-grow: 1;
    overflow-y: auto; /* Allows scrolling if more than 10 rows are needed */
    border: 1px solid #333;
    background-color: #121212;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}

#ranking-table {
    width: 100%;
    border-collapse: collapse;
}

#ranking-table th, #ranking-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #333;
    white-space: nowrap; /* Prevent text wrapping in table cells */
}

#ranking-table th {
    background-color: #222;
    color: #FFD700;
    text-transform: uppercase;
    font-size: 11px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

#ranking-table tbody tr:nth-child(odd) { 
    background-color: #181818;
}

#ranking-table tbody tr:nth-child(even) {
    background-color: #121212;
}

#ranking-table tbody tr:hover {
    background-color: #2a2a2a;
}

/* Specific styling for the rank numbers and player names */
#ranking-table td:first-child {
    text-align: center;
    font-weight: bold;
    color: #bbb;
}

.char-name {
    font-weight: bold;
    color: #fff;
}

/* --- Pagination Bar --- */
#pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #333;
    margin-top: auto; /* Pushes the pagination bar to the bottom */
    background-color: #0d0d0d;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-btn {
    display: block;
    width: 24px; /* Size for arrow images */
    height: 24px;
    background-color: #222;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 60%; /* Adjust size of the arrow image within the button */
}

.nav-btn:hover:not(.disabled) {
    background-color: #444;
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: default;
    background-color: #1a1a1a;
    border-color: #333;
}

/* IMPORTANT: Ensure these image paths are correct relative to styles.css */
.nav-btn.left-arrow {
    background-image: url('images/nav_left_arrow.png'); /* Your left arrow image */
}

.nav-btn.right-arrow {
    background-image: url('images/nav_right_arrow.png'); /* Your right arrow image */
}

.page-text {
    color: #FFD700;
    font-weight: bold;
    margin: 0 5px;
}

.page-input {
    width: 30px;
    text-align: center;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 3px 0;
    border-radius: 3px;
}