.hidden {
    opacity: 0 !important;
}

body {
    margin: 0;
    padding: 0;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    color: white;
    overflow: hidden;
    font-size: 115%;
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.menu {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: 287px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    z-index: 10;
}


.menu-item {
    margin: 11px 0;
    cursor: pointer;
    color: #eeae00;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s, text-shadow 0.3s;
    font-family: 'Verdana', 'Geneva', sans-serif;
    /* Verdana Bold */
    text-shadow: 1px 1px 2px black;
    /* subtle drop shadow like the game */
}

.menu-item:hover {
    color: #FFD700;
    /* gold-ish color on hover */
    text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 320px #eeae00;
}

.player-name-section {
    display: flex;
    flex-direction: column;
    width: 230px;
}

.player-dialog {
    width: 600px;
    max-width: 90vw;
}

.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 16px;
}

.player-stats-table th,
.player-stats-table td {
    border: 1px solid #c9c38c;
    padding: 6px 10px;
    text-align: left;
}

.player-stats-table th {
    background-color: #4a5942;
    color: #ffaa00;
    text-transform: uppercase;
}

.player-stats-table td {
    background-color: #2e2e2e;
    color: white;
}

.hit-model {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* stick content to top */
    gap: 8px;
    /* small spacing between model and text */
    margin-top: 0;
    /* remove extra margin */
}

.player-model {
    width: 150px;
    height: auto;
    display: block;
    margin: 20px auto;
    fill: #444;
    stroke: #aaa;
    stroke-width: 2px;
}

.hit-area {
    fill: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: fill 0.2s;
}

.hit-area:hover {
    fill: rgba(255, 200, 0, 0.4);
}

.hit-tooltip {
    font-size: 1em;
    color: #ffaa00;
    text-align: center;
    margin-top: 4px;
}

#player-dialog .cs-btn {
    text-decoration: none;
}

.cs-slider .ruler {
    z-index: 0;
    margin-left: 2px;
}

.cs-slider label {
    font-size: 23px;
}

.cs-dialog.options-dialog {
    max-width: 690px;
}

.cs-dialog.new-game-dialog {
    width: 600px;

    .cs-select {
        line-height: 18px;
        width: 200px;
    }

    .map-selector {
        display: flex;
        gap: 20px;
        margin-bottom: 15px;
    }

    .description {
        margin-top: 15px;
        line-height: 1.1;
        font-size: 20px;

        a {
            cursor: pointer;
            text-decoration: underline;
            color: var(--accent);
        }
    }
}



.cs-dialog {
    font-size: 23px;
    transform: scale(1.15);
    transform-origin: center;
}

.cs-dialog .heading .text {
    font-size: 20px !important;
}

.cs-dialog .cs-tabs .label {
    font-size: 20px;
}

.cs-dialog .cs-tabs .cs-input {
    font-size: 23px;
}

