/* ============================================================
   1. ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --accent: #468097;
    --accent-light: #7fb6d1;
    --bg-dark: #3d4652;
    --bg-card: #47505c;
    --bg-card-hover: #556070;
    --text-muted: #a8b0ba;
    --text: #e6e8eb;
}

/* ============================================================
   2. БАЗА
   ============================================================ */
body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.container {
    padding-bottom: 1rem;
}

/* ============================================================
   3. НАВБАР
   ============================================================ */
#navbar .navbar-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff !important;
    transition: color 0.2s ease;

    /* Обрезка длинных заголовков */
    max-width: calc(100vw - 120px);   /* оставляем место для кнопок справа */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

#navbar .navbar-brand:hover {
    color: var(--accent-light) !important;
}

#navbarMenu .cs2-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#navbar .nav-link:not(.playerAvatar) {
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 0.9rem !important;
    transition: color 0.2s ease;
    position: relative;
}
#navbar .nav-link:hover,
#navbar .nav-link.active {
    color: #fff !important;
}

#navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(70, 128, 151, 0.7);
}

/* ============ Кнопка бургера — как в нативных приложениях ============ */
.navbar-toggler {
    border: 0 !important;
    padding: 0 !important;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.navbar-toggler:active {
    background: rgba(255, 255, 255, 0.14) !important;
}

.navbar-toggler:focus,
.navbar-toggler:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Иконка бургера — заменяем Bootstrap-иконку на свою SVG */
.navbar-toggler .navbar-toggler-icon {
    background-image: none !important;
    width: 24px;
    height: 18px;
    position: relative;
    display: inline-block;
}

/* Три полоски через псевдоэлементы */
.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}
.navbar-toggler .navbar-toggler-icon::before {
    top: 0;
}
.navbar-toggler .navbar-toggler-icon::after {
    bottom: 0;
}

/* Средняя полоска — через дополнительный span внутри */
.navbar-toggler .navbar-toggler-icon > span {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transform: translateY(-50%);
    transition: opacity 0.15s ease;
}

/* ============ Кнопка «Назад» в шапке (на подстраницах) ============ */
.navbar-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 0;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: 0;
    border-radius: 6px;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.navbar-back-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.15s ease;
}

.navbar-back-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-back-btn:hover svg {
    transform: translateX(-2px);   /* лёгкий сдвиг влево — «уходим назад» */
}

.navbar-back-btn:active {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(0.95);
}

/* Скрываем на десктопе — там бургера и так нет */
@media (min-width: 992px) {
    .navbar-back-btn {
        display: none;
    }
}

/* ============================================================
   4. АВАТАР ИГРОКА
   ============================================================ */
#navbar .playerAvatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 4px;
    border-width: 2px;
    border-style: solid;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#navbar .playerAvatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(102, 192, 244, 0.5);
}
#navbar .playerAvatar .player-avatar-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.online  { border-color: var(--accent); }
.offline { border-color: #555; }
.in-game { border-color: #6E8C31; }

#navbar .player-name {
    margin-left: 10px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color 0.2s ease;
}
#navbar .player-name:hover {
    color: var(--accent-light) !important;
}

/* ============ Ссылка-обёртка вокруг карточки карты ============ */
.map-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}
.map-card-link:hover {
    color: inherit !important;
}

/* ============================================================
   СТРАНИЦА КАРТЫ — на весь экран
   ============================================================ */

/* Обёртка начинается ПОД навбаром, z-index ниже sticky (1020) */
.map-fullscreen-wrapper {
    position: fixed;
    top: 60px;             /* высота navbar */
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1000;         /* ниже sticky navbar (1020) */
    box-sizing: border-box;
}

