:root {
    /* Тематическая палитра Rust: ржавчина, металл, пепел */
    --rust-primary: #d46a3d;        /* Ржавчина (основной акцент) */
    --rust-secondary: #8c5232;      /* Тёмная ржавчина */
    --rust-metal: #a8a29e;          /* Металл */
    --rust-dark: #1a1715;           /* Тёмный фон (ржавый металл) */
    --rust-darker: #12100e;
    --rust-gray: #25221f;
    --rust-light-gray: #3a3632;
    --rust-lighter-gray: #4a4540;
    --text-primary: #f5f3f0;
    --text-secondary: #a8a29e;
    --success: #22c55e;
    --warning: #f97316;
    --danger: #ef4444;
    --border-radius: 14px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--rust-dark);
    background-image:
            radial-gradient(circle at 15% 30%, rgba(212, 106, 61, 0.07) 0%, transparent 30%),
            radial-gradient(circle at 85% 70%, rgba(140, 82, 50, 0.08) 0%, transparent 35%);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(18, 16, 14, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(168, 162, 158, 0.12);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(18, 16, 14, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.92;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-text {
    font-size: 2.05rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    background: linear-gradient(90deg, var(--rust-primary), var(--rust-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-domain {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-left: 4px;
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
    margin-left: 24px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.08rem;
    padding: 8px 10px;
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--rust-primary);
}

nav a.active:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--rust-primary);
    border-radius: 3px;
}

nav a:hover:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--rust-primary);
    border-radius: 3px;
    transition: width 0.3s ease, left 0.3s ease;
    left: 0;
    width: 100%;
}

.btn-add-server {
    background: rgba(212, 106, 61, 0.12);
    color: var(--rust-primary);
    border: 1px solid rgba(212, 106, 61, 0.25);
    padding: 9px 24px;
    border-radius: 40px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.02rem;
    white-space: nowrap;
}

.btn-add-server:hover {
    background: rgba(212, 106, 61, 0.22);
    transform: translateY(-2px);
    border-color: rgba(212, 106, 61, 0.4);
}

.btn-add-server:active {
    transform: translateY(0);
}

/* Main content */
main {
    padding: 42px 0 60px;
}

.page-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--text-primary), #e0d9d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 36px;
    max-width: 720px;
    line-height: 1.65;
}

/* Статистика с градиентами */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.stats-card {
    background: var(--rust-gray);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.stats-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--rust-primary), var(--rust-secondary));
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 10px 0 6px;
    background: linear-gradient(90deg, var(--rust-primary), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.12rem;
    font-weight: 500;
}

/* Фильтры */
.filters-card {
    background: var(--rust-gray);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    align-items: flex-end;
}

.filter-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.filter-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--rust-light-gray);
    background: var(--rust-darker);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 1.05rem;
    transition: var(--transition);
}

.filter-control:focus {
    outline: none;
    border-color: var(--rust-primary);
    box-shadow: 0 0 0 3px rgba(212, 106, 61, 0.25);
}

.btn-apply {
    width: 100%;
    min-height: 52px;
    padding: 14px 26px;
    font-size: 1.12rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--rust-primary), var(--rust-secondary));
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(212, 106, 61, 0.35);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(212, 106, 61, 0.45);
}

.btn-apply:active {
    transform: translateY(0);
}

/* Таблица серверов */
.servers-table-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--rust-gray);
    margin-bottom: 40px;
}

.servers-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px; /* Для мобильных — горизонтальный скролл */
}

.servers-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.15rem;
    background: var(--rust-darker);
    position: sticky;
    top: 0;
    z-index: 10;
}

.servers-table td {
    padding: 18px 24px;
    border-top: 1px solid var(--rust-light-gray);
    vertical-align: middle;
}

.server-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--rust-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.server-address {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.98rem;
    color: var(--text-secondary);
    letter-spacing: -0.5px;
    white-space: nowrap; /* Запрещаем перенос */
}

.players-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.12rem;
    min-width: 100px;
    text-align: center;
    white-space: nowrap; /* Запрещаем перенос количества игроков */
}

.players-online {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.players-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.region-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 50px;
    background: rgba(168, 162, 158, 0.12);
    color: var(--rust-metal);
    font-weight: 600;
    font-size: 1.02rem;
    white-space: nowrap;
}

.region-flag {
    font-size: 1.45rem;
    line-height: 1;
}