.cs-dialog .sections {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.upper-section {
    display: flex;
    justify-content: space-between;
}

.upper-left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.symbol-rectangle {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-top: 30px;
    width: 300px;
}

.symbol-rectangle pre {
    font-family: 'ArialPixel';
    color: #cccccc;
    margin: 0;
    line-height: 1;
    font-size: 16px;
}

.quit-dialog.cs-dialog {
    font-size: 18px;
}

.spraypaint-preview {
    display: flex;
    align-items: center;
    gap: 17px;
}

.spraypaint-preview-image {
    width: 92px;
    height: 92px;
    background-size: cover;
    background-position: center;
    cursor: crosshair;
}

.spraypaint-selectors {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 92px;
}

.spraypaint-selector-row {
    display: flex;
    align-items: center;
    gap: 11px;
}

.spraypaint-selector-row:last-child {
    margin-bottom: 0;
}

.build-smth-link {
    cursor: pointer;
    text-decoration: underline;
    color: hotpink;
}

.build-smth-tooltip-text {
    bottom: 100%;
    width: 100px;
    left: 50%;
    margin-left: -50px;
}

.telegram-link {
    text-decoration: underline;
    color: rgb(0, 166, 255);
}

.servers-dialog.cs-dialog {
    max-width: 900px;
    width: 900px;
}

.servers-dialog.cs-dialog .cs-tabs .panel {
    padding: 10px 0 10px;
}

.server-browser {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 450px;
    background-color: var(--secondary-bg);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    overflow-y: auto;
    overflow-x: hidden;
    /* prevent horizontal scroll */
}

.server-list-header {
    display: flex;

    .cs-btn {
        font-size: 18px;
    }
}

.server-item {
    display: flex;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    line-height: 1.1;
}

.server-item-column {
    padding: 4px 6px;
    overflow: hidden;
}

.server-item-column.project-description-column {
    padding-right: 10px;
}

.server-item.selected {
    background-color: var(--secondary-accent);
}

/* Header + Rows */
.server-list-header,
.server-item {
    display: flex;
    width: 100%;
    align-items: center;
    box-sizing: border-box;
}

/* Column ratios */
.server-list-header .project-name-column,
.server-item .project-name-column {
    flex: 0 0 5%;
    min-width: 40px;
}

.server-list-header .project-description-column,
.server-item .project-description-column {
    flex: 0 0 20%;
    min-width: 120px;
}

.server-list-header .project-stack-column,
.server-item .project-stack-column {
    flex: 0 0 15%;
    min-width: 100px;
}

.server-list-header .project-status-column,
.server-item .project-status-column {
    flex: 0 0 15%;
    min-width: 100px;
}

/* Overflow handling */
.server-item-column {
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-tooltip {
    position: relative;
    display: inline-block;
    cursor: default;
}

.cs-tooltip .text {
    visibility: hidden;
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 5px 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    /* show above the element */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    /* allows click-through */
    opacity: 0;
    transition: opacity 0.2s;
}

.cs-tooltip:hover .text {
    visibility: visible;
    opacity: 1;
}



.server-actions {
    flex: 1;
    display: flex;
    gap: 10px;
    float: right;
    margin-right: 10px;
}

.server-actions .cs-btn {
    font-size: 23px;
    padding: 6px 5px 6px;
    width: 100px;
    text-align: left;
}

/* Filters */

.filter-orange {
    filter: grayscale(100%) sepia(100%) hue-rotate(340deg) saturate(300%) brightness(0.8) contrast(1.3);
}

.filter-yellow {
    filter: grayscale(100%) sepia(100%) hue-rotate(10deg) saturate(300%) brightness(0.9);
}

.filter-ltblue {
    filter: grayscale(100%) sepia(100%) hue-rotate(150deg) saturate(500%) brightness(0.8) contrast(1.1);
}

.filter-green {
    filter: grayscale(100%) sepia(100%) hue-rotate(70deg) saturate(400%) brightness(0.7);
}

/* Responsiveness */

@media screen and (max-width: 1440px) {
    body {
        font-size: 108%;
    }

    .menu-item {
        font-size: 28px;
    }

    .cs-dialog {
        transform: scale(1.08);
    }

    .cs-dialog.options-dialog {
        max-width: 650px;
    }
}

@media screen and (max-width: 1024px) {
    body {
        font-size: 100%;
    }

    .menu {
        width: 250px;
        margin-left: 5%;
    }

    .menu-item {
        font-size: 30px;
        margin: 10px 0;
    }

    .player-name-section,
    .city-section {
        width: 200px;
    }

    .spraypaint-section {
        width: 250px;
    }

    .cs-dialog {
        transform: scale(1);
        font-size: 20px;
    }

    .cs-dialog.options-dialog {
        max-width: 600px;
    }

    .cs-dialog.servers-dialog {
        width: 90%;
    }

    .cs-dialog .heading .text,
    .cs-dialog .cs-tabs .label,
    .cs-dialog .cs-tabs .cs-input {
        font-size: 20px !important;
    }

    .spraypaint-preview-image,
    .spraypaint-selectors {
        width: 80px;
        height: 80px;
    }
}

@media screen and (max-width: 600px) {
    .cs-dialog.options-dialog {
        width: 360px;
    }

    .cs-dialog.servers-dialog {
        width: 95%;
    }

    .cs-dialog.new-game-dialog {
        width: 95%;
    }

    .server-browser {
        height: 400px;
    }

    .menu {
        margin-bottom: 10%;
    }

    .cs-dialog .sections {
        gap: 15px;
    }

    .age-and-city-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: normal;
    }

    .upper-section {
        flex-direction: column;
        align-items: normal;
    }

    .upper-left-column {
        gap: 15px;
    }

    .symbol-rectangle {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        margin-top: 30px;
        width: 300px;
    }
}

/* === Maps Dialog Styles === */
.maps-dialog {
    width: 850px;
    /* larger dialog */
    max-width: 90vw;
    transform: scale(1.25);
    /* enlarge dialog */
    font-size: 26px;
    /* increase font size */
}

.maps-dialog .heading .text {
    font-size: 24px !important;
}

.maps-dialog .content {
    display: flex;
    gap: 15px;
    /* more space between grid and preview */
}

/* Map grid container */
.map-grid-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#maps-pagination {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    /* larger gap */
    width: 100%;
    height: 450px;
    /* taller grid */
    border: 1px solid #c9c38c;
    padding: 5px;
    box-sizing: border-box;
}