/* Вьювер радара занимает всё доступное пространство */
.map-fullscreen-wrapper .map-radar-viewer {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.map-fullscreen-wrapper .map-radar-viewer:fullscreen {
    aspect-ratio: auto;
    background: #000;
}

/* Слои */
.map-fullscreen-wrapper .map-radar-layers {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
    cursor: grab;
}
.map-fullscreen-wrapper .map-radar-layers:active {
    cursor: grabbing;
}

.map-fullscreen-wrapper .map-radar-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.map-fullscreen-wrapper .map-radar-layer.active {
    opacity: 1;
    visibility: visible;
}

/* Кнопка возврата (слева сверху) */
.map-radar-back {
    position: absolute;
    left: 14px;
    top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 4;
}
.map-radar-back svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.map-radar-back:hover {
    background: rgba(0, 0, 0, 0.85);
}
.map-radar-back:active {
    transform: scale(0.95);
}

/* Переключатель слоёв (слева, ниже кнопки назад) */
.map-fullscreen-wrapper .map-radar-layer-switch {
    position: absolute;
    left: 14px;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

/* Кнопки управления (справа сверху) */
.map-fullscreen-wrapper .map-radar-controls {
    position: absolute;
    right: 14px;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

/* Мобильная адаптация */
@media (max-width: 991.98px) {
    .map-fullscreen-wrapper {
        top: 60px;
    }
}

@media (max-width: 767.98px) {
    .map-radar-back {
        width: 36px;
        height: 36px;
        left: 10px;
        top: 10px;
    }
    .map-radar-back svg {
        width: 20px;
        height: 20px;
    }
    .map-fullscreen-wrapper .map-radar-layer-switch {
        left: 10px;
        top: 10px;
    }
    .map-fullscreen-wrapper .map-radar-controls {
        right: 10px;
        top: 10px;
    }
}



/* ============================================================
   5. КАРТОЧКА НОВОСТИ
   ============================================================ */
.news .card-header {
    font-size: 15px;
    padding: 8px 12px;
}
.news .card-body {
    padding: 8px 12px 12px;
}
.news .card-text {
    font-size: 13.5px;
    line-height: 1.55;
}
.news .card-text > *:first-child {
    margin-top: 0 !important;
}
.news .card-text > *:last-child {
    margin-bottom: 0 !important;
}
.news .card-text h1,
.news .card-text h2 {
    font-size: 15px;
    margin: 12px 0 6px;
}
.news .card-text h3,
.news .card-text .news-section {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    margin: 14px 0 6px;
    padding: 0;
    border: 0;
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}
.news .card-text p {
    margin: 0 0 8px;
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.news-img {
    max-width: 500px;
    width: 100%;
}
.card-text img,
.card-text video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
    border-radius: 4px;
}
.card-text table {
    max-width: 100%;
    font-size: 13px;
}

/* ============================================================
   6. КАРТОЧКА КАРТЫ
   ============================================================ */
.map-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    border: 0px solid #ffffff !important;   /* ← белая рамка */
    --bs-card-bg: #ffffff;
    background: #ffffff;
    isolation: isolate;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.25) !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.map-card:hover {
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(70, 128, 151, 0.35) !important;
}
.map-card .map-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 7px;   /* на 3px меньше, чем у карточки */
    background-color: #2a2f38;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.map-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.35) 100%),
        linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 35%, transparent 65%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.4s ease;
    border-radius: 10px;
}
.map-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 18px 12px;
    z-index: 3;
    pointer-events: none;
    text-align: center;
}
.map-caption h5 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(0, 0, 0, 0.6);
}
.map-card:hover .map-img {
    transform: scale(1.06);
    filter: brightness(1) contrast(1.1) saturate(1.15);
}
.map-card:hover::before { opacity: 0.75; }
.map-card:hover .map-caption h5 {
    color: #d7e9f2;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(70, 128, 151, 0.8);
}

/* ============================================================
   7. ПАГИНАЦИЯ
   ============================================================ */
.pagination .page-link {
    background-color: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}
.pagination .page-link:hover {
    background-color: var(--bg-card-hover);
    color: #fff;
}
.pagination .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    background-color: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.05);
    color: #7a838e;
}

/* ============================================================
   8. КНОПКИ STEAM
   ============================================================ */
.btn-steam-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #2a475e 0%, #1b2838 100%);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none !important;
    text-transform: uppercase;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}
