:root {
    --bg-color: #1a1a1a;
    --panel-bg: rgba(30, 30, 30, 0.85);
    --text-main: #dfdfdf;
    --text-muted: #8c8c8c;
    --accent: #d8b257; /* WoT gold-ish accent */
    --hover-bg: rgba(255, 255, 255, 0.05);
    --border-color: #333;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.9)), url('https://worldoftanks.eu/dcont/fb/image/t_34_85_1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Roboto', sans-serif;
    color: var(--text-main);
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.players-online {
    color: var(--text-muted);
}
.players-online span {
    color: #4CAF50;
    font-weight: bold;
}

.main-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.main-tabs button {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.main-tabs button.active, .main-tabs button:hover {
    color: var(--accent);
}

.main-tabs button.active {
    border-bottom-color: var(--accent);
}

.controls {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
}

.period-selector label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-main);
    user-select: none;
}

.period-selector input {
    display: none;
}

.custom-radio {
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
    position: relative;
}

.period-selector input:checked + .custom-radio {
    border-color: var(--accent);
}

.period-selector input:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    color: var(--text-muted);
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

th:hover {
    color: var(--text-main);
}

th.active-sort {
    color: var(--text-main);
    position: relative;
}

th.active-sort.asc::after {
    content: " ↑";
    font-size: 11px;
}

th.active-sort.desc::after {
    content: " ↓";
    font-size: 11px;
}

td {
    color: #ccc;
}

.col-rank { text-align: center; width: 60px; }
.col-player { text-align: left; color: var(--text-main); font-weight: 500; }

tbody tr {
    transition: background 0.1s;
}

tbody tr:hover {
    background: var(--hover-bg);
}

.player-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-right: 8px;
}

.player-name {
    display: inline-flex;
    align-items: center;
}