/* Individual map item */
.map-item {
    cursor: pointer;
    background-color: #3f3f3f;
    border: 1px solid #101010;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: background-color 0.1s;
}

.map-item:hover {
    background-color: #555;
    border-color: #e0e0e0;
}

.map-item.selected {
    border: 1px solid #f0f0f0;
    background-color: #5d614e;
}

.map-item.selected .map-name {
    color: #ffaa00;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #c9c38c;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Half-Life', monospace;
    pointer-events: none;
}

/* Map Preview Section */
.map-preview-section {
    width: 300px;
    /* wider preview column */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px;
}

.map-preview-section label {
    font-size: 20px;
}

#selected-map-name {
    font-size: 20px;
    padding: 4px;
}

.map-preview-image-wrapper {
    width: 100%;
    height: 250px;
    /* taller preview */
    border: 1px solid #c9c38c;
    background-color: #101010;
}

#map-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Map navigation / pagination */
.map-navigation {
    margin-right: auto;
}

.map-navigation a {
    padding: 4px 8px;
    border: 1px solid #c9c38c;
    background-color: #2e2e2e;
    color: #c9c38c;
    text-decoration: none;
    cursor: pointer;
}

.map-navigation a:hover {
    background-color: #5d614e;
    color: #ffaa00;
}


.map-navigation a,
.map-navigation span {
    padding: 4px 8px;
    border: 1px solid #c9c38c;
    background-color: #2e2e2e;
    color: #c9c38c;
    text-decoration: none;
    font-family: 'Half-Life', monospace;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
}

.map-navigation a:hover:not(.disabled) {
    background-color: #5d614e;
    color: #ffaa00;
}

.map-navigation a.active {
    background-color: #5d614e;
    color: #ffaa00;
    border-color: #ffaa00;
}

.map-navigation a.disabled {
    opacity: 0.5;
    cursor: default;
    background-color: #2e2e2e;
    color: #c9c38c;
}

/* Footer buttons */
.footer-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 0 15px 15px;
}

/* Responsive adjustments */
@media screen and (max-width: 1440px) {
    .maps-dialog {
        transform: scale(1.15);
        font-size: 24px;
    }

    #maps-pagination {
        height: 400px;
    }

    .map-preview-section {
        width: 250px;
    }

    .map-preview-image-wrapper {
        height: 200px;
    }
}

@media screen and (max-width: 1024px) {
    .maps-dialog {
        transform: scale(1.1);
        width: 90%;
        font-size: 22px;
    }

    #maps-pagination {
        height: 350px;
    }

    .map-preview-section {
        width: 220px;
    }

    .map-preview-image-wrapper {
        height: 180px;
    }

    .map-name {
        font-size: 12px;
    }

    .map-navigation a,
    .map-navigation span {
        font-size: 12px;
        padding: 3px 6px;
    }
}