.btn-steam-login:hover {
    background: linear-gradient(180deg, #3a6b8a 0%, #2a475e 100%);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.45),
        0 0 12px rgba(102, 192, 244, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}
.btn-steam-login:active {
    transform: translateY(0);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.btn-steam-login .steam-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-steam-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-steam-logout:hover {
    color: #ff8a8a;
    border-color: rgba(255, 138, 138, 0.5);
    background: rgba(255, 138, 138, 0.08);
}
.btn-steam-logout:active {
    background: rgba(255, 138, 138, 0.15);
}
.steam-logout-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
/* ============ Карточка новости ============ */
.news .card-header {
    font-size: 17px;
    font-weight: 700;
    padding: 10px 14px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ссылка-заголовок */
.news-title-link {
    color: inherit !important;
    text-decoration: none !important;
    flex: 1 1 auto;
    min-width: 0;
    transition: color 0.15s ease;
}
.news-title-link:hover {
    color: var(--accent) !important;
}

/* Метка «показан другой язык» */
.news-lang-fallback {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(255, 180, 84, 0.25);
    color: #b3760b;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Тело карточки */
.news .card-body {
    padding: 8px 14px 12px;
}
.news .card-text {
    font-size: 13.5px;
    line-height: 1.55;
}

/* Убираем лишние отступы у первого/последнего элемента */
.news .card-text > *:first-child {
    margin-top: 0 !important;
}
.news .card-text > *:last-child {
    margin-bottom: 0 !important;
}

.news .card-text h1,
.news .card-text h2 {
    font-size: 15px;
    margin: 12px 0 6px;
}
.news .card-text h3,
.news .card-text .news-section {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    margin: 12px 0 6px;
    padding: 0;
    border: 0;
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}
.news .card-text p {
    margin: 0 0 6px;
}
.news .card-text ul,
.news .card-text ol {
    margin: 6px 0;
    padding-left: 22px;
}
.news .card-text li {
    margin-bottom: 3px;
}

/* Футер карточки — дата внизу справа */
.news-footer {
    padding: 8px 14px;
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Ссылка возврата на странице новости */
.news-back {
    margin-top: 8px;
    margin-bottom: 12px;
}
.news-read-more {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent) !important;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    transition: color 0.15s ease;
}
.news-read-more:hover {
    color: var(--accent-light) !important;
}


/* ============================================================
   9. ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ
   ============================================================ */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.55;
}
.lang-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.lang-btn.active {
    border-color: var(--accent);
    opacity: 1;
    box-shadow: 0 0 8px rgba(70, 128, 151, 0.5);
}
.lang-flag {
    display: block;
    width: 100%;
    height: 100%;
}
/* ============================================================
   ПРОФИЛЬ — светлая тема (как карточки новостей)
   ============================================================ */
.profile-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.25);
}

/* ---------- Шапка профиля ---------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    background:
        linear-gradient(135deg, rgba(70, 128, 151, 0.15) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #eef1f4 0%, #e2e6ea 100%);
    border-bottom: 1px solid #dfe3e8;
    flex-wrap: wrap;
}

/* Аватар */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.15);
}
.profile-status-dot {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Имя и статус */
.profile-headline {
    flex: 1;
    min-width: 200px;
}
.profile-name {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #212529;
    line-height: 1.15;
    word-break: break-word;
}
.profile-realname {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

/* ---------- Плитки статистики ---------- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: #dfe3e8;
}
.profile-tile {
    background: #ffffff;
    padding: 18px 24px;
    transition: background 0.2s ease;
}
.profile-tile:hover {
    background: #f8f9fa;
}
.profile-tile-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 6px;
}
.profile-tile-value {
    font-size: 15px;
    color: #212529;
    font-weight: 600;
    word-break: break-word;
}
.profile-tile-sub {
    color: #6c757d;
    font-weight: 400;
    font-size: 13px;
}

/* ---------- Кнопка «Открыть в Steam» ---------- */
.btn-steam-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(180deg, #2a475e 0%, #1b2838 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-steam-profile:hover {
    background: linear-gradient(180deg, #3a6b8a 0%, #2a475e 100%);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(102, 192, 244, 0.35);
    transform: translateY(-1px);
}
.profile-link-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------- Действия в профиле ---------- */
.profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: #f5f6f8;
    border-top: 1px solid #eef1f4;
}

/* Кнопка «Выйти» на светлом фоне */
.profile-actions .btn-steam-logout {
    color: #a0281c;
    border-color: rgba(192, 57, 43, 0.4);
    background: #ffffff;
}
.profile-actions .btn-steam-logout:hover {
    color: #ffffff;
    background: #c0392b;
    border-color: #c0392b;
}

/* ---------- Заглушка под будущие блоки ---------- */
.profile-empty-block {
    padding: 32px;
    text-align: center;
    background: #f5f6f8;
    border-top: 1px solid #eef1f4;
}
.profile-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.profile-empty-text {
    font-size: 13px;
    color: #6c757d;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}
.profile-empty-text code {
    background: #e9ecef;
    padding: 1px 6px;
    border-radius: 3px;
    color: #468097;
    font-size: 12px;
}

/* ---------- Статусы игрока (светлые) ---------- */
.profile-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}
.profile-status.status-online  { color: #2c6a86; background: rgba(70, 128, 151, 0.15); }
.profile-status.status-offline { color: #555555; background: rgba(85, 85, 85, 0.12); }
.profile-status.status-busy    { color: #a0281c; background: rgba(192, 57, 43, 0.12); }
.profile-status.status-away    { color: #a05c00; background: rgba(230, 126, 34, 0.15); }
.profile-status.status-snooze  { color: #6a3d8a; background: rgba(142, 68, 173, 0.12); }
.profile-status.status-trade,
.profile-status.status-play    { color: #1b7d3f; background: rgba(39, 174, 96, 0.15); }

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 767.98px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .profile-avatar {
        width: 96px;
        height: 96px;
    }
    .profile-status-dot {
        width: 18px;
        height: 18px;
    }
    .profile-name {
        font-size: 22px;
    }
    .profile-tile {
        padding: 14px 18px;
    }
    .profile-tile-value {
        font-size: 14px;
    }

    /* Кнопки в одну строку, сжатые */
    .profile-actions {
        padding: 12px 16px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .profile-actions .btn-steam-profile,
    .profile-actions .btn-steam-logout {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 8px 10px;
        font-size: 11.5px;
        letter-spacing: 0.3px;
        white-space: nowrap;
    }
    .profile-actions .btn-steam-profile svg,
    .profile-actions .btn-steam-logout svg {
        width: 12px;
        height: 12px;
    }
}
/* ============================================================
   10. АНИМАЦИЯ ВЫДВИЖНОГО МЕНЮ
   ============================================================ */
@media (max-width: 991.98px) {
    #navbarMenu.offcanvas-lg {
        transition: transform 0.3s ease-in-out !important;
    }
}

@media (min-width: 992px) {
    #navbarMenu {
        transition: none !important;
    }
}

/* ============================================================
   11. МЕДИАЗАПРОСЫ
   ============================================================ */

/* ---------- Мобильный (< 992px) ---------- */
@media (max-width: 991.98px) {
    #navbarMenu {
        --bs-offcanvas-width: 260px;
    }
    #navbarMenu .offcanvas-body {
        display: flex;
        flex-direction: column;
    }
    #navbarMenu .player-auth-block {
        order: 1;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    #navbarMenu .nav-left {
        order: 2;
    }
    #navbar .nav-link.active::after {
        left: 0;
        right: auto;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
    }
    #navbar .nav-link.active {
        padding-left: 1.1rem !important;
    }
    #navbar .player-name {
        max-width: none;
        font-size: 15px;
    }
    .btn-steam-login {
        width: 100%;
        padding: 12px 20px;
    }
    .btn-steam-logout {
        width: 100%;
        justify-content: center;
    }

    /* Переключатель языка в мобильном меню */
    .lang-switcher {
        margin-right: 0;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
        justify-content: flex-start;
    }
    .lang-btn {
        width: 38px;
        height: 28px;
    }
}

