/* --- Core VGUI Theme Styles --- */
body {
    background: url("background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    font-family: "Tahoma", "Arial", sans-serif;
    font-size: 12px;
    color: #D2D4D0;
    margin: 0;
    padding: 20px;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Main Window Container resembling the VGUI Dialog Box */
.vgui-window {
    background-color: #383B33;
    border: 2px solid #52564C;
    border-top: 2px solid #6E7367;
    border-left: 2px solid #6E7367;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    max-width: 1000px;
    margin: 0 auto;
    padding: 4px;
}

/* Top Title Bar */
.vgui-titlebar {
    background: linear-gradient(to right, #4E5246, #383B33);
    padding: 6px 10px;
    font-weight: bold;
    font-size: 13px;
    color: #FFF;
    border-bottom: 1px solid #242622;
    margin-bottom: 4px;
}

/* Navigation Tabs (Internet, Favorites, LAN, etc.) */
.vgui-tabs {
    display: flex;
    gap: 2px;
    padding-left: 4px;
    border-bottom: 1px solid #52564C;
    margin-bottom: 6px;
}

.tab {
    background-color: #44483E;
    border: 1px solid #52564C;
    border-bottom: none;
    padding: 6px 14px;
    color: #A0A49C;
    cursor: pointer;
    font-weight: bold;
}

.tab.active {
    background-color: #52564C;
    color: #FFF;
    border-top: 1px solid #909587;
    border-left: 1px solid #909587;
}

/* Server List Table Area */
.server-list-container {
    background-color: #1E201B;
    border: 1px solid #242622;
    border-right: 1px solid #52564C;
    border-bottom: 1px solid #52564C;
    height: 450px;
    overflow-y: scroll;
}

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

/* Table Headers */
th {
    background-color: #383B33;
    position: sticky;
    top: 0;
    padding: 6px 8px;
    font-weight: normal;
    color: #D2D4D0;
    border-right: 1px solid #242622;
    border-bottom: 2px solid #242622;
    cursor: pointer;
}

th:hover {
    background-color: #44483E;
}

/* Table Rows */
tr {
    height: 22px;
}

tr:nth-child(even) {
    background-color: #242622;
}

tr:hover {
    background-color: #30342B;
    cursor: pointer;
}

tr.selected {
    background-color: #4A5E3A !important;
    color: #FFF;
}

td {
    padding: 3px 8px;
    border-right: 1px solid #2C2F27;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Colors */
.latency-low {
    color: #55FF55;
}

.latency-mid {
    color: #FFDF55;
}

.full {
    color: #FF5555;
}

/* Bottom Action Panel */
.vgui-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 4px 4px;
    background-color: #383B33;
}

.filter-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

label {
    color: #B2B4A0;
}

select,
input[type="text"] {
    background-color: #1E201B;
    border: 1px solid #52564C;
    color: #FFF;
    padding: 3px;
    font-family: "Tahoma", sans-serif;
    font-size: 11px;
}

/* Classic CS 1.6 Push Buttons */
.vgui-btn {
    background-color: #44483E;
    border: 1px solid #242622;
    border-top: 1px solid #6E7367;
    border-left: 1px solid #6E7367;
    color: #D2D4D0;
    padding: 5px 16px;
    font-family: "Tahoma", sans-serif;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.vgui-btn:active {
    border: 1px solid #6E7367;
    border-top: 1px solid #242622;
    border-left: 1px solid #242622;
    padding: 6px 15px 4px 17px;
}

.vgui-btn-primary {
    background-color: #4E583E;
    color: #FFF;
    font-weight: bold;
    border-top: 1px solid #7E8C65;
    border-left: 1px solid #7E8C65;
}

.btn-group {
    display: flex;
    gap: 5px;
}

/* Scrollbar styling to match classic windows/VGUI */
.server-list-container::-webkit-scrollbar {
    width: 16px;
    background-color: #383B33;
}

.server-list-container::-webkit-scrollbar-thumb {
    background-color: #44483E;
    border: 1px solid #242622;
    border-top: 1px solid #6E7367;
    border-left: 1px solid #6E7367;
}