@media screen and (max-width: 600px) {
    .maps-dialog {
        width: 95%;
        transform: scale(1);
        font-size: 20px;
    }

    #maps-pagination {
        height: 300px;
        gap: 5px;
    }

    .map-preview-section {
        width: 180px;
    }

    .map-preview-image-wrapper {
        height: 130px;
    }

    .map-name {
        font-size: 10px;
    }

    .map-navigation a,
    .map-navigation span {
        font-size: 10px;
        padding: 2px 4px;
    }
}

.rankings-dialog {
    width: 90vw;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}


.stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    font-family: 'Half-Life', monospace, 'Arial Black', Arial, sans-serif;
}

.stats-tabs .tab-button {
    background-color: #1c1c1c;
    /* very dark background */
    border: 2px solid #c9c38c;
    /* classic CS gold/yellow border */
    padding: 8px 16px;
    cursor: pointer;
    color: #c9c38c;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow:
        inset 0 2px 0 #e0d06f,
        /* top highlight */
        inset 0 -2px 0 #6a6500;
    /* bottom shadow */
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}

.stats-tabs .tab-button:hover {
    background-color: #5d614e;
    /* classic CS greenish-gold */
    color: #ffaa00;
    border-color: #ffaa00;
    box-shadow:
        inset 0 2px 0 #ffcc33,
        inset 0 -2px 0 #886600;
}

.stats-tabs .tab-button.active {
    background-color: #5d614e;
    color: #ffaa00;
    border-color: #ffaa00;
    box-shadow:
        inset 0 2px 0 #ffcc33,
        inset 0 -2px 0 #886600;
    font-weight: bold;
}

.stats-tabs #current-month {
    color: var(--accent)
}

.stats-tabs .cs-btn {
    padding: 8px 16px;
    /* make them match tab size */
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#rankingTable {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Half-Life', monospace, 'Arial Black', Arial, sans-serif;
    font-size: 16px;
    background-color: #4a5942
}

#rankingTable th,
#rankingTable td {
    border: 1px solid #c9c38c;
    /* Classic CS gold/yellow border */
    padding: 6px 10px;
    text-align: center;
}

#rankingTable th {
    background-color: #4a5942;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
    /* subtle shadow like CS HUD */
}

#rankingTable td {
    background-color: #2e2e2e;
    color: #ffffff;
    text-shadow: 1px 1px 0 #000;
}

#rankingTable tr:nth-child(even) td {
    background-color: #262626;
    /* alternating dark stripes */
}

#rankingTable tr:hover td {
    background-color: #5d614e;
    /* CS greenish highlight on hover */
    color: #ffaa00;
}

/* Pagination */
#ranking-pagination {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    gap: 6px;
}

#ranking-pagination button {
    font-family: 'Half-Life', monospace, 'Arial Black', Arial, sans-serif;
    background-color: #1c1c1c;
    border: 2px solid #c9c38c;
    color: #c9c38c;
    padding: 4px 10px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    transition: all 0.15s;
}

#ranking-pagination button:hover {
    background-color: #5d614e;
    border-color: #ffaa00;
    color: #ffaa00;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #c9c38c;
    font-family: 'Half-Life', monospace;
    margin-bottom: 10px;
}

/* Monthly Top Players */
.top-players-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    font-family: 'Half-Life', monospace, 'Arial Black', Arial, sans-serif;
}

/* First place stands alone */
.top-player-row {
    display: flex;
    justify-content: center;
}