/* ---------- Десктоп (≥ 992px) ---------- */
@media (min-width: 992px) {
    #navbar { flex-wrap: nowrap !important; }
    #navbarMenu {
        display: flex !important;
        flex-grow: 1 !important;
        width: 100% !important;
    }
    #navbarMenu .offcanvas-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-grow: 1 !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 1rem;
    }
    #navbarMenu .nav-left {
        display: flex !important;
        flex-direction: row !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-wrap: nowrap !important;
    }
    #navbarMenu .player-auth-block {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0;
    }
}

/* ---------- Тач-устройства ---------- */
@media (hover: none) {
    .map-card:hover .map-img { transform: none; }
    .map-card:hover { transform: none; }
}

/* ============ Админка в навбаре (ссылка видна всем админам) ============ */
#navbar .nav-link-admin {
    color: #ffb454 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}
#navbar .nav-link-admin:hover,
#navbar .nav-link-admin.active {
    color: #ffd08a !important;
}
#navbar .nav-link-admin .admin-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
#navbar .nav-link-admin.active::after {
    background: #ffb454 !important;
    box-shadow: 0 0 6px rgba(255, 180, 84, 0.7) !important;
}
/* ============================================================
   СТРАНИЦА ОШИБКИ (403 / 404 / не авторизован)
   ============================================================ */