.btn-detail {
    background: rgba(168, 162, 158, 0.15);
    color: var(--text-primary);
    border: 1px solid var(--rust-light-gray);
    padding: 11px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.02rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-detail:hover {
    background: rgba(212, 106, 61, 0.18);
    border-color: rgba(212, 106, 61, 0.3);
    color: var(--rust-primary);
    transform: translateX(3px);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 36px 0 10px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.08rem;
    transition: var(--transition);
}

.pagination a {
    color: var(--text-secondary);
    background: var(--rust-gray);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--rust-primary);
    color: white;
    transform: translateY(-1px);
}

.pagination .active {
    background: var(--rust-primary);
    color: white;
    cursor: default;
}

.pagination .dots {
    color: var(--text-secondary);
    background: transparent;
    cursor: default;
    min-width: auto;
    font-size: 1.4rem;
    font-weight: 300;
}

/* Footer */
footer {
    background: var(--rust-darker);
    border-top: 1px solid var(--rust-light-gray);
    padding: 70px 0 45px;
    margin-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 42px;
    margin-bottom: 50px;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 26px;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 10px;
    font-weight: 700;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--rust-primary), var(--rust-secondary));
    border-radius: 3px;
}

.footer-section p, .footer-section a {
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: block;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.02rem;
    line-height: 1.65;
}