/* Second + third share a row */
.second-third-row {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

/* Core card */
.top-player-card {
    background-color: var(--bg);
    border: 2px solid #c9c38c;
    color: white;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    flex: 1;
    max-width: 280px;
    transition: transform 0.15s ease;
    box-shadow: inset 0 2px 0 #e0d06f, inset 0 -2px 0 #6a6500;
}

.top-player-card:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Medal / position */
.top-player-card .position {
    font-size: 32px;
    margin-bottom: 6px;
}

/* Name */
.top-player-card .player-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffaa00;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px black;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Stats */
.top-player-card .player-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.top-player-card .stat-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.top-player-card .stat-row {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.top-player-card .stat-divider {
    width: 1px;
    background-color: #c9c38c;
}

.top-player-card .highlight {
    color: #ffaa00;
    font-weight: bold;
}

/* Place-specific glow */
.top-player-card.first-place {
    border-color: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.top-player-card.second-place {
    border-color: #ccc;
    box-shadow: 0 0 10px #ccc;
}

.top-player-card.third-place {
    border-color: #cd7f32;
    box-shadow: 0 0 10px #cd7f32;
}

.banlist-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    /* allow vertical scroll if content is long */
    color: #fff;
    padding: 15px;
    overflow-y: auto;
    /* enable scrolling for long banlist */
    z-index: 1000;
    /* ensure it’s above the menu */
    display: none;
    /* hidden by default, show via JS */
}

.banlist-dialog[open] {
    display: block;
    /* show dialog when open */
}

/* Banlist Grid Fix */
.banlist-header,
.banlist-item {
    display: grid;
    grid-template-columns: 50px 200px 150px 200px 100px 150px 150px;
    padding: 6px 4px;
    border-bottom: 1px solid #444;
    font-family: 'Half-Life', monospace;
    font-size: 16px;
    align-items: center;
}

.banlist-header {
    font-weight: bold;
    background-color: #262626;
    color: #ffaa00;
}

.banlist-item:nth-child(even) {
    background-color: #2e2e2e;
}

.banlist-item:hover {
    background-color: #5d614e;
    color: #ffaa00;
}

/* Overflow handling */
.banlist-item div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 auto;
    max-width: 1000px;
    text-align: center;
    padding: 20px;
    /* add some inner spacing */
    border-radius: 16px;
    /* rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* subtle border */
    backdrop-filter: blur(5px);
    /* optional: frosted glass effect */

    color: white;
    /* keep text readable */
    z-index: 5;
    /* ensure it’s above background */
}

.map-cycle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
    margin-bottom: 15px;
}

.map-cycle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-family: 'Courier New', monospace;
}

.map-cycle-item p {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
}

.map-cycle-image {
    width: 200px;
    height: 125px;
    object-fit: cover;
    background-color: #000;
    /* dark fallback */
    border: 2px solid var(--bg);
    box-shadow: inset 0 0 0 2px #3a3a3a;
    /* gives the "double border" look */
    border-radius: 0;
    /* no rounded corners */
}


/* Previous/Next smaller versions */
.map-cycle-item.small .map-cycle-image {
    width: 160px;
    height: 100px;
}

.map-cycle-item.current-map .map-cycle-image {
    width: 200px;
    height: 125px;
    border: 3px solid var(--bg);
    /* slightly thicker border */
    box-shadow: inset 0 0 0 2px #3a3a3a;
}

.map-cycle-item p {
    margin-top: 6px;
    font-size: 13px;
    font-weight: bold;
    font-family: 'Tahoma', 'Verdana', sans-serif;
    color: #c9c38c;
    text-shadow: 1px 1px #000;
    /* mimic CS HUD text */
}

.players-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.team-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
}

.team-title.terrorists {
    color: #ea6153;
}

.team-title.cts {
    color: #2980b9;
}

.players-table {
    border-collapse: collapse;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    color: white;
}

.players-table th,
.players-table td {
    border: 1px solid #444;
    padding: 6px 10px;
    font-size: 14px;
    text-align: left;
}

.players-table th {
    background: #222;
    color: #ffaa00;
}

.players-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.loading {
    text-align: center;
    color: #999;
}

/* Mobile adjustments */
@media (max-width: 700px) {
    .map-cycle-container {
        flex-direction: column;
    }

    .players-container {
        flex-direction: column;
        align-items: center;
    }
}