.error-page {
    max-width: 520px;
    margin: 20px auto;
    padding: 40px 32px;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

/* Декоративная полоса сверху */
.error-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent) 50%,
        transparent 100%);
    opacity: 0.7;
}

/* Крупный код ошибки — тёмно-синий градиент */
.error-code {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -4px;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #2c6a86 0%, #468097 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Иконка вместо числа (для «не авторизован», «пусто» и т.п.) */
.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(70, 128, 151, 0.15) 0%, rgba(70, 128, 151, 0.05) 100%);
    border: 2px solid rgba(70, 128, 151, 0.25);
    color: #468097;
    box-shadow:
        0 4px 16px rgba(70, 128, 151, 0.15),
        inset 0 0 20px rgba(70, 128, 151, 0.06);
}
.error-icon svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}

/* Заголовок */
.error-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800;
    color: #212529;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Описание */
.error-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #6c757d;
    margin: 0 auto 28px;
    max-width: 400px;
}

/* Кнопки */
.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Мобильная адаптация */
@media (max-width: 575.98px) {
    .error-page {
        margin: 12px auto;
        padding: 28px 20px;
    }
    .error-code {
        font-size: 72px;
        letter-spacing: -3px;
    }
    .error-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 12px;
    }
    .error-icon svg {
        width: 36px;
        height: 36px;
    }
    .error-title {
        font-size: 18px;
        letter-spacing: 1px;
    }
    .error-desc {
        font-size: 13px;
        margin-bottom: 22px;
    }
    .error-actions .btn-steam-login {
        width: 100%;
        justify-content: center;
    }
}
/* ============ Просмотр радара (вкладка «Радар») ============ */

/* Вкладка радара — без padding, картинка на всю ширину карточки */
.map-tab-content-full {
    padding: 0;
}

/* Вьювер — контейнер для слоёв и кнопок */
.map-radar-viewer {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 1 / 1;
    width: min(100%, 80vh);
    max-height: 80vh;
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.map-radar-viewer:fullscreen {
    aspect-ratio: auto;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Обёртка слоёв — то, к чему применяется panzoom */
.map-radar-layers {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
    cursor: grab;
}
.map-radar-layers:active {
    cursor: grabbing;
}

/* Слои накладываются друг на друга */
.map-radar-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.map-radar-layer.active {
    opacity: 1;
    visibility: visible;
}

/* Переключатель слоёв — слева сверху */
.map-radar-layer-switch {
    position: absolute;
    left: 14px;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.map-layer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    color: #495057;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
}
.map-layer-btn:hover {
    background: #ffffff;
    color: #212529;
}
.map-layer-btn.active {
    background: #468097;
    color: #ffffff;
    border-color: #468097;
}

/* Кнопки управления — справа сверху */
.map-radar-controls {
    position: absolute;
    right: 14px;
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.map-ctrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #212529;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.map-ctrl-btn:hover {
    background: #ffffff;
    transform: scale(1.05);
}
.map-ctrl-btn:active {
    transform: scale(0.95);
}

/* Мобильная адаптация */
@media (max-width: 767.98px) {
    .map-ctrl-btn {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }
    .map-radar-controls {
        right: 10px;
        top: 10px;
    }
    .map-radar-layer-switch {
        left: 10px;
        top: 10px;
    }
    .map-layer-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}