.footer-section a:hover {
    color: var(--rust-primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 24px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.02rem;
}

.footer-link:hover {
    color: var(--rust-primary);
}

.copyright {
    text-align: center;
    padding-top: 36px;
    border-top: 1px solid var(--rust-light-gray);
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.copyright a {
    color: var(--rust-primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    background: var(--rust-gray);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4.5rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1;
}

.empty-title {
    font-size: 2.3rem;
    margin-bottom: 22px;
    color: var(--text-primary);
    font-weight: 800;
}

.empty-text {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.btn-reload {
    background: linear-gradient(90deg, var(--rust-primary), var(--rust-secondary));
    color: white;
    border: none;
    padding: 16px 42px;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 18px rgba(212, 106, 61, 0.4);
}

.btn-reload:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(212, 106, 61, 0.55);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .page-title {
        font-size: 2.1rem;
    }

    .stat-value {
        font-size: 2.2rem;
    }

    nav ul {
        gap: 20px;
        margin-left: 16px;
    }

    nav a {
        font-size: 1.02rem;
        padding: 7px 9px;
    }

    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .servers-table th, .servers-table td {
        padding: 16px 18px;
    }

    .server-name {
        font-size: 1.08rem;
    }

    .players-badge {
        padding: 7px 16px;
        font-size: 1.05rem;
        min-width: 92px;
    }

    .btn-detail {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        justify-content: space-between;
    }

    nav {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }

    nav ul {
        justify-content: center;
        flex-wrap: wrap;
        margin-left: 0;
        gap: 16px;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .btn-add-server {
        order: 2;
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }

    main {
        padding: 32px 0 50px;
    }

    .page-title {
        font-size: 1.95rem;
        text-align: center;
    }

    .page-subtitle {
        font-size: 1.15rem;
        text-align: center;
        margin-bottom: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .stat-value {
        font-size: 2.1rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .btn-apply {
        min-height: 56px;
        font-size: 1.18rem;
    }

    .servers-table-container {
        border-radius: 20px;
    }

    .servers-table {
        min-width: 850px;
    }

    .servers-table th, .servers-table td {
        padding: 15px 16px;
        font-size: 0.98rem;
    }

    .server-name {
        font-size: 1.05rem;
    }

    .pagination a, .pagination span {
        min-width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .empty-state {
        padding: 50px 30px;
    }

    .empty-icon {
        font-size: 4rem;
    }

    .empty-title {
        font-size: 2.1rem;
    }

    .empty-text {
        font-size: 1.12rem;
    }

    .btn-reload {
        padding: 15px 38px;
        font-size: 1.12rem;
    }

    .footer-grid {
        gap: 36px;
    }

    .copyright {
        font-size: 0.95rem;
        padding-top: 32px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 42px;
    }

    .logo-text {
        font-size: 1.85rem;
    }

    .logo-domain {
        font-size: 1.05rem;
    }

    nav ul {
        gap: 14px;
    }

    nav a {
        font-size: 0.98rem;
        padding: 6px 8px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 1.08rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1.05rem;
    }

    .servers-table {
        min-width: 800px;
    }

    .servers-table th, .servers-table td {
        padding: 14px 14px;
        font-size: 0.95rem;
    }

    .server-name {
        font-size: 1rem;
    }

    .players-badge {
        padding: 6px 14px;
        font-size: 1rem;
        min-width: 88px;
    }

    .region-badge {
        padding: 6px 14px;
        font-size: 0.98rem;
    }

    .region-flag {
        font-size: 1.35rem;
    }

    .server-address {
        font-size: 0.92rem;
    }

    .btn-detail {
        padding: 9px 18px;
        font-size: 0.98rem;
    }

    .pagination {
        gap: 4px;
    }

    .pagination a, .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .pagination .dots {
        font-size: 1.3rem;
    }

    .empty-icon {
        font-size: 3.8rem;
    }

    .empty-title {
        font-size: 1.95rem;
    }

    .empty-text {
        font-size: 1.05rem;
    }

    .btn-reload {
        padding: 14px 34px;
        font-size: 1.08rem;
    }

    footer {
        padding: 55px 0 40px;
        margin-top: 60px;
    }

    .footer-grid {
        gap: 32px;
    }

    .footer-section h3 {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .footer-section p, .footer-section a {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .copyright {
        font-size: 0.92rem;
        line-height: 1.65;
    }
}

/* === Авторизация через Steam === */
.auth-block {
    margin-left: 8px;
}

/* Кнопка входа через Steam */
.btn-steam-login {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border: 1px solid #66c0f4;
    color: #ffffff;
    padding: 9px 22px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.02rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(102, 192, 244, 0.2);
}

.btn-steam-login:hover {
    background: linear-gradient(135deg, #2a475e 0%, #1b2838 100%);
    border-color: #7dd3fc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 192, 244, 0.35);
}

.btn-steam-login:active {
    transform: translateY(0);
}

.steam-icon {
    color: #66c0f4;
    transition: var(--transition);
}

.btn-steam-login:hover .steam-icon {
    color: #7dd3fc;
}

/* Выпадающий профиль пользователя */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--rust-gray);
    border: 1px solid var(--rust-light-gray);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.user-trigger:hover {
    border-color: var(--rust-primary);
    background: var(--rust-light-gray);
}

.steam-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--rust-primary);
    object-fit: cover;
    background: var(--rust-darker);
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Выпадающее меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--rust-gray);
    border: 1px solid var(--rust-light-gray);
    border-radius: 16px;
    padding: 8px;
    min-width: 220px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu:before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--rust-gray);
    border-left: 1px solid var(--rust-light-gray);
    border-top: 1px solid var(--rust-light-gray);
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.02rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--rust-darker);
    color: var(--rust-primary);
}

.dropdown-item svg {
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-item:hover svg {
    color: var(--rust-primary);
}

.dropdown-logout {
    border-top: 1px solid var(--rust-light-gray);
    margin-top: 6px;
    padding-top: 12px;
    color: var(--danger);
}

.dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dropdown-logout:hover svg {
    color: var(--danger);
}

/* Адаптивность для авторизации */
@media (max-width: 768px) {
    .auth-block {
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .btn-steam-login {
        width: 100%;
        max-width: 380px;
        justify-content: center;
    }

    .user-dropdown {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .dropdown-menu {
        right: 50%;
        transform: translateX(50%) translateY(-10px);
    }

    .user-dropdown:hover .dropdown-menu {
        transform: translateX(50%) translateY(0);
    }
}

@media (max-width: 480px) {
    .user-name {
        display: none;
    }

    .user-trigger {
        padding: 6px;
    }

    .dropdown-menu {
        min-width: 180px;
        right: 0;
    }

    .dropdown-menu:before {
        right: 16px;
    }
}
.profile-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.profile-card {
    background: #1b2838;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.profile-card h2 {
    margin-bottom: 20px;
    text-align: center;
}

.profile-row {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.profile-actions {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
}

.btn-secondary,
.btn-danger {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-secondary {
    background: #2a475e;
    color: white;
}

.btn-danger {
    background: #b33939;
    color: white;
}

.burger {
    display: none;
    width: 34px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    height: 3px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 3px;
    transition: 0.3s ease;
}

.burger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ===============================
   Overlay
================================= */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===============================
   Mobile Navigation
================================= */
@media (max-width: 768px) {

    .burger {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 290px;
        height: 100vh;
        background: linear-gradient(
                180deg,
                var(--rust-darker) 0%,
                #181512 100%
        );
        padding: 110px 28px 40px;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: -12px 0 40px rgba(0,0,0,0.6);
        border-left: 1px solid var(--rust-light-gray);
        z-index: 999;
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        gap: 26px;
    }

    nav a {
        font-size: 1.15rem;
    }

    .btn-add-server,
    .auth-block {
        display: none;
    }
}

/* ===============================
   Scroll Lock
================================= */
body.menu-open {
    overflow: hidden;
}