/* === Responsive Fixes === */
@media (max-width: 900px) {
    .game-info {
        top: auto;
        left: 50%;
        bottom: 10%;
        /* lift it above menu */
        transform: translateX(-50%);
        max-width: 95%;
    }

    .map-cycle-container {
        flex-direction: column;
        gap: 15px;
    }

    .map-cycle-item .map-cycle-image {
        width: 140px;
        height: 90px;
    }

    .map-cycle-item.current-map .map-cycle-image {
        width: 180px;
        height: 110px;
    }

    .players-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .players-table {
        min-width: auto;
        width: 100%;
        font-size: 12px;
    }

    .menu {
        left: 5%;
        /* tighter on phones */
        width: 220px;
    }

    .menu-item {
        font-size: 26px;
    }
}

@media (max-width: 500px) {
    .menu {
        position: static;
        /* menu stacks at top */
        margin: 10px auto;
        width: 100%;
        align-items: center;
    }

    .game-info {
        position: static;
        transform: none;
        margin-top: 15px;
        width: 100%;
    }

    .map-cycle-item .map-cycle-image {
        width: 120px;
        height: 80px;
    }

    .map-cycle-item.current-map .map-cycle-image {
        width: 150px;
        height: 95px;
    }

    .players-table th,
    .players-table td {
        font-size: 11px;
        padding: 4px;
    }
}

/* Server header wrapper centered */
.server-header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* centers content horizontally */
    margin-bottom: 20px;
    width: 100%;
}

/* Server header (icon + name) like menu items */
.server-header {
    display: flex;
    align-items: center;
    justify-content: center;
    /* center icon + name */
    gap: 10px;
    font-family: 'Verdana', 'Geneva', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #eeae00;
    /* same as menu items */
    text-shadow: 1px 1px 2px black;
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s;
}

.server-header:hover {
    color: #FFD700;
    text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 320px #eeae00;
}

.server-header img {
    width: 40px;
    height: 40px;
}

/* Server IP line styled like menu items */
.server-ip-line {
    font-family: 'Verdana', 'Geneva', sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #eeae00;
    text-align: center;
    margin-top: 5px;
    text-shadow: 1px 1px 2px black;
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s;
}

.server-ip-line:hover {
    color: #FFD700;
    text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 320px #eeae00;
}

.server-ip-line a {
    color: inherit;
}

.server-ip-line a:hover {
    color: inherit;
    /* hover handled by parent */
}

.discord-dialog {
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    color: #fff;
}

.discord-widget {
    width: 100%;
    height: 500px;
    border: none;
}

.scrollable-list {
    max-height: 540px;
    /* or whatever fits inside your dialog */
    overflow-y: auto;
    /* enable scrolling */
    padding-right: 8px;
    /* space for scrollbar */
}

/* Optional: style scrollbar */
.scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background-color: #c9c38c;
    border-radius: 4px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: #2e2e2e;
}


/* Container styling */
#best-stats {
    padding: 1rem;
}

/* Top Performers List Styling */
#best-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Half-Life', monospace, Arial, sans-serif;
    font-size: 16px;
    color: #fff;
}

#best-stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
    transition: background 0.2s;
}

#best-stats-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#best-stats-list li strong {
    flex: 1 1 auto;
    text-align: left;
    color: #ffaa00;
}

#best-stats-list li span {
    flex: 0 0 50px;
    /* fixed width for numbers */
    text-align: right;
    font-weight: bold;
    color: #ffffff;
}

/* Container styling */
#top-performers-container {
    padding: 1rem;
}

/* Top Performers List Styling */
#monthly-top-performers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Half-Life', monospace, Arial, sans-serif;
    font-size: 16px;
    color: #fff;
}

#monthly-top-performers li {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
    transition: background 0.2s;
}

#monthly-top-performers li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#monthly-top-performers strong {
    flex: 1 1 auto;
    text-align: left;
    color: #ffaa00;
}

#monthly-top-performers span {
    flex: 0 0 50px;
    /* fixed width for numbers */
    text-align: right;
    font-weight: bold;
    color: #ffffff;
}


#gametracker-banner {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: auto;

    /* crop area */
    width: 330px;
    /* new visible width */
    height: 20px;
    /* keep the height */
    overflow: hidden;
    /* hides the extra part */
}

#gametracker-banner img {
    display: block;
    border: none;
    margin-left: 0px;
}

.contact-dialog {
    width: 400px;
    max-width: 90vw;
    color: #fff;
    font-size: 20px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.contact-dialog .heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.contact-dialog .heading .text {
    font-size: 22px;
    font-weight: bold;
    color: #ffaa00;
    font-family: 'Half-Life', monospace;
    text-shadow: 1px 1px 0 #000;
}



.contact-dialog .steam-profiles {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.contact-dialog .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 8px;
    border: 1px solid #444;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    background-color: rgba(40, 40, 40, 0.7);
}

.contact-dialog .profile:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px #ffaa00;
}

.contact-dialog .profile a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-dialog .profile-image {
    width: 100px;
    height: 100px;
    border: 2px solid #c9c38c;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    transition: transform 0.2s, border-color 0.2s;
}

.contact-dialog .profile-name {
    font-family: 'Half-Life', monospace;
    font-weight: bold;
    color: #ffaa00;
    text-shadow: 1px 1px 0 #000;
    text-align: center;
    font-size: 16px;
}

/* Responsive tweaks */
@media (max-width: 500px) {
    .contact-dialog {
        width: 95%;
        padding: 15px;
        font-size: 18px;
    }

    .contact-dialog .profile-image {
        width: 80px;
        height: 80px;
    }

    .contact-dialog .profile-name {
        font-size: 14px;
    }
}

.spectators-container {
    flex-basis: 100%;
    /* forces it onto a new row */
    max-width: 100%;
    /* makes sure it spans full container */
}

.spectators-container h3 {
    font-size: 1rem;
    /* smaller than default h3 */
    margin: 0.5em 0;
}

#spectators-names {
    font-size: 1rem;
    /* Adjust the size as needed */
    font-weight: normal;
    /* Optional: keep it lighter than other text */
}

@media (max-width: 900px) {
    .spectators-container {
        order: 3;
        /* ensures it comes after both teams */
        width: 100%;
        /* takes full width */
    }
}

.connected-players-title {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #ffffff;
    text-shadow: none;
}

/* Fix the dialog size */
#information-dialog {
    width: 500px;
    /* or any fixed width you want */
    height: 740px;
    /* or any fixed height you want */
    max-width: 90vw;
    /* optional for responsiveness */
    max-height: 90vh;
    /* optional for responsiveness */
    overflow: hidden;
    /* hide any overflow outside the dialog */
}

/* Make the content scrollable */
#information-dialog .content {
    height: calc(100% - 60px);
    /* subtract the heading height */
    overflow-y: auto;
    /* vertical scroll if content is too tall */
    padding: 10px;
}

/* Optional: make individual panels stretch fully */
#information-dialog .panel {
    height: 100%;
    overflow-y: auto;
}

.chatlog-content {
    max-height: 500px;
    overflow-y: auto;
    background: #1e1e1e;
    padding: 10px;
    border: 1px solid #555;
    font-family: "Courier New", monospace;
    font-size: 0.5em;
}

#chatlog-list li {
    padding: 1px 3px;
}

#chatlog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#chatlog-list li {
    padding: 1px 3px;
    color: #ffffff;
}

#chatlog-list li.terrorist,
#chatlog-list li.ct,
#chatlog-list li.spectator {
    color: #ffffff;
}

#chatlog-list li .terrorist {
    color: #ff5555;
}

#chatlog-list li .ct {
    color: #55aaff;
}

#chatlog-list li .spectator {
    color: #acacac;
}


#chatlog-list li span.timestamp {
    color: #888;
    margin-right: 5px;
}