/* =========================================
   1. ПЕРЕМЕННЫЕ ЦВЕТОВ (THEMING)
   ========================================= */
:root {
    color-scheme: dark;
    /* --- ТЕМНАЯ ТЕМА (ПО УМОЛЧАНИЮ) --- */
    --bg-color: #0d0f14;
    /* Приятный глубокий, но не слишком черный фон */
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --header-bg: rgba(13, 15, 20, 0.7);
    --border-color: rgba(255, 255, 255, 0.04);

    /* Карточки и элементы */
    --card-bg: #16171d;
    --card-border: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(255, 255, 255, 0.12);
    --hover-bg: #1d1f27;
    --switch-bg: #3f3f46;

    /* Фон (Градиент) */
    --gradient-start: #16171d;
    --gradient-end: #0d0f14;

    /* Текст заголовка (Градиент) */
    --title-gradient-start: #ffffff;
    --title-gradient-end: #e4e4e7;
}

/* --- СВЕТЛАЯ ТЕМА --- */
.light-theme {
    color-scheme: light;
    --bg-color: #f3f4f6;
    --text-main: #111827;
    /* Почти черный */
    --text-muted: #4b5563;
    /* Серый */
    --header-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.05);

    /* Выпадающее меню */
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --border-highlight: rgba(0, 0, 0, 0.12);
    --hover-bg: #f3f4f6;
    --switch-bg: #e5e7eb;

    /* Фон (Градиент) - Делаем светло-голубой */
    --gradient-start: #dbeafe;
    --gradient-end: #f3f4f6;

    /* Текст заголовка - Темный градиент */
    --title-gradient-start: #111827;
    --title-gradient-end: #4b5563;
}

/* =========================================
   2. БАЗА
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800&display=swap');

::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

html {
    scrollbar-width: none;
    scroll-behavior: smooth;
    font-size: 115%;
    /* Увеличиваем масштаб всего сайта */
    background-color: #0d0f14;
    /* Предотвращаем белый флэш */
}

@media (max-width: 768px) {
    html {
        font-size: 100%;
        /* На мобильных оставляем стандартный, иначе будет слишком крупно */
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    /* ИСПОЛЬЗУЕМ ПЕРЕМЕННУЮ */
    color: var(--text-main);
    /* ИСПОЛЬЗУЕМ ПЕРЕМЕННУЮ */
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   3. ФОН
   ========================================= */
.page-wrapper {
    min-height: 100vh;
    background-color: transparent;
    position: relative;
    z-index: 1;
    /* relative to abstract-bg */
}

/* Спец фон для статистики, вики, городов и карты */
body.page-stats,
body.page-wiki,
body.page-towns,
body.page-map,
body.page-offer,
body.page-offers,
body.page-profile,
body.page-admin {
    background-color: var(--card-bg) !important;
}

body.page-stats #particles-canvas,
body.page-wiki #particles-canvas,
body.page-towns #particles-canvas,
body.page-map #particles-canvas,
body.page-offer #particles-canvas,
body.page-offers #particles-canvas,
body.page-profile #particles-canvas,
body.page-admin #particles-canvas {
    display: none !important;
}

body.page-stats .page-wrapper,
body.page-wiki .page-wrapper,
body.page-towns .page-wrapper,
body.page-map .page-wrapper,
body.page-offer .page-wrapper,
body.page-offers .page-wrapper,
body.page-profile .page-wrapper,
body.page-admin .page-wrapper {
    background-image: none !important;
    background-color: transparent !important;
}

body.page-map .minimal-footer {
    display: none !important;
}

/* =========================================
   4. ХЕДЕР
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-highlight);
    transition: background 0.3s ease;
}

.header-wide {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    transition: 0.3s;
}

.main-nav a:hover {
    color: var(--text-main);
}

.main-nav a.active {
    color: #3b82f6;
    /* Делаем сам текст синим */
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -19px;
    /* Спустили полосочку ровно на границу хедера. Подбирайте под отступы, сейчас это 19-20px */
    left: -15px;
    right: -15px;
    height: 2px;
    background-color: #3b82f6;
    border-radius: 2px;
    box-shadow: none;
    /* Убрал свечение, чтобы было матово и строго */
    animation: slideInNav 0.3s ease;
}

@keyframes slideInNav {
    from {
        left: 50%;
        right: 50%;
        opacity: 0;
    }

    to {
        left: -15px;
        right: -15px;
        opacity: 1;
    }
}

/* =========================================
   5. ПРАВЫЙ УГОЛ
   ========================================= */
.auth-corner {
    display: flex;
    align-items: center;
    position: relative;
}

.btn-login {
    background-color: #2563eb;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-login:hover {
    background-color: #1d4ed8;
}

.profile-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--border-color);
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.profile-trigger:hover {
    background: var(--hover-bg);
}

.avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.minecraft-head {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.arrow {
    font-size: 12px;
    margin-left: 10px;
    color: var(--text-muted);
}

/* Avatar Helm - showing face from full skin png */
.avatar-helm {
    --size: 32px;
    width: var(--size);
    height: var(--size);
    background-size: 812% 812%;
    background-position: 14.285% 14.285%;
    image-rendering: pixelated;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-color: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.avatar-helm.is-minotar {
    background-size: cover !important;
    background-position: center !important;
}

.dropdown-menu {
    position: absolute;
    top: 75px;
    right: 0;
    width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 16px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dropdown-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.avatar-medium {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 15px;
}

.pixel-art {
    image-rendering: pixelated;
    border: 2px solid var(--border-color);
}

.username {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--text-main);
}

.status-link {
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.status-link:hover {
    text-decoration: underline;
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 10px 0;
}

/* Пункты меню */
.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ */
.toggle-switch {
    width: 40px;
    height: 22px;
    background: var(--switch-bg);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
}

/* Когда включена (Темная тема) */
.toggle-switch.checked {
    background: #2563eb;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    transform: translateX(0);
    /* Выключено (Светлая) - Слева */
}

/* Сдвиг кружочка вправо при активном классе */
.toggle-switch.checked::after {
    transform: translateX(18px);
    /* Включено (Темная) - Справа */
}

/* =========================================
   7. ЛЕНДИНГ
   ========================================= */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 1200px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--title-gradient-start) 0%, var(--title-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-footer {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .header-wide {
        width: 90%;
    }
}

/* --- СТИЛИ ДЛЯ КАРТЫ --- */
/* --- СТИЛИ ДЛЯ КАРТЫ (ИСПРАВЛЕННЫЕ) --- */
.map-section {
    width: 100%;
    height: 100vh;
    padding-top: 50px;
    /* Отступ чтобы хедер не перекрывал, сделал поменьше чтобы карта была больше */
    box-sizing: border-box;
    background-color: var(--bg-color);
    overflow: hidden;
}

.map-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    /* Скругляем углы карты сверху, если хочешь красоты */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* --- СТИЛЬ ДЛЯ ДОКУМЕНТОВ В МЕНЮ --- */
.legal-link {
    font-size: 0.8rem;
    /* Шрифт поменьше */
    color: var(--text-muted);
    /* Серый цвет */
    padding: 8px 12px;
    /* Покомпактнее */
}

.legal-link:hover {
    color: var(--text-main);
    /* При наведении белеет */
    background: transparent;
    /* Без фона, просто текст */
    text-decoration: underline;
    /* Подчеркивание */
}

/* Статус когда куплено */
.active-pass {
    color: #22c55e;
    /* Ярко-зеленый */
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    /* На него нельзя нажать */
}

.indicator-green {
    font-size: 0.6rem;
    color: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* --- СТРАНИЦА СТАТИСТИКИ --- */
.stats-section {
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: 100vh;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-main);
}

/* Поиск */
.search-bar {
    width: 100%;
    box-sizing: border-box;
    /* Fix for mobile overflow */
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 30px;
    outline: none;
    transition: 0.3s;
}

.search-bar:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Сетка карточек */
.players-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .players-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .players-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .players-grid {
        grid-template-columns: 1fr;
    }
}

/* Карточка игрока */
.player-card {
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
}

.player-card:hover {
    transform: translateY(-5px);
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-right: 15px;
    /* Твой стиль для пикселей */
    image-rendering: pixelated;
    border: 1px solid var(--border-color);
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-nick {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.card-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.card-time span {
    font-weight: 600;
    color: #fff;
    /* Белые цифры */
}

/* В светлой теме цифры темные */
body.light-theme .card-time span {
    color: #000;
}

/* --- АДМИН ДАШБОРД (НОВЫЙ СТИЛЬ) --- */
.admin-header {
    margin-bottom: 30px;
}

.admin-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 8px;
}

.admin-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.admin-card-new {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
    border: 1px solid var(--border-highlight);
    padding: 20px;
    border-radius: 16px;
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.admin-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.admin-card-new:hover {
    background: var(--hover-bg);
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.admin-card-new:hover::before {
    opacity: 1;
}

.admin-card-new:active {
    transform: translateY(-1px);
}

/* Иконка */
.admin-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-card-icon svg {
    width: 24px;
    height: 24px;
}

/* Цвета иконок */
.icon-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.icon-green {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.icon-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.icon-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.icon-pink {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

/* Текст */
.admin-card-info {
    flex: 1;
    min-width: 0;
}

.admin-card-info h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.admin-card-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стрелка */
.admin-card-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.admin-card-arrow svg {
    width: 100%;
    height: 100%;
}

.admin-card-new:hover .admin-card-arrow {
    opacity: 1;
    color: #3b82f6;
    transform: translateX(3px);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .admin-grid-new {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-card-new {
        padding: 16px;
        border-radius: 14px;
    }

    .admin-card-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .admin-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .admin-card-info h3 {
        font-size: 0.95rem;
    }

    .admin-card-info p {
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* Старые стили для обратной совместимости */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-main);
}

.admin-card-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.card-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Цвета для иконок */
.icon-users {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.icon-stats {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.card-text h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-text p {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arrow-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* --- АДМИН: КНОПКА НАЗАД --- */
.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.admin-back-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-back-link svg {
    transition: transform 0.2s ease;
}

.admin-back-link:hover svg {
    transform: translateX(-3px);
}

/* --- АДМИН: ТАБЛИЦЫ --- */
.admin-table-wrapper {
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.admin-table th,
.admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-highlight);
}

.admin-table th {
    background: var(--hover-bg);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: var(--hover-bg);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Ячейка пользователя */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-head {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    image-rendering: pixelated;
}

.id-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* --- АДМИН: СТАТУС БЕЙДЖИ --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* --- АДМИН: КНОПКИ ДЕЙСТВИЙ --- */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-grant {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-grant:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-revoke {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-revoke:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* --- АДМИН: МОБИЛЬНАЯ АДАПТАЦИЯ ТАБЛИЦ --- */
@media (max-width: 768px) {
    .admin-table-wrapper {
        border-radius: 14px;
        overflow-x: auto;
    }

    .admin-table {
        min-width: 500px;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .mini-head {
        width: 32px;
        height: 32px;
    }

    .btn-action {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .status-badge {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

/* Дополнительные кнопки для админки */
.btn-view {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-approve {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.btn-approve:hover {
    background: rgba(34, 197, 94, 0.25);
    transform: translateY(-1px);
}

.btn-reject-sm {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-reject-sm:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Группа кнопок */
.action-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Пустая ячейка таблицы */
.empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 30px !important;
}

/* Подзаголовок секции */
/* Подзаголовок секции */
.section-subtitle {
    margin-bottom: 25px;
    /* Чуть больше отступ снизу */
    margin-top: 10px;
    color: var(--text-muted);
    /* text-transform: uppercase; <--- УБРАЛИ */
    font-size: 1.1rem;
    /* Чуть покрупнее */
    /* letter-spacing: 1px; <--- УБРАЛИ */
    font-weight: 500;
    /* Чуть тоньше жирность */
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.8;
}

/* Иконка удаления */
.btn-icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transition: all 0.2s ease;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

/* Пустое состояние */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    gap: 12px;
}

.empty-icon {
    opacity: 0.5;
}

/* Поиск в админке */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 14px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    width: 150px;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* --- ФИНАНСОВАЯ СТАТИСТИКА (МОНИТОРИНГ) --- */
.monitoring-wrapper {
    padding: 20px 0 60px;
}

/* Карточки статистики */
.finance-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.finance-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
}

.finance-stat-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.finance-stat-card.main-revenue {
    /* background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.02) 100%); */
    /* border-color: rgba(59, 130, 246, 0.2); */
}

/* --- FIX: Make Feature Icons Monochrome and Transparent --- */
/* --- FIX: Make Feature Icons Monochrome and Transparent --- */
.bento-card .icon-box {
    background: transparent !important;
    border: none !important;
    /* Увеличиваем размер контейнера */
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    /* Чтобы не сжимало */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-main) !important;
    /* Было muted, стало main (белый) */
    margin-right: 20px;
    margin-bottom: 0;
}

/* Для горизонтальных карточек выравниваем иконку по центру вертикально */
.bento-card.card-wide .card-content-row {
    align-items: center;
    /* Центрируем иконку и текст */
}

/* Для вертикальных карточек (small) иконка сверху-слева */
.bento-card.card-small .icon-box {
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    margin-right: 0;
    margin-bottom: 20px;
    justify-content: flex-start !important;
}

.bento-card .icon-box svg {
    color: var(--text-main) !important;
    /* Было muted, стало main (белый) */
    width: 42px !important;
    /* Увеличили саму иконку внутри */
    height: 42px !important;
    stroke-width: 1.5;
}

.bento-card:hover .icon-box {
    background: transparent !important;
    color: var(--text-main) !important;
}

.bento-card:hover .icon-box svg {
    color: var(--text-main) !important;
    transform: scale(1.1);
    transition: transform 0.3s ease, color 0.3s ease;
}

.fsc-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.fsc-icon.purple {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.fsc-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.fsc-icon.green {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.fsc-icon.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.fsc-content {
    flex: 1;
    min-width: 0;
}

.fsc-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.fsc-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.fsc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
}

.fsc-badge.success {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.fsc-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.fsc-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Переключатель периода */
.period-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    width: fit-content;
}

.period-tab {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.period-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.period-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* График */
.finance-chart-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.fcp-header {
    margin-bottom: 20px;
}

.fcp-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.fcp-chart {
    height: 280px;
}

/* Продажи по дням */
.sales-section {
    margin-top: 10px;
}

.sales-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.sale-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.sale-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.sale-card.today {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sale-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sale-live {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #22c55e;
    text-transform: uppercase;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.sale-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.sale-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.sale-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .finance-stats-grid {
        grid-template-columns: 1fr;
    }

    .period-tabs {
        width: 100%;
        justify-content: center;
    }

    .period-tab {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }

    .fcp-chart {
        height: 220px;
    }

    .sales-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .finance-stat-card {
        padding: 16px;
    }

    .fsc-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .sales-grid {
        grid-template-columns: 1fr;
    }
}

/* --- КРАСИВЫЕ ФОРМЫ (Для регистрации города) --- */
.form-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    /* Чтобы было по центру экрана */
}

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #09090b;
    /* Очень темный фон внутри поля */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.2s;
    box-sizing: border-box;
    /* Чтобы padding не ломал ширину */
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* --- ТАБЛИЦА ЗАЯВОК (Фикс разъехавшихся колонок) --- */
.table-responsive {
    overflow-x: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Чтобы таблица не сжималась слишком сильно */
}

.admin-table th {
    text-align: left;
    padding: 16px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Кнопки действий в таблице */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.btn-mini {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-approve {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.btn-approve:hover {
    background: rgba(34, 197, 94, 0.25);
}

.btn-reject {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.btn-reject:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* --- ВАЖНО: Фикс шрифтов для кнопок и полей --- */
button,
input,
textarea,
select {
    font-family: 'Inter', sans-serif !important;
    /* Принудительно ставим наш шрифт */
}

/* --- КНОПКА СОЗДАНИЯ ГОРОДА (Синяя версия) --- */
.btn-create-town {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Центрируем текст внутри кнопки */
    gap: 8px;

    /* СИНИЙ ГРАДИЕНТ (Вместо зеленого) */
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;

    padding: 10px 20px;
    /* Чуть компактнее */
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* Синяя тень */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);

    /* Чтобы кнопка не растягивалась по высоте */
    height: fit-content;
}

.btn-create-town:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* Класс для ровной шапки страницы */
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Строго по центру по вертикали */
    margin-bottom: 30px;
    width: 100%;
}

/* --- ОБНОВЛЕННАЯ КНОПКА ОТПРАВКИ (Синяя) --- */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    /* Синий градиент */
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 15px;
    letter-spacing: 0.5px;
    /* Чуть разрядим буквы */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* --- СТИЛИ ДЛЯ КАТАЛОГА ГОРОДОВ --- */

/* Счетчик (серая плашка с цифрой) */
.count-badge {
    display: inline-block;
    background: #27272a;
    /* Темно-серый фон */
    color: #a1a1aa;
    /* Светло-серый текст */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 12px;
    /* Отступ от заголовка */
    vertical-align: middle;
}

/* Поле поиска (Темное, как на скрине) */
.town-search-input {
    width: 100%;
    padding: 14px 18px;
    margin-top: 20px;
    /* Отступ от заголовка */
    margin-bottom: 30px;
    /* Отступ до карточек */

    background: #09090b;
    /* Очень темный фон */
    border: 1px solid var(--border-color);
    border-radius: 12px;

    color: white;
    font-size: 0.95rem;
    transition: 0.2s;
    box-sizing: border-box;
}

.town-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #000;
}

.town-search-input::placeholder {
    color: #52525b;
}

/* --- ОБНОВЛЕННЫЕ СТИЛИ КАТАЛОГА --- */

/* Контейнер шапки (выравнивание по краям) */
.page-header-row {
    display: flex;
    justify-content: space-between;
    /* Строго по краям */
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

/* Счетчик (серая плашка) */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* ИСПОЛЬЗУЕМ ПЕРЕМЕННЫЕ */
    background: var(--badge-bg);
    color: var(--badge-text);

    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 10px;
    height: 24px;
}

/* Поле поиска (ИСПРАВЛЕН ЦВЕТ) */
.town-search-input {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 30px;

    /* ИСПОЛЬЗУЕМ ПЕРЕМЕННЫЕ */
    background: var(--search-bg);
    color: var(--search-text);
    border: 1px solid var(--border-color);

    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.town-search-input::placeholder {
    color: var(--search-placeholder);
}

.town-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- ЕДИНАЯ ПАНЕЛЬ ИНСТРУМЕНТОВ (Toolbar) --- */
.towns-toolbar {
    display: flex;
    align-items: center;
    /* Центрируем по вертикали */
    gap: 12px;
    /* Отступ между элементами */
    margin-bottom: 30px;
    height: 50px;
    /* Фиксируем высоту всей строки */
    width: 100%;
}

/* ОБЩИЕ ПРАВИЛА ДЛЯ ВСЕХ ТРЕХ ЭЛЕМЕНТОВ
   (Поиск, Кнопка, Бейдж) */
.towns-toolbar input,
.towns-toolbar .btn-create-town,
.towns-toolbar .standalone-badge {
    height: 100% !important;
    /* Заполняют высоту контейнера (50px) */
    box-sizing: border-box !important;
    /* Границы и отступы ВНУТРИ размера */
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    line-height: normal;
    /* Сброс межстрочного интервала */
}

/* 1. ПОЛЕ ПОИСКА */
.towns-toolbar .town-search-input {
    flex-grow: 1;
    /* Растягивается на все место */
    margin: 0;
    padding: 0 20px;

    background: transparent;
    border: 1px solid var(--border-highlight);
    /* Рамка 1px */
    color: var(--search-text);
    outline: none;
}

.towns-toolbar .town-search-input:focus {
    border-color: #3b82f6;
}

/* 2. КНОПКА СОЗДАНИЯ */
.towns-toolbar .btn-create-town {
    flex-shrink: 0;
    /* Не сжимать */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;

    background: #2563eb;
    color: white;
    border: 1px solid transparent;
    /* Добавляем невидимую рамку, чтобы размер совпадал с поиском */
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.towns-toolbar .btn-create-town:hover {
    background: #1d4ed8;
}

/* 3. СЧЕТЧИК (БЕЙДЖ) */
.towns-toolbar .standalone-badge {
    flex-shrink: 0;
    /* Не сжимать */
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    /* Делаем квадратным (50x50) */
    padding: 0;
    /* Убираем отступы, чтобы цифра была по центру */

    background: transparent;
    color: var(--badge-text);
    border: 1px solid var(--border-highlight);
    /* Рамка 1px (как у поиска) */
    font-weight: 700;
}

/* --- НОВЫЕ КАРТОЧКИ ГОРОДОВ --- */
.town-card {
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    overflow: hidden;
    /* Чтобы картинка не вылезала за углы */
    display: flex;
    flex-direction: column;
    transition: 0.2s;
    min-height: 300px;
}

.town-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
}

/* Обложка сверху */
.town-cover {
    height: 140px;
    background-color: #27272a;
    /* Цвет если картинки нет */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Координаты поверх картинки */
.coords-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    backdrop-filter: blur(4px);
}

.town-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.town-header-info {
    margin-bottom: 10px;
}

.town-name {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
}

.town-owner {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.town-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Растягивает описание, прижимая футер вниз */
}

/* Футер карточки (Кнопка и участники) */
.town-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* Кнопка Дискорда */
.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #5865F2;
    /* Цвет Discord */
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}

.btn-discord:hover {
    background: #4752c4;
}

/* Текст "Нет дискорда" */
.no-discord {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 8px;
}

.town-stat {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

/* --- КОМПАКТНЫЕ КАРТОЧКИ ГОРОДОВ (Как на скрине) --- */

/* Сетка (2 колонки на широких экранах) */
.towns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.town-card-compact {
    display: flex;
    justify-content: space-between;
    /* Разносим левую и правую часть */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    min-height: 180px;
    transition: all 0.2s ease;
}

.town-card-compact:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Левая часть с текстом */
.town-info-left {
    padding: 20px;
    flex: 1;
    /* Занимает все свободное место */
    display: flex;
    flex-direction: column;
}

/* Заголовок */
.town-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mini-head {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.town-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

/* Описание */
.town-desc-short {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
    /* Чуть жирнее, как подзаголовок */
    margin-bottom: 12px;

    /* Обрезаем, если слишком длинное (2 строки) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Список (точки) */
.town-stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #a1a1aa;
    /* Серый текст */
    line-height: 1.8;
    /* Отступы между строками */
}

/* Дискорд статус */
.discord-yes {
    color: #10b981;
    /* Зеленый текст */
    display: flex;
    align-items: center;
    gap: 5px;
}

.discord-no {
    color: #52525b;
    /* Темно-серый */
}

.discord-link-icon {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

/* Правая часть (Картинка-полоска) */
.town-image-strip {
    width: 100px;
    /* Фиксированная ширина полоски */
    background-size: cover;
    background-position: center;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
    /* Не сжимать картинку */
}

/* --- КАРТОЧКИ В СПИСКЕ (Минимализм) --- */
.town-card-minimal {
    display: flex;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    min-height: 140px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.town-card-minimal:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.minimal-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.minimal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.town-name-min {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

.minimal-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #a1a1aa;
    line-height: 1.6;
}

.tiny-head {
    border-radius: 4px;
}

/* Цветная полоска справа */
.color-strip {
    width: 60px;
    background: #ef4444;
    /* Базовый красный */
    opacity: 0.8;
}

/* --- СТРАНИЦА ПРОФИЛЯ ГОРОДА --- */
.town-profile-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    /* Основная часть + Сайдбар */
    gap: 25px;
}

/* Адаптив для телефонов */
@media (max-width: 800px) {
    .town-profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-header-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-cover-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #27272a;
}

.profile-header-text {
    padding: 25px;
}

.profile-title {
    margin: 0 0 5px 0;
    font-size: 2rem;
}

.profile-subtitle {
    color: var(--text-muted);
}

.profile-desc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.desc-text {
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-wrap;
    /* Сохраняет абзацы */
}

.coords-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-family: monospace;
    display: flex;
    gap: 15px;
    color: #a1a1aa;
}

.coords-box span {
    color: white;
    font-weight: bold;
}

/* Сайдбар */
.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.sidebar-link {
    display: block;
    color: #3b82f6;
    text-decoration: none;
    margin-bottom: 8px;
}

.sidebar-link:hover {
    text-decoration: underline;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.member-row img {
    border-radius: 4px;
    width: 24px;
}

.badge-count {
    background: #27272a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    float: right;
}

/* =========================================
   СТРАНИЦА ГОРОДА (CLEAN STYLE)
   ========================================= */

/* Сетка страницы */
.town-profile-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin-top: 10px;
}

@media (max-width: 850px) {
    .town-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Кнопка Назад */
.nav-header {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--hover-bg);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}


/* --- ГЛАВНАЯ КАРТОЧКА --- */
.town-main-card {
    background: var(--card-bg);
    /* Цвет карточек как на скринах */
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 30px;
}

/* Шапка: Название и ID */
.town-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.town-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.town-id-tag {
    background: #27272a;
    color: #71717a;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    position: relative;
    top: -2px;
}

/* Кнопка Дискорда (маленькая) */
.discord-btn-small {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.discord-btn-small:hover {
    background: rgba(88, 101, 242, 0.2);
}


/* --- МЕТА ИНФОРМАЦИЯ (Мэр + Координаты) --- */
.town-meta-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

/* Мэр */
.town-meta-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-highlight);
    /* БЫЛО: #27272a */
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.meta-label {
    color: var(--text-muted);
}

.meta-head {
    border-radius: 4px;
}

.meta-value {
    color: var(--text-main);
    font-weight: 600;
}

/* БЫЛО: white */

.coords-badge-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--border-highlight);
    /* БЫЛО: #27272a */
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    /* БЫЛО: #e4e4e7 */
}

.c-label {
    color: var(--text-muted);
    margin-right: 2px;
}

.divider {
    color: var(--border-color);
}

.town-divider {
    height: 1px;
    background: var(--border-highlight);
    margin: 0 0 25px 0;
}

.desc-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.desc-text {
    color: var(--text-main);
    /* БЫЛО: #d4d4d8 */
    line-height: 1.6;
    font-size: 1rem;
    white-space: pre-wrap;
}

/* --- САЙДБАР --- */
.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: white;
}

/* Форма инвайта */
.invite-form-row {
    display: flex;
    gap: 8px;
}

.invite-form-row input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.invite-form-row button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Список жителей */
.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--text-main);
    /* БЫЛО: white */
}

.invite-form-row {
    display: flex;
    gap: 8px;
}

.invite-form-row input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.invite-form-row button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.count-badge-small {
    background: transparent;
    border: 1px solid var(--border-highlight);
    /* БЫЛО: #27272a */
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.member-row-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-highlight);
}

.member-row-compact:last-child {
    border-bottom: none;
}

.member-row-compact img {
    border-radius: 4px;
}

.member-name {
    color: var(--text-main);
    font-size: 0.95rem;
}

/* БЫЛО: #d4d4d8 */
.is-mayor {
    color: #fbbf24;
    font-weight: 600;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 10px 0;
}

/* =========================================
   9. СПИСОК ГОРОДОВ (КАТАЛОГ)
   ========================================= */

/* --- ЕДИНАЯ ПАНЕЛЬ ИНСТРУМЕНТОВ (Toolbar) --- */
.towns-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    height: 50px;
    width: 100%;
}

.towns-toolbar input,
.towns-toolbar .btn-create-town,
.towns-toolbar .standalone-badge {
    height: 100% !important;
    box-sizing: border-box !important;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    line-height: normal;
}

/* 1. ПОЛЕ ПОИСКА (Исправлено на переменные) */
.towns-toolbar .town-search-input {
    flex-grow: 1;
    margin: 0;
    padding: 0 20px;

    background: transparent;
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    /* БЫЛО: white */
    outline: none;
}

.towns-toolbar .town-search-input:focus {
    border-color: #3b82f6;
}

.towns-toolbar .town-search-input::placeholder {
    color: var(--text-muted);
}

/* 2. КНОПКА СОЗДАНИЯ */
.towns-toolbar .btn-create-town {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    background: #2563eb;
    color: white;
    /* Текст на синей кнопке всегда белый */
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.towns-toolbar .btn-create-town:hover {
    background: #1d4ed8;
}

/* 3. СЧЕТЧИК (БЕЙДЖ) */
.towns-toolbar .standalone-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    padding: 0;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-highlight);
    font-weight: 700;
}

/* --- КАРТОЧКИ В СПИСКЕ (Минимализм) --- */
.towns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.town-card-minimal {
    display: flex;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    overflow: hidden;
    min-height: 140px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.town-card-minimal:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.minimal-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.minimal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.town-name-min {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    /* БЫЛО: color: white */
    font-weight: 700;
}

.minimal-stats {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    /* БЫЛО: color: #a1a1aa */
    line-height: 1.6;
}

.tiny-head {
    border-radius: 4px;
}


/* =========================================
   10. ПРОФИЛЬ ГОРОДА (CLEAN STYLE)
   ========================================= */

.town-profile-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    margin-top: 10px;
}

@media (max-width: 850px) {
    .town-profile-grid {
        grid-template-columns: 1fr;
    }
}

.nav-header {
    margin-bottom: 20px;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.back-link:hover {
    color: var(--text-main);
}


/* --- ГЛАВНАЯ КАРТОЧКА --- */
.town-main-card {
    background: var(--card-bg);
    /* БЫЛО: #18181b */
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 30px;
}

.town-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.town-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    /* БЫЛО: white */
    line-height: 1.2;
}

.town-id-tag {
    background: var(--hover-bg);
    /* БЫЛО: #27272a */
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    position: relative;
    top: -2px;
}

.discord-btn-small {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.discord-btn-small:hover {
    background: rgba(88, 101, 242, 0.2);
}


/* --- МЕТА ИНФОРМАЦИЯ --- */
.town-meta-row {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    /* БЫЛО: #27272a */
    border: 1px solid var(--border-highlight);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.meta-label {
    color: var(--text-muted);
}

.meta-head {
    border-radius: 4px;
}

.meta-value {
    color: var(--text-main);
    font-weight: 600;
}

/* БЫЛО: white */

.coords-badge-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    /* БЫЛО: #27272a */
    border: 1px solid var(--border-highlight);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    /* БЫЛО: #e4e4e7 */
}

.c-label {
    color: var(--text-muted);
    margin-right: 2px;
}

.divider {
    color: var(--border-color);
}

.town-divider {
    height: 1px;
    background: var(--border-highlight);
    margin: 0 0 25px 0;
}

.desc-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.desc-text {
    color: var(--text-main);
    /* БЫЛО: #d4d4d8 */
    line-height: 1.6;
    font-size: 1rem;
    white-space: pre-wrap;
}


/* --- САЙДБАР --- */
.sidebar-card {
    background: var(--card-bg);
    /* БЫЛО: #18181b */
    border: 1px solid var(--border-highlight);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--text-main);
    /* БЫЛО: white */
}

.invite-form-row {
    display: flex;
    gap: 8px;
}

.invite-form-row input {
    width: 100%;
    background: transparent;
    /* БЫЛО: #09090b */
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.invite-form-row button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.count-badge-small {
    background: transparent;
    /* БЫЛО: #27272a */
    border: 1px solid var(--border-highlight);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.member-row-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-highlight);
}

.member-row-compact:last-child {
    border-bottom: none;
}

.member-row-compact img {
    border-radius: 4px;
}

.member-name {
    color: var(--text-main);
    font-size: 0.95rem;
}

/* БЫЛО: #d4d4d8 */
.is-mayor {
    color: #fbbf24;
    font-weight: 600;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 10px 0;
}

/* =========================================
   8. ФОРМЫ (РЕГИСТРАЦИЯ/ВХОД)
   ========================================= */
.form-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* --- ВОТ ЗДЕСЬ БЫЛА ОШИБКА --- */
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;

    /* ИСПРАВЛЕНО: Теперь используются переменные */
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);

    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 15px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.notification-wrapper {
    position: relative;
    margin-right: 15px;
    /* Отступ от аватарки */
}

/* Кнопка колокольчика */
.notif-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Круглая */
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.notif-btn:hover {
    background: var(--hover-bg);
    color: var(--text-main);
}

/* Красная точка (Бейдж) */
.notif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    /* Красный */
    border-radius: 50%;
    border: 2px solid var(--header-bg);
    /* Обводка под цвет фона хедера */
}

/* Выпадающее окно */
.notif-dropdown {
    position: absolute;
    top: 60px;
    right: -60px;
    /* Центрируем относительно колокольчика */
    width: 320px;

    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 1100;
    overflow: hidden;
}

.notif-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Шапка уведомлений */
.notif-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.mark-read {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
}

.mark-read:hover {
    text-decoration: underline;
}

/* Список */
.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Элемент уведомления */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.notif-item:hover {
    background: var(--hover-bg);
}

.notif-item:last-child {
    border-bottom: none;
}

/* Если не прочитано - фон чуть светлее/ярче */
.notif-item.unread {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid #3b82f6;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-text,
.notif-text-link {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.4;
    display: block;
}

.notif-text-link:hover {
    color: #3b82f6;
}

.notif-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notif-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Кнопка удаления уведомления (десктоп) */
.notif-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.notif-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Кнопка удаления уведомления (мобильная версия) */
.mn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.mn-delete:active {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: scale(0.95);
}

/* --- МЕТА ИНФОРМАЦИЯ (Мэр + Координаты) --- */
.town-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Чуть уменьшил отступ между блоками */
    flex-wrap: wrap;
    margin-bottom: 25px;
}

/* Единый стиль для плашек (и Мэр, и Координаты) */
.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;

    background: var(--input-bg);
    /* Темный фон (как у полей ввода) */
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    /* Чуть больше воздуха внутри */
    border-radius: 8px;

    font-size: 0.95rem;
    color: var(--text-main);
}

.meta-label {
    color: var(--text-muted);
    font-weight: 600;
}

.meta-head {
    border-radius: 4px;
    width: 20px;
    height: 20px;
}

.meta-value {
    color: var(--text-main);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

/* Разделитель внутри координат (палочка) */
.meta-divider {
    color: var(--border-color);
    font-weight: 400;
    margin: 0 2px;
}

/* --- СТИЛЬ ДЛЯ СВОЕГО ГОРОДА --- */
.my-town-card {
    border: 2px solid #f59e0b !important;
    /* Золотая рамка */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
    /* Легкое свечение */
    background: linear-gradient(145deg, var(--card-bg), rgba(245, 158, 11, 0.05));
    position: relative;
}

.my-town-badge {
    display: inline-block;
    background: #f59e0b;
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* --- СТИЛЬ ДЛЯ СВОЕГО ГОРОДА (ЗОЛОТОЙ) --- */
.my-town-card {
    border: 1px solid #f59e0b !important;
    /* Золотая рамка */
    background: linear-gradient(145deg, var(--card-bg) 60%, rgba(245, 158, 11, 0.1) 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1);
    position: relative;
}

/* Обёртка для имени и значка, чтобы они стояли ровно */
.name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Отступ между именем и значком */
}

.town-name-min {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1;
    /* Важно для выравнивания */
}

/* Стильный бейдж "ВАШ ГОРОД" */
.my-town-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.4);
    display: inline-block;
    white-space: nowrap;
    /* Чтобы текст не переносился */
}

/* =========================================
   СТИЛЬ ДЛЯ СВОЕГО ГОРОДА (СИНИЙ ФИРМЕННЫЙ)
   ========================================= */

/* Карточка своего города */
.my-town-card {
    /* Синяя рамка */
    border: 1px solid #3b82f6 !important;
    /* Легкий синий градиент в углу */
    background: linear-gradient(145deg, var(--card-bg) 60%, rgba(37, 99, 235, 0.1) 100%);
    /* Синее свечение */
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
    position: relative;
}

/* Обёртка для выравнивания имени и значка */
.name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.town-name-min {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1;
}

/* Синий бейдж "ВАШ ГОРОД" */
.my-town-badge {
    /* Синий градиент */
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Синяя тень */
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.4);
    display: inline-block;
    white-space: nowrap;
}






/* Синяя кнопка перехода к городу */
.btn-home-town {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-home-town:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transform: translateY(-2px);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* =========================================
   КАРТОЧКА "УЖЕ ЕСТЬ ГОРОД" (FIXED)
   ========================================= */

.town-status-card {
    /* Включаем Flex-колонку для идеального центрирования */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрирует элементы по горизонтали */
    text-align: center;

    max-width: 450px;
    /* Чуть уже, чтобы было компактнее */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;

    /* Мягкая тень вокруг */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* УБРАЛИ ПОЛОСКУ СВЕРХУ (::before удален) */

.status-icon-wrapper {
    width: 72px;
    height: 72px;

    /* Flex для иконки внутри квадрата */
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(59, 130, 246, 0.1);
    /* Легкий синий фон */
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;

    font-size: 2.5rem;
    /* Размер эмодзи */
    line-height: 1;
    /* Убираем лишние отступы шрифта */
    margin-bottom: 20px;

    /* Гарантируем отсутствие отступов */
    padding: 0;
}

.page-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.status-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    max-width: 90%;
    /* Чтобы текст не разъезжался слишком широко */
}

.status-divider {
    height: 1px;
    background: var(--border-color);
    margin: 25px 0;
    width: 100%;
}

/* Кнопка (НЕ в hero секции) */
.btn-primary-glow:not(.hero-btn) {
    width: 100%;
    /* Растягиваем на всю ширину карточки */
    box-sizing: border-box;

    background: #2563eb;
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary-glow:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    /* Синее свечение только при наведении */
}

/* =========================================
   ФИКС САЙДБАРА (Шрифты и Инпут)
   ========================================= */

/* 1. Принудительно ставим шрифт Inter на всё в сайдбаре */
.sidebar-card,
.sidebar-card h3,
.sidebar-card input,
.sidebar-card button,
.member-name {
    font-family: 'Inter', sans-serif !important;
}

/* 2. Делаем заголовки ("Управление", "Жители") жирнее и красивее */
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    /* Жирный шрифт как везде */
    letter-spacing: -0.02em;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* 3. Поле ввода (Никнейм) - делаем в стиле сайта */
.invite-form-row input {
    background: var(--input-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px;
    /* Скругление */
    padding: 10px 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

/* 4. УБИРАЕМ БЕЛУЮ ОБВОДКУ при нажатии */
.invite-form-row input:focus {
    outline: none !important;
    /* Убираем стандартную рамку браузера */
    border-color: #3b82f6 !important;
    /* Наша синяя рамка */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
    /* Мягкое синее свечение */
}

/* Кнопка "Пригласить" - выравнивание */
.invite-form-row button {
    font-weight: 700;
    padding: 0 16px;
    border-radius: 10px;
    height: 42px;
    /* Фиксируем высоту, чтобы была ровно как инпут */
    margin-top: 0;
    /* Убираем лишние отступы если есть */
}

/* --- ЛОГИКА "ПОКАЗАТЬ БОЛЬШЕ" --- */

/* Скрываем жителей, у которых есть этот класс */
.hidden-member {
    display: none !important;
}

.show-more-container {
    margin-top: 10px;
    text-align: center;
    border-top: 1px dashed var(--border-color);
    /* Пунктирная линия сверху */
    padding-top: 8px;
}

.btn-show-more {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-show-more:hover {
    color: #3b82f6;
    /* Синий при наведении */
    text-decoration: underline;
}

/* =========================================
   ФИНАЛЬНЫЙ ФИКС (ПОД ТВОЙ HTML)
   ========================================= */

/* 1. Исправляем контейнер, который разбрасывал элементы */
.sidebar-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* Прижимаем цифру влево к тексту! */
    gap: 12px !important;
    /* Отступ между "Жители" и цифрой */
    margin-bottom: 15px !important;
}

/* 2. Убираем лишние отступы у заголовка */
.sidebar-header-row h3.sidebar-title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    /* Заголовку нельзя занимать всю ширину */
}

/* 3. Бейдж-пилюля (Правильный стиль) */
.count-badge-small {
    /* Сбрасываем старые стили */
    float: none !important;
    margin: 0 !important;

    /* Цвета */
    background: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;

    /* Шрифт */
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    /* ПИЛЮЛЯ (Адаптивные размеры) */
    height: 22px !important;
    min-width: 22px !important;
    width: auto !important;
    /* Растягивается под большие числа */
    padding: 0 8px !important;
    /* Отступы внутри */
    border-radius: 99px !important;
    /* Овал */

    /* Центровка */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- КНОПКА ВЫХОДА ИЗ ГОРОДА --- */
.leave-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-leave-town {
    display: block;
    width: 100%;
    padding: 12px 0;

    background: rgba(239, 68, 68, 0.1);
    /* Прозрачный красный */
    color: #ef4444;
    /* Красный текст */
    border: 1px solid #ef4444;

    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-leave-town:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* --- КНОПКИ В УВЕДОМЛЕНИЯХ --- */
.notif-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-tiny {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    text-align: center;
    flex: 1;
    /* Кнопки растянутся поровну */
}

/* Зеленая кнопка */
.btn-tiny.btn-accept {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-tiny.btn-accept:hover {
    background: #10b981;
    color: white;
}

/* Красная кнопка */
.btn-tiny.btn-decline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-tiny.btn-decline:hover {
    background: #ef4444;
    color: white;
}

.notif-text-link {
    display: block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notif-text-link:hover {
    color: #3b82f6;
    /* Синий при наведении */
}

/* --- СООБЩЕНИЯ-БАННЕРЫ (КАК РАНЬШЕ) --- */
.flash-banners-container {
    width: 100%;
    z-index: 900;
    position: relative;
    margin-top: 85px;
    /* Отступ от верха, чтобы не залезло под хедер */
}

.flash-banner {
    width: 100%;
    padding: 15px 0;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    /* Текст по центру */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease-out;
}

/* Желтый (Предупреждение) - Как на скрине */
.flash-banner.warning {
    background: #f59e0b;
    /* Насыщенный оранжево-желтый */
    color: #fff;
    /* Белый текст */
}

/* Зеленый (Успех) */
.flash-banner.success {
    background: #10b981;
    color: #fff;
}

/* Инфо (Серый) */
.flash-banner.info {
    background: #3f3f46;
    color: #fff;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   СТИЛЬНЫЕ УВЕДОМЛЕНИЯ (ADAPTIVE THEME)
   ========================================= */

/* Контейнер (фиксированный над контентом) */
.flash-fixed-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 600px;
    z-index: 2000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Само сообщение */
.flash-message-styled {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Центруем текст */
    gap: 0px;

    padding: 14px 24px;
    border-radius: 12px;

    /* --- АДАПТИВНЫЕ ЦВЕТА (КАК В МЕНЮ) --- */
    background: var(--card-bg);
    /* Белый в светлой, Темный в темной */
    border: 1px solid var(--border-color);
    color: var(--text-main);
    /* Черный в светлой, Белый в темной */

    /* Тень и размытие */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    /* Эффект стекла */

    font-weight: 500;
    font-size: 0.95rem;

    /* Анимация появления */
    animation: slideInDownBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.flash-text {
    line-height: 1.4;
    text-align: center;
}

/* --- ЦВЕТА ПОДСВЕТКИ (Только рамка и тень) --- */

/* Успех (Зеленый) */
/* Предупреждение (РАНЬШЕ БЫЛО ОРАНЖЕВЫМ -> ТЕПЕРЬ СИНЕЕ) */

/* --- АНИМАЦИИ --- */

@keyframes slideInDownBounce {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.flash-message-styled.animating-out {
    animation: slideUpFadeOut 0.5s forwards cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes slideUpFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

/* Желтый фон для иконки ожидания */
.status-icon-wrapper.pending {
    background: rgba(245, 158, 11, 0.1);
    /* Желтый фон */
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    /* Желтая иконка */
}

/* Маленькая инфо-плашка */
.status-info-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-textarea-compact {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;

    /* ГЛАВНОЕ: Запрет на растягивание */
    resize: none;

    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
}

.form-textarea-compact:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Также применим это ко всем textarea на сайте (например, в регистрации) */
textarea {
    resize: none !important;
}

.btn-kick:hover {
    color: #ef4444 !important;
    /* Краснеет при наведении */
    transform: scale(1.2);
    transition: 0.2s;
}

/* --- СТИЛИ ДЛЯ ЮРИДИЧЕСКИХ СТРАНИЦ --- */
.legal-container {
    padding-top: 100px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.legal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.legal-update-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.legal-content h2 {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 35px 0 15px 0;
}

/* Синяя полоска слева у каждого раздела */
.legal-content h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #3b82f6;
    border-radius: 2px;
}

.legal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.legal-content ul {
    list-style: none;
    padding-left: 15px;
    margin-bottom: 20px;
}

.legal-content li {
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.legal-content li::before {
    content: "•";
    color: #3b82f6;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ ЮРИДИЧЕСКИХ СТРАНИЦ --- */
@media (max-width: 768px) {
    .legal-container {
        padding-top: 100px;
        padding-bottom: 30px;
    }

    .legal-container .page-title {
        font-size: 1.4rem !important;
        margin-bottom: 15px !important;
    }

    .legal-card {
        padding: 20px 16px;
        border-radius: 14px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }

    .legal-update-date {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .legal-content h2 {
        font-size: 1.05rem;
        gap: 10px;
        margin: 25px 0 10px 0;
    }

    .legal-content h2::before {
        width: 3px;
        height: 18px;
        flex-shrink: 0;
    }

    .legal-content p {
        font-size: 0.88rem;
        line-height: 1.55;
        margin-bottom: 12px;
    }

    .legal-content ul {
        padding-left: 10px;
        margin-bottom: 15px;
    }

    .legal-content li {
        font-size: 0.88rem;
        padding-left: 16px;
        margin-bottom: 6px;
    }
}

/* =========================================
   СТРАНИЦА МАГАЗИНА (OFFER)
   ========================================= */

.offer-section {
    /* 120px сверху, чтобы отступить от меню */
    padding: 120px 0 40px 0;
    text-align: center;
    min-height: 80vh;
    /* Чтобы футер не прилипал, если экран большой */
}

.subtitle {
    color: var(--text-muted, #a1a1aa);
    /* Используем переменную или серый цвет */
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.pricing-card {
    background: var(--card-bg, #18181b);
    /* Темный фон карточки */
    border: 1px solid var(--border-color, #27272a);
    border-radius: 16px;
    padding: 30px;
    width: 300px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Карточка "Хит продаж" */
.pricing-card.featured {
    border: 2px solid #2563eb;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.badge-best {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main, #fff);
}

.price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main, #fff);
    margin-bottom: 20px;
}

.features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
    flex-grow: 1;
}

.features li {
    margin-bottom: 12px;
    color: var(--text-muted, #d4d4d8);
    display: flex;
    gap: 10px;
    font-size: 0.95rem;
}

/* Кнопки */
.btn-buy {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #3f3f46);
    background: transparent;
    color: var(--text-main, #fff);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.2s;
}

.btn-buy:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* =========================================
   МОДАЛЬНОЕ ОКНО ОПЛАТЫ
   ========================================= */

.modal-overlay {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #18181b;
    padding: 30px;
    border-radius: 20px;
    width: 380px;
    text-align: center;
    border: 1px solid #3f3f46;
    color: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 10px;
}

.modal-content p {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.fake-card-form {
    margin: 20px 0;
    background: #27272a;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid #3f3f46;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    color: #a1a1aa;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: bold;
}

.fake-input {
    background: #18181b;
    padding: 10px;
    border-radius: 6px;
    color: #e4e4e7;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border: 1px solid #3f3f46;
}

.row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn-pay {
    width: 100%;
    padding: 14px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-pay:hover {
    background: #16a34a;
    transform: scale(1.02);
}

.btn-pay:disabled {
    background: #3f3f46;
    cursor: not-allowed;
    transform: none;
}

.btn-close-text {
    background: none;
    border: none;
    color: #71717a;
    margin-top: 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-close-text:hover {
    color: white;
}

/* --- СТИЛИ ОКНА ПОДТВЕРЖДЕНИЯ (НОВЫЕ) --- */

.confirm-box {
    margin: 20px 0;
    text-align: left;
}

.confirm-text {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.nick-display {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    font-family: monospace;
    margin-bottom: 20px;
}

.mini-head {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.warning-block {
    background: rgba(234, 179, 8, 0.1);
    /* Желтый полупрозрачный */
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.2rem;
}

.warning-block p {
    color: #fef08a;
    /* Светло-желтый текст */
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

/* =========================================
   FOOTER: ULTRA MINIMAL (C ПОДДЕРЖКОЙ СВЕТЛОЙ ТЕМЫ)
   ========================================= */

.minimal-footer {
    background: var(--card-bg);
    /* Цвет как у хедера и карточек */
    border-top: 1px solid var(--border-highlight);
    /* Яркая и четкая граница, как в хедере */
    padding: 25px 0;
    margin-top: auto;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: background 0.3s, border-color 0.3s;
    /* Плавная смена темы */
}

.mf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* ССЫЛКИ (Темная тема) */
.mf-nav {
    display: flex;
    gap: 30px;
}

.mf-nav a {
    color: #71717a;
    /* Спокойный серый */
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.mf-nav a:hover {
    color: #fff;
    /* Белый при наведении */
}

/* ПРАВАЯ ЧАСТЬ (Темная тема) */
.mf-right {
    color: #3f3f46;
    /* Темно-серый */
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- СТИЛИ ДЛЯ СВЕТЛОЙ ТЕМЫ (LIGHT MODE) --- */

body.light-theme .minimal-footer {
    background: #ffffff;
    /* Белый фон */
    border-top: 1px solid #e4e4e7;
    /* Светло-серая линия */
}

body.light-theme .mf-nav a {
    color: #71717a;
    /* Серый текст */
}

body.light-theme .mf-nav a:hover {
    color: #18181b;
    /* Черный при наведении (вместо белого) */
}

body.light-theme .mf-right {
    color: #a1a1aa;
    /* Светло-серый копирайт */
}

/* АДАПТИВ (Для мобилок) */
@media (max-width: 768px) {
    .mf-container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }

    .mf-nav {
        flex-direction: column;
        gap: 15px;
    }
}

/* =========================================
   СТРАНИЦА ОПЛАТЫ (OFFER / SHOP) - ОБНОВЛЕНО
   ========================================= */

.shop-wrapper {
    min-height: 85vh;
    display: flex;
    justify-content: center;
    /* align-items: center;  <-- БЫЛО (Центрирование) */
    align-items: flex-start;
    /* <-- СТАЛО (Прижимаем к верху) */
    /* padding: 40px 20px;   <-- БЫЛО */
    padding: 100px 20px 60px;
    /* <-- СТАЛО (Большой отступ сверху - 100px) */
}

.shop-card {
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.shop-step-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
}

/* ВЫБОР ТАРИФА (КНОПКИ) */
.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.plan-item {
    background: #18181b;
    border: 1px solid #27272a;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

/* АКТИВНЫЙ ТАРИФ - СИНИЙ */
.plan-item.active {
    background: #2563eb;
    border-color: #2563eb;
}

.plan-name {
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.plan-desc {
    color: #a1a1aa;
    font-size: 0.85rem;
}

.plan-item.active .plan-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* ПОЛЯ ВВОДА */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.opt {
    color: #52525b;
    font-weight: 400;
}

.shop-input {
    width: 100%;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 10px 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.shop-input:focus {
    border-color: #2563eb;
}

/* ЦЕНА */
.price-block {
    margin-bottom: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 5px;
    letter-spacing: -1px;
}

/* МЕТОДЫ ОПЛАТЫ */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.pay-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #18181b;
    border: 1px solid #27272a;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

/* Активный метод */
.pay-method.active {
    border-color: #2563eb;
    background: #1c1c20;
}

.pm-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pm-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbp-icon {
    color: #00d600;
    background: rgba(0, 214, 0, 0.1);
}

.card-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.pm-icon svg {
    width: 24px;
    height: 24px;
}

.pm-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.pm-sub {
    color: #71717a;
    font-size: 0.8rem;
}

/* --- ИСПРАВЛЕНИЕ КРУЖОЧКА (RADIO) --- */
.pm-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #52525b;
    /* position: relative; <-- УБРАЛИ */
    /* ДОБАВИЛИ Flex для идеального центрирования точки */
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-method.active .pm-radio {
    border-color: #2563eb;
}

.pay-method.active .pm-radio::after {
    content: '';
    /* position: absolute; top: 3px; left: 3px; <-- УБРАЛИ */
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
}

/* ----------------------------------- */

/* ПОМОЩЬ */
.help-block {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hb-text {
    color: #a1a1aa;
    font-size: 0.85rem;
    line-height: 1.4;
}

.hb-text strong {
    color: white;
}

.hb-link {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 1.2rem;
}

/* КНОПКА ОПЛАТИТЬ */
.btn-pay {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-pay:hover {
    background: #1d4ed8;
}

/* ШАГИ ВНИЗУ */
.inactive-steps {
    margin-top: 30px;
    border-top: 1px solid #27272a;
    padding-top: 20px;
}

.step-row {
    color: #3f3f46;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* --- ИКОНКИ ОПЛАТЫ --- */

/* Общий контейнер иконки */
.pm-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    /* Сделаем квадрат с округлением, смотрится современнее */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* СБП (Фон и размеры) */
.sbp-icon {
    background: linear-gradient(135deg, rgba(82, 97, 143, 0.2), rgba(0, 0, 0, 0));
    /* Легкий фон */
}

.sbp-icon svg {
    width: 28px;
    height: 28px;
    /* Сам треугольник внутри SVG уже имеет цвета */
}

/* КАРТА (Фон и размеры) */
.card-icon {
    background: rgba(251, 191, 36, 0.1);
    /* Желтый фон */
    color: #fbbf24;
    /* Желтая иконка */
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

/* СБП (Зеленый акцент с QR-кодом) */
.sbp-icon {
    background: rgba(0, 214, 0, 0.1);
    /* Легкий зеленый фон */
    color: #00d600;
    /* Зеленый цвет самой иконки */
}

.sbp-icon svg {
    width: 26px;
    /* Чуть уменьшил, чтобы аккуратно вписался */
    height: 26px;
}

/* =========================================
   АДМИН-ПАНЕЛЬ: ПРОМОКОДЫ (ADMIN PROMOS)
   ========================================= */

.admin-wrapper {
    padding: 40px 0;
    min-height: 80vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* СЕТКА (Grid) */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Левая колонка уже, правая шире */
    gap: 30px;
    align-items: start;
}

/* КАРТОЧКА */
.admin-card {
    background: transparent;
    /* Убрали темный фон */
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-title {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-highlight);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ПОЛЯ ВВОДА (INPUTS) */
.admin-input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: 0.2s;
}

.admin-input:focus {
    border-color: #3b82f6;
    /* Синяя обводка при фокусе */
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
}

/* КНОПКА "СОЗДАТЬ" */
.btn-admin-create {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-admin-create:hover {
    background: #2563eb;
}

/* ТАБЛИЦА (TABLE) */
.promo-table-wrapper {
    overflow-x: auto;
    /* Чтобы на телефонах можно было листать */
}

.promo-table {
    width: 100%;
    border-collapse: collapse;
}

.promo-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-highlight);
    font-weight: 700;
}

.promo-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-highlight);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

.promo-table tr:last-child td {
    border-bottom: none;
}

/* БЭЙДЖ КОДА (Синий фончик) */
.code-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* КНОПКА УДАЛИТЬ (Мусорка) */
.btn-icon-delete {
    text-decoration: none;
    background: transparent;
    padding: 8px 10px;
    border-radius: 6px;
    transition: 0.2s;
    border: 1px solid var(--border-highlight);
    display: inline-block;
    font-size: 1rem;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* ПУСТОЕ СОСТОЯНИЕ */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #52525b;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* АДАПТИВ */
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   СВЕТЛАЯ ТЕМА (LIGHT THEME SUPPORT)
   ========================================= */

body.light-theme .admin-card {
    background: #ffffff;
    border-color: #e4e4e7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .card-title {
    color: #18181b;
    border-bottom-color: #e4e4e7;
}

body.light-theme .admin-input {
    background: #f4f4f5;
    border-color: #e4e4e7;
    color: #18181b;
}

body.light-theme .admin-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
}

body.light-theme .form-group label {
    color: #52525b;
}

body.light-theme .promo-table th {
    color: #71717a;
    border-bottom-color: #e4e4e7;
}

body.light-theme .promo-table td {
    color: #3f3f46;
    border-bottom-color: #f4f4f5;
}

body.light-theme .btn-icon-delete {
    background: #f4f4f5;
    border-color: #e4e4e7;
}

/* --- СТИЛИ ДЛЯ ПРОМОКОДА И ЦЕНЫ --- */

/* Контейнер для сообщения */
#promoMessage {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 20px;
    transition: all 0.3s ease;
}

/* Успешный промокод (Зеленая плашка) */
.promo-badge-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 222, 128, 0.15);
    /* Полупрозрачный зеленый */
    color: #4ade80;
    /* Ярко-зеленый текст */
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* Ошибка промокода (Красная плашка) */
.promo-badge-error {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(248, 113, 113, 0.15);
    /* Полупрозрачный красный */
    color: #f87171;
    /* Ярко-красный текст */
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Блок цены */
.price-value {
    display: flex;
    align-items: baseline;
    /* Выравнивание по нижней линии текста */
    gap: 12px;
    /* Расстояние между старой и новой ценой */
    margin-top: 5px;
}

/* Старая цена */
#oldPriceDisplay {
    font-size: 1.3rem;
    color: #71717a;
    /* Серый цвет */
    text-decoration: line-through;
    /* Зачеркивание */
    font-weight: 500;
}

/* Новая цена */
#priceDisplay {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    transition: color 0.3s;
}

/* Класс для зеленой цены */
.price-accent {
    color: #4ade80 !important;
}

/* =========================================
   ВСПЛЫВАЮЩЕЕ УВЕДОМЛЕНИЕ (TOAST)
   ========================================= */

#toastNotification {
    position: fixed;
    top: -100px;
    /* Спрятано за верхней границей */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    /* Поверх всего */

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 20px;
    border-radius: 50px;
    /* Овальная форма (Pill shape) */
    background: #18181b;
    border: 1px solid #27272a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    font-weight: 600;
    font-size: 0.95rem;
    color: white;

    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Плавная пружинистая анимация */
}

/* Состояние: ВИДИМОЕ (выезжает вниз) */
.toast-visible {
    top: 30px !important;
}

/* Состояние: СКРЫТОЕ */
.toast-hidden {
    top: -100px !important;
}

/* Цвета для УСПЕХА */
.toast-success {
    border-color: rgba(74, 222, 128, 0.3);
    background: linear-gradient(to right, #141417, #0f2e1b);
    /* Легкий зеленый оттенок */
}

.toast-success #toastIcon {
    font-size: 1.1rem;
}

/* Цвета для ОШИБКИ */
.toast-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(to right, #141417, #2e0f0f);
    /* Легкий красный оттенок */
}

.toast-error #toastIcon {
    font-size: 1rem;
}

/* Текст внутри */
#toastText {
    white-space: nowrap;
    /* Чтобы текст не переносился */
}

/* =========================================
   КНОПКИ МЕНЮ АДМИНКИ (FIX)
   ========================================= */

/* Сетка 2 на 2 */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Две равные колонки */
    gap: 20px;
    margin-bottom: 40px;
}

/* Сама кнопка-карточка */
.admin-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #18181b;
    /* Темный фон */
    border: 1px solid #27272a;
    /* Серая рамка */
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 100%;
    /* Растягиваем на всю высоту ячейки */
    box-sizing: border-box;
}

/* Эффект при наведении (Синяя рамка как в магазине) */
.admin-card-btn:hover {
    background: #1c1c20;
    border-color: #3b82f6;
    /* Синий цвет */
    transform: translateY(-2px);
    /* Легкое всплытие */
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

/* Левая часть (Иконка + Текст) */
.card-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Текстовый блок */
.card-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
}

.card-text p {
    margin: 0;
    color: #a1a1aa;
    font-size: 0.85rem;
}

/* Иконки (Квадратики) */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    /* Чтобы иконка не сжималась */
}

/* Цвета иконок */
.icon-users {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Фиолетовый */
.icon-stats {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Зеленый */

/* Стрелочка справа */
.arrow-icon {
    color: #52525b;
    font-size: 1.5rem;
    font-weight: 300;
    transition: 0.2s;
}

.admin-card-btn:hover .arrow-icon {
    color: white;
    transform: translateX(3px);
    /* Сдвиг стрелки при наведении */
}

/* Адаптив для телефонов (в 1 колонку) */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ФИКС ШАПКИ (Делаем её тоньше)
   ========================================= */

/* 1. Фиксируем высоту самой шапки */
header,
.navbar {
    height: 60px;
    /* Фиксированная высота (стандарт - 60px) */
    padding: 0 40px;
    /* Отступы по бокам */
    display: flex;
    align-items: center;
    /* Центрируем всё по вертикали */
    justify-content: space-between;
}


/* 3. Центрируем меню */
.nav-links {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 100%;
    /* Ссылка на всю высоту шапки */
    padding: 0 15px;
}

/* =========================================
   ФИКС ШАПКИ (Делаем её тоньше)
   ========================================= */

/* 1. Фиксируем высоту самой шапки */
header,
.navbar {
    height: 60px;
    /* Фиксированная высота (стандарт - 60px) */
    padding: 0 40px;
    /* Отступы по бокам */
    display: flex;
    align-items: center;
    /* Центрируем всё по вертикали */
    justify-content: space-between;
}


/* 3. Центрируем меню */
.nav-links {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 100%;
    /* Ссылка на всю высоту шапки */
    padding: 0 15px;
}

/* =========================================
   BENTO GRID (ADAPTIVE - FINAL)
   ========================================= */

/* 1. СЕКЦИЯ */
.benefits-section {
    position: relative;
    /* Фон берется из глобальной переменной (черный или светло-серый) */
    padding: 60px 0 150px 0;
    /* Большой отступ снизу для кнопки */
    margin: 0;
    transition: background-color 0.3s ease;
}


.relative-z {
    position: relative;
    z-index: 2;
}

/* 3. ЗАГОЛОВОК */
.benefits-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
    z-index: 3;
}

.gradient-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;

    /* ИСПОЛЬЗУЕМ ТВОИ ПЕРЕМЕННЫЕ ДЛЯ ГРАДИЕНТА */
    background: linear-gradient(to right, var(--title-gradient-start), var(--title-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    /* Твой серый цвет */
    line-height: 1.6;
}

/* 4. СЕТКА */
.bento-grid-fixed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 0;
}

/* 5. КАРТОЧКА (АДАПТИВНАЯ) */
.bento-card {
    /* Фон карточки меняется (Темный или Белый) */
    background: var(--card-bg);

    /* Рамка меняется (Темно-серая или Светло-серая) */
    border: 1px solid var(--border-color);

    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* ТИПЫ КАРТОЧЕК */
.card-small {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-wide {
    grid-column: span 2;
    display: flex;
    align-items: center;
}

.card-content-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* 6. ТЕКСТ ВНУТРИ */
.bento-card h3 {
    color: var(--text-main);
    /* Белый или Черный */
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    position: relative;
    z-index: 2;
}

.bento-card p {
    color: var(--text-muted);
    /* Серый в обоих темах */
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* 7. ИКОНКИ */
.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.card-content-row .icon-box {
    margin-bottom: 0;
}

/* 8. СВЕТ И ХОВЕР */
.hover-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    background: radial-gradient(circle at top right, var(--glow-color), transparent 60%);
}

.bento-card:hover .hover-light {
    opacity: 0.15;
}

.bento-card:hover {
    transform: translateY(-5px);
    /* При наведении рамка становится цветом текста (контрастно в любой теме) */
    border-color: var(--text-muted);
}

/* Цвета свечения */
.blue-light {
    --glow-color: #3b82f6;
}

.red-light {
    --glow-color: #ef4444;
}

.orange-light {
    --glow-color: #f97316;
}

.green-light {
    --glow-color: #10b981;
}

.purple-light {
    --glow-color: #a855f7;
}

.cyan-light {
    --glow-color: #06b6d4;
}

/* 9. КНОПКА */
.center-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-cta-glow {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    /* Текст на синей кнопке ВСЕГДА белый */
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 45px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cta-glow:hover {
    background: #1d4ed8;
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.6);
}

/* АДАПТИВ */
@media (max-width: 900px) {
    .bento-grid-fixed {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-content-row {
        flex-direction: column;
    }

    .icon-box {
        margin-bottom: 15px !important;
    }

    /* Уменьшаем шрифт заголовка на мобилке */
    .gradient-title {
        font-size: 2.2rem;
    }
}

/* =========================================
   КНОПКИ HERO (ФИКСИРОВАННЫЕ И ОДИНАКОВЫЕ)
   ========================================= */

.hero-buttons {
    display: flex;
    justify-content: center;
    /* Строго по центру */
    align-items: center;
    gap: 15px;
    /* Аккуратный отступ между ними */
    margin-top: 30px;
    margin-bottom: 40px;
}

/* Общий стиль кнопок */
.hero-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    /* Фиксированный размер */
    width: 200px;
    height: 52px;

    padding: 0;
    font-size: 1rem;
    font-weight: 600;

    border-radius: 12px;
    box-sizing: border-box;

    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* 1. Синяя кнопка */
.btn-primary-glow {
    background: #2563eb;
    color: white !important;
    border: 2px solid rgba(37, 99, 235, 0.6);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary-glow:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* 2. Прозрачная кнопка */
.btn-outline {
    background: transparent;
    color: var(--text-main);
    /* Адаптивный цвет текста */
    border: 2px solid var(--border-color);
    /* Рамка */
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

/* АДАПТИВ КНОПОК HERO (Мобилка) */
@media (max-width: 768px) {
    .hero-buttons {
        display: flex;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .hero-btn {
        flex: 1 !important;
        width: auto !important;
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        padding: 0 !important;
        font-size: 0.95rem !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        border-width: 2px !important;
        border-style: solid !important;
    }
}

/* =========================================
   РАЗДЕЛИТЕЛЬ СЕКЦИЙ
   ========================================= */
.section-divider {
    width: 100%;
    max-width: 1200px;
    height: 1px;
    margin: 80px auto;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    box-shadow: none;
    /* Убрано синее свечение для строгого вида */
}

body.light-theme .section-divider {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);
    box-shadow: none;
}

/* =========================================
   FAQ SECTION (ACCORDION)
   ========================================= */

.faq-container {
    max-width: 8000px;
    /* Ограничиваем ширину, чтобы читать было удобно */
    margin: 0 auto;
    /* Убрали отступ сверху от сетки */
    width: 100%;
}

.faq-header {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;

    /* Градиентный текст (берем переменные из темы) */
    background: linear-gradient(to right, var(--title-gradient-start), var(--title-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Расстояние между вопросами */
}

/* СТИЛЬ ОДНОГО ВОПРОСА */
.faq-item {
    background: var(--card-bg);
    /* Цвет фона (Адаптивный) */
    border: 1px solid var(--border-color);
    /* Рамка (Адаптивная) */
    border-radius: 10px;
    /* Скругление как у кнопок */
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--text-muted);
    /* Подсветка рамки при наведении */
    transform: translateY(-2px);
}

/* ЗАГОЛОВОК ВОПРОСА (SUMMARY) */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    /* Убираем стандартный треугольник */
}

/* Убираем треугольник в Safari/Chrome */
.faq-question::-webkit-details-marker {
    display: none;
}

/* ИКОНКА ПЛЮСА */
.faq-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

/* АНИМАЦИЯ ОТКРЫТИЯ */
details[open] .faq-icon {
    transform: rotate(45deg);
    /* Плюс превращается в крестик */
    color: #ef4444;
    /* Становится красным (или любым другим) */
}

details[open] {
    border-color: var(--text-muted);
    /* Активная рамка */
}

/* ОТВЕТ */
.faq-answer {
    padding: 0 25px 25px 25px;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-in-out;
}

.faq-answer p {
    margin: 0;
}

/* Анимация появления текста */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* АДАПТИВ */
@media (max-width: 600px) {
    .faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .faq-header {
        font-size: 1.5rem;
    }
}

/* =========================================
   PRICING (2 CARDS FIXED)
   ========================================= */

.pricing-section {
    padding: 0 0 100px 0;
    position: relative;
}

.pricing-header-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

/* СЕТКА НА 2 КОЛОНКИ */
.pricing-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Ровно 2 колонки */
    gap: 30px;
    max-width: 800px;
    /* Ограничиваем ширину, чтобы они были по центру */
    margin: 0 auto;
    align-items: stretch;
    /* Одинаковая высота карточек */
}

/* КАРТОЧКА */
.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 35px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-muted);
}

/* ВЫДЕЛЕННАЯ КАРТОЧКА */
.popular-card {
    border-color: #2563eb;
    background: var(--card-bg);
    z-index: 2;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.1);
}

.pricing-glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ТЕКСТЫ */
.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    margin: 0 0 5px 0;
}

.card-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ЦЕНА */
.pricing-price {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text-main);
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    /* Линия под ценой */
}

.pricing-price .currency {
    font-size: 1.2rem;
    margin-top: 8px;
    opacity: 0.7;
    margin-right: 4px;
}

.pricing-price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

/* СПИСОК */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.check-icon svg {
    width: 14px;
    height: 14px;
    color: #22c55e;
}

/* НИЗ КАРТОЧКИ (Чтобы кнопки были в самом низу) */
.card-footer {
    margin-top: auto;
}

/* КНОПКИ (ИСПРАВЛЕННЫЕ) */
.btn-buy-solid,
.btn-buy-outline {
    display: flex;
    /* Флекс */
    justify-content: center;
    /* Центр по горизонтали */
    align-items: center;
    /* Центр по вертикали */
    width: 100%;
    /* На всю ширину карточки */
    height: 50px;
    /* Фиксированная высота */
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: 0.2s;
    cursor: pointer;
    box-sizing: border-box;
    /* Чтобы padding не ломал ширину */
}

/* Стиль Solid (Синяя) */
.btn-buy-solid {
    background: #2563eb;
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-buy-solid:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Стиль Outline (Контурная) */
.btn-buy-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main) !important;
}

.btn-buy-outline:hover {
    border-color: var(--text-muted);
    background: var(--hover-bg, rgba(255, 255, 255, 0.05));
    transform: translateY(-2px);
}

/* АДАПТИВ */
@media (max-width: 768px) {
    .pricing-grid-2 {
        grid-template-columns: 1fr;
        /* Одна колонка на телефоне */
        max-width: 100%;
    }

    .pricing-card {
        padding: 25px;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .pricing-price .amount {
        font-size: 2.8rem;
    }

    .popular-card {
        order: -1;
        /* Важная карточка первая */
    }
}

/* =========================================
   СТРАНИЦА ОПЛАТЫ (SHOP) - АДАПТИВНАЯ
   ========================================= */

.shop-wrapper {
    min-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Прижимаем к верху */
    padding: 120px 20px 60px;
    /* Отступ сверху */
}

.shop-card {
    background: var(--card-bg);
    /* Адаптивный фон */
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.shop-step-title {
    color: var(--text-main);
    /* Адаптивный текст */
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

/* ВЫБОР ТАРИФА (КНОПКИ) */
.plans-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.plan-item {
    background: transparent;
    border: 1px solid var(--border-highlight);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.plan-item:hover {
    border-color: var(--text-muted);
}

/* АКТИВНЫЙ ТАРИФ - СИНИЙ */
.plan-item.active {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.plan-name {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.plan-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* В активном состоянии текст всегда белый */
.plan-item.active .plan-name,
.plan-item.active .plan-desc {
    color: white !important;
}

/* ПОЛЯ ВВОДА */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.opt {
    color: var(--text-muted);
    font-weight: 400;
}

.shop-input {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    padding: 12px 15px;
    color: var(--text-main);
    /* Цвет текста ввода */
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: 0.2s;
}

.shop-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ЦЕНА */
.price-block {
    margin-bottom: 25px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-highlight);
}

.price-value {
    display: block;
    color: var(--text-main);
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 5px;
    letter-spacing: -1px;
}

/* МЕТОДЫ ОПЛАТЫ */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.pay-method {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: 1px solid var(--border-highlight);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

/* Активный метод */
.pay-method.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
    /* Легкий синий фон */
}

.pm-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ИКОНКИ ОПЛАТЫ */
.pm-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Цвета иконок оставляем полупрозрачными (они хорошо смотрятся везде) */
.sbp-icon {
    background: rgba(0, 214, 0, 0.1);
    color: #00d600;
}

.card-icon {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.pm-icon svg {
    width: 24px;
    height: 24px;
}

.pm-title {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.pm-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* КРУЖОЧЕК (RADIO) */
.pm-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.pay-method.active .pm-radio {
    border-color: #2563eb;
}

.pay-method.active .pm-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #2563eb;
    border-radius: 50%;
}

/* ПОМОЩЬ */
.help-block {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.hb-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.hb-text strong {
    color: var(--text-main);
}

.hb-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.hb-link:hover {
    color: var(--text-main);
}

/* КНОПКА ОПЛАТИТЬ */
.btn-pay {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-pay:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* ШАГИ ВНИЗУ */
.inactive-steps {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.step-row {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* =========================================
   АДМИН-ПАНЕЛЬ: ПРОМОКОДЫ (АДАПТИВНАЯ)
   ========================================= */

.admin-wrapper {
    padding: 120px 0 60px 0;
    /* Отступ сверху */
    min-height: 80vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* СЕТКА (Grid) */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

/* КАРТОЧКА */
.admin-card {
    background: var(--card-bg);
    /* Адаптивный фон */
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ПОЛЯ ВВОДА (INPUTS) */
.admin-input {
    width: 100%;
    background: var(--bg-color);
    /* Фон полей */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: 0.2s;
}

.admin-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
}

/* КНОПКА "СОЗДАТЬ" */
.btn-admin-create {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-admin-create:hover {
    background: #2563eb;
}

/* ТАБЛИЦА (TABLE) */
.promo-table-wrapper {
    overflow-x: auto;
}

.promo-table {
    width: 100%;
    border-collapse: collapse;
}

.promo-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.promo-table td {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

.promo-table tr:last-child td {
    border-bottom: none;
}

/* БЭЙДЖ КОДА */
.code-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 5px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* КНОПКА УДАЛИТЬ (Мусорка) */
.btn-icon-delete {
    text-decoration: none;
    background: var(--bg-color);
    /* Кнопка берет цвет фона */
    color: var(--text-muted);
    padding: 8px 10px;
    border-radius: 6px;
    transition: 0.2s;
    border: 1px solid var(--border-color);
    display: inline-block;
    font-size: 1rem;
}

.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

/* ПУСТОЕ СОСТОЯНИЕ */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* АДАПТИВ */
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Сетка 2 на 2 */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Две равные колонки */
    gap: 20px;
    margin-bottom: 40px;
}

/* Сама кнопка-карточка */
.admin-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* ИЗМЕНЕНИЯ ТУТ: Используем переменные */
    background: var(--card-bg);
    /* Адаптивный фон */
    border: 1px solid var(--border-color);
    /* Адаптивная рамка */

    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

/* Эффект при наведении */
.admin-card-btn:hover {
    border-color: #3b82f6;
    /* Синяя рамка */

    /* Легкое затемнение/осветление фона при наведении */
    background: var(--bg-color);

    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

/* Левая часть (Иконка + Текст) */
.card-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Текстовый блок */
.card-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;

    /* ИЗМЕНЕНИЯ ТУТ: Адаптивный цвет текста */
    color: var(--text-main);

    font-weight: 700;
}

.card-text p {
    margin: 0;

    /* ИЗМЕНЕНИЯ ТУТ: Адаптивный серый */
    color: var(--text-muted);

    font-size: 0.85rem;
}

/* Иконки (Квадратики) */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;

    /* Добавляем легкую рамку для светлой темы, чтобы не сливалось */
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Цвета иконок (они полупрозрачные, поэтому работают и на светлом, и на темном) */
.icon-users {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.icon-stats {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.icon-requests {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Заявки */
.icon-promos {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

/* Промокоды */

/* Стрелочка справа */
.arrow-icon {
    color: var(--text-muted);
    /* Стрелка серая */
    font-size: 1.5rem;
    font-weight: 300;
    transition: 0.2s;
}

.admin-card-btn:hover .arrow-icon {
    color: #3b82f6;
    /* При наведении синяя */
    transform: translateX(3px);
}

/* Адаптив для телефонов */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   АДМИН МОНИТОРИНГ (FINANCE & STATUS)
   ========================================= */

.monitoring-wrapper {
    padding: 100px 0 60px 0;
    min-height: 80vh;
}

/* Шапка */
.mon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.mon-header h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin: 5px 0 0 0;
}

.btn-refresh {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn-refresh:hover {
    background: var(--bg-color);
    border-color: #3b82f6;
}

/* СЕТКА ВЕРХНИХ КАРТОЧЕК */
.mon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mon-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Иконки */
.mon-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.money-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Зеленый */
.users-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Синий */
.stats-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Оранжевый */
.users-icon svg {
    width: 20px;
    height: 20px;
}

/* Тексты */
.mon-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.mon-value {
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 800;
}

/* Бейдж "За сегодня" */
.mon-badge-profit {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 50px;
}

/* --- СЕКЦИЯ СЕРВЕРА --- */
.server-card {
    display: block;
    /* Сбрасываем flex */
}

.server-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.server-title h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-main);
    display: inline-block;
    margin-right: 10px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    vertical-align: middle;
}

.status-badge.online {
    background: #22c55e;
    color: #052e16;
}

.status-badge.offline {
    background: #ef4444;
    color: #450a0a;
}

.online-counter {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.max-online {
    opacity: 0.5;
}

/* Полоса прогресса */
.online-progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Серый фон */
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.online-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 10px;
    transition: width 1s ease-out;
    min-width: 5px;
    /* Чтобы всегда было видно хотя бы точку, если онлайн > 0 */
}

/* Консоль со списком игроков */
.players-list-console {
    background: #0f172a;
    /* Всегда темный фон, как в консоли */
    border-radius: 10px;
    padding: 15px;
    font-family: monospace;
    color: #cbd5e1;
    border: 1px solid #1e293b;
}

.console-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

.console-content {
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-all;
    /* Чтобы длинные ники не ломали верстку */
}

/* Адаптив */
@media (max-width: 600px) {
    .mon-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mon-badge-profit {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
}

/* ЗАГОЛОВКИ */
.section-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0 15px 0;
    font-weight: 700;
}

/* СЕТКА СРЕДНЕГО ОНЛАЙНА (6 штук) */
.avg-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 колонок */
    gap: 15px;
    margin-bottom: 30px;
}

.avg-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.avg-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.avg-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

/* ГРАФИК */
.chart-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    position: relative;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.2rem;
}

.live-indicator {
    color: #ef4444;
    /* Красная точка LIVE */
    font-weight: 800;
    font-size: 0.8rem;
    animation: blink 2s infinite;
}

.chart-container-box {
    height: 300px;
    /* Высота графика */
    width: 100%;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Адаптив для телефонов */
@media (max-width: 900px) {
    .avg-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        /* На телефоне по 3 в ряд */
    }
}

@media (max-width: 500px) {
    .avg-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        /* На узком телефоне по 2 в ряд */
    }
}

/* =========================================
   НОВЫЙ МОНИТОРИНГ (ANALYTICS STYLE)
   ========================================= */

.monitoring-wrapper {
    padding: 100px 0 60px 0;
    font-family: 'Inter', sans-serif;
}

.mon-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* --- 1. ПАНЕЛЬ АНАЛИТИКИ (ВЕРХ) --- */
.analytics-panel {
    background: var(--card-bg);
    /* АДАПТИВНЫЙ ФОН */
    border: 1px solid var(--border-color);
    /* АДАПТИВНАЯ РАМКА */
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.analytics-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.analytics-header-row h2 {
    margin: 0;
    color: var(--text-main);
    /* АДАПТИВНЫЙ ТЕКСТ */
    font-size: 1.5rem;
}

/* Кнопки выбора периода */
.period-selector {
    background: var(--bg-color);
    /* АДАПТИВНЫЙ ФОН */
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 10px;
    display: flex;
    gap: 5px;
}

.p-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    transition: 0.2s;
}

.p-btn:hover {
    color: var(--text-main);
    background: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.p-btn.active {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.analytics-content {
    display: flex;
    gap: 40px;
}

/* Левая часть со статами */
.analytics-stats {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.main-stat {
    margin-bottom: 30px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    color: var(--text-main);
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

/* Бейджи роста */
.stat-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.stat-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Маленькие плашки внизу */
.sub-stats-row {
    display: flex;
    gap: 15px;
}

.sub-stat-box {
    background: var(--bg-color);
    /* АДАПТИВНЫЙ ФОН */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sub-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.sub-val {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
}

/* График */
.analytics-chart-box {
    flex: 1;
    height: 300px;
    position: relative;
}

/* --- 2. СЕТКА ОБОРОТА (НИЗ) --- */
.turnover-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
}

.turnover-header {
    margin-bottom: 25px;
}

.turnover-header h3 {
    margin: 0 0 5px 0;
    color: var(--text-main);
    font-size: 1.2rem;
}

.turnover-header .sub-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Карточка дня */
.day-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.day-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.day-value {
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Активная карточка (СЕГОДНЯ) */
.day-card.active-day {
    background: rgba(139, 92, 246, 0.05);
    border-color: #8b5cf6;
}

.live-badge {
    background: #8b5cf6;
    color: white;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* Полоска прогресса внутри карточки */
.day-progress-bg {
    height: 6px;
    width: 100%;
    background: var(--border-color);
    /* Адаптивная полоска */
    border-radius: 3px;
    overflow: hidden;
}

.day-progress-fill {
    height: 100%;
    background: #71717a;
}

.day-card.active-day .day-progress-fill {
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* АДАПТИВ */
@media (max-width: 900px) {
    .analytics-content {
        flex-direction: column;
        gap: 20px;
    }

    .analytics-stats {
        flex: none;
        width: 100%;
    }

    .analytics-chart-box {
        height: 200px;
    }
}

/* =========================================
   SERVER STATS (FIXED SPACING)
   ========================================= */

/* Сетка карточек с отступом снизу */
.server-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    /* <--- ВОТ ЭТОТ ОТСТУП ВЕРНУЛСЯ */
}

/* КАРТОЧКА */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #60a5fa;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.text-muted-small {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Иконки */
.icon-square {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-square.orange {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.icon-square.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.icon-square.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.icon-square.green {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.icon-square.gray {
    background: rgba(113, 113, 122, 0.15);
    color: #a1a1aa;
}

/* Прогресс бары */
.progress-bar-bg {
    width: 100%;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: auto;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.progress-bar-fill.blue {
    background: #60a5fa;
}

.progress-bar-fill.purple {
    background: #a78bfa;
}

.progress-bar-fill.green {
    background: #4ade80;
}

.progress-bar-fill.gray {
    background: #a1a1aa;
}

.text-green {
    color: #4ade80;
}

.text-orange {
    color: #fbbf24;
}

.text-red {
    color: #ef4444;
}

/* --- ГРАФИК --- */
.analytics-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.analytics-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.analytics-header-row h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.3rem;
}

.stats-pills {
    display: flex;
    gap: 10px;
}

.pill {
    background: var(--bg-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.pill b {
    color: var(--text-main);
    margin-left: 4px;
}

/* --- ИГРОКИ --- */
.turnover-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.players-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.players-header-row h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.3rem;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 84%;
    padding: 10px 10px 10px 35px;
    background: var(--bg-color);
    border: 1px solid var(--border-highlight);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
}

.search-box input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}



.player-card {
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    text-decoration: none;
}

.player-card:hover {
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #000;
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.player-status {
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
    gap: 10px;
    width: 100%;
}

.empty-icon {
    font-size: 2rem;
    opacity: 0.5;
}

/* Утилиты отступов (если вдруг их нет) */
.mb-40 {
    margin-bottom: 40px;
}

/* Пустое состояние (Центрируем в сетке) */
.empty-state {
    /* ЗАСТАВЛЯЕМ БЛОК РАСТЯНУТЬСЯ НА ВСЮ ШИРИНУ СЕТКИ */
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    /* Чуть больше отступ сверху/снизу для воздуха */
    color: var(--text-muted);
    gap: 15px;
    width: 100%;
    text-align: center;
}

.empty-icon {
    font-size: 2.5rem;
    opacity: 0.5;
    margin-bottom: 5px;
}

/* =========================================
   РЕДАКТОР ОПИСАНИЯ ГОРОДА
   ========================================= */

/* Контейнер */
.town-description-card {
    margin-top: 20px;
    /* Если нужно выделить блок фоном, раскомментируй ниже: */
    /* background: var(--bg-color); */
    /* border-radius: 12px; */
    /* padding: 20px; */
}

.desc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    /* Разделитель под заголовком */
    padding-bottom: 10px;
}

.desc-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Кнопка "Изменить" (карандаш) */
.btn-icon-edit {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon-edit:hover {
    background: rgba(139, 92, 246, 0.1);
    /* Легкий фиолетовый фон */
    border-color: #8b5cf6;
    color: #8b5cf6;
    transform: translateY(-1px);
}

/* Текст описания */
.desc-content p {
    white-space: pre-line;
    /* Сохраняет переносы строк */
    color: var(--text-muted);
    /* Чуть сероватый текст, приятный глазу */
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Форма редактирования */
.desc-edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

/* Желтая плашка предупреждения */
.warning-box {
    display: flex;
    gap: 12px;
    background: rgba(245, 158, 11, 0.1);
    /* Полупрозрачный оранжевый */
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px 16px;
    border-radius: 10px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.2rem;
}

.warning-text {
    font-size: 0.85rem;
    color: #fbbf24;
    /* Золотистый текст */
    line-height: 1.4;
}

.warning-text b {
    color: #fff;
    /* Белый цвет для важных слов */
}

/* Поле ввода (Textarea) */
/* Поле ввода (Textarea) */
.styled-textarea {
    width: 100%;
    /* ВАЖНО: Эта строка исправляет проблему с выезжающим полем */
    box-sizing: border-box;

    min-height: 160px;
    background: #0f0f12;
    border: 1px solid var(--border-color);
    color: #e4e4e7;
    padding: 15px;
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: 0.2s;
    outline: none;
}

.styled-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    /* Фиолетовое свечение */
}

/* Кнопки внизу формы */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    /* Кнопки справа */
}

.btn-save {
    background: #8b5cf6;
    /* Фиолетовый */
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-save:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   РЕДАКТОР ОПИСАНИЯ ГОРОДА (СИНИЙ АКЦЕНТ)
   ========================================= */

/* Контейнер */
.town-description-card,
.sidebar-card {
    /* Стили контейнера уже есть, тут доп настройки если надо */
}

.desc-header,
.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.desc-title,
.sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: 0.5px;
}

/* Кнопка "Изменить" (карандаш) */
.btn-icon-edit {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* СИНИЙ HOVER */
.btn-icon-edit:hover {
    background: rgba(59, 130, 246, 0.1);
    /* Легкий синий фон */
    border-color: #3b82f6;
    /* Синяя обводка */
    color: #3b82f6;
    /* Синий текст */
    transform: translateY(-1px);
}

/* Текст описания */
.desc-content p {
    white-space: pre-line;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Форма редактирования */
.desc-edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

/* Желтая плашка предупреждения (остается желтой, это стандарт) */
.warning-box {
    display: flex;
    gap: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px 16px;
    border-radius: 10px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.2rem;
}

.warning-text {
    font-size: 0.85rem;
    color: #fbbf24;
    line-height: 1.4;
}

.warning-text b {
    color: #fff;
}

/* Поле ввода (Textarea/Input) */
.styled-textarea {
    width: 100%;
    box-sizing: border-box;
    /* Исправляет "уезжание" за рамки */
    background: #0f0f12;
    border: 1px solid var(--border-color);
    color: #e4e4e7;
    padding: 15px;
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: 0.2s;
    outline: none;
}

/* СИНИЙ ФОКУС */
.styled-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    /* Синее свечение */
}

/* Кнопки внизу формы */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* КНОПКА СОХРАНИТЬ (СИНЯЯ) */
.btn-save {
    background: #3b82f6;
    /* Яркий синий */
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    /* Синяя тень */
}

.btn-save:hover {
    background: #2563eb;
    /* Темнее при наведении */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   ВЕБ-КОНСОЛЬ (ТЕМНАЯ ТЕМА)
   ========================================= */

.console-window {
    background: #09090b;
    /* Почти черный */
    border: 1px solid #27272a;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    height: 600px;
    /* Высота окна */
    margin-top: 10px;
}

.console-output {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: #e4e4e7;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Красивый скроллбар */
.console-output::-webkit-scrollbar {
    width: 10px;
}

.console-output::-webkit-scrollbar-track {
    background: transparent;
}

.console-output::-webkit-scrollbar-thumb {
    background: var(--hover-bg);
    border-radius: 5px;
    border: 2px solid transparent;
}

.log-line {
    word-break: break-all;
}

.console-input-area {
    background: transparent;
    border-top: 1px solid var(--border-highlight);
    padding: 12px 15px;
    display: flex;
    align-items: center;
}

.prompt-sign {
    color: #3b82f6;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.1rem;
}

.console-input-area input {
    background: transparent;
    border: none;
    color: var(--text-main);
    flex: 1;
    font-family: 'Consolas', monospace;
    font-size: 1rem;
    outline: none;
}

.console-input-area button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.console-input-area button:hover {
    background: #2563eb;
}

/* =========================================
   WIKI STYLE (VitePress Clone)
   ========================================= */

/* Основные цвета (Темная тема) */
:root {
    --vp-bg: #1b1b1f;
    /* Фон вики */
    --vp-sidebar-bg: #1b1b1f;
    /* Фон меню */
    --vp-border: #2e2e32;
    /* Линии */
    --vp-brand: #3b82f6;
    /* Акцентный синий */
    --vp-text-1: #fffff5db;
    /* Яркий текст */
    --vp-text-2: #ebebf599;
    /* Серый текст */
}

/* Светлая тема Вики */
body.light-theme {
    --vp-bg: #f3f4f6;
    --vp-sidebar-bg: #f3f4f6;
    --vp-border: rgba(0, 0, 0, 0.12);
    --vp-text-1: #111827;
    --vp-text-2: #4b5563;
}

/* Сетка страницы */
.vp-wrapper {
    display: flex;
    justify-content: center;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    align-items: flex-start;
    background: var(--vp-bg);
}

/* --- ЛЕВОЕ МЕНЮ --- */
.vp-sidebar {
    width: 270px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 32px 32px 96px;
    border-right: 1px solid var(--vp-border);
    flex-shrink: 0;
    background: var(--vp-sidebar-bg);
}

.vp-group {
    margin-bottom: 24px;
}

.vp-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--vp-text-1);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.vp-link {
    display: block;
    padding: 6px 0;
    color: var(--vp-text-2);
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border-left: 2px solid transparent;
    padding-left: 14px;
    margin-left: -16px;
}

.vp-link:hover {
    color: var(--vp-text-1);
}

.vp-link.active {
    color: var(--vp-brand);
    border-left-color: var(--vp-brand);
    font-weight: 500;
    background: rgba(59, 130, 246, 0.05);
}

/* --- ЦЕНТР (КОНТЕНТ) --- */
.vp-doc {
    flex-grow: 1;
    padding: 32px 32px 96px;
    min-width: 0;
}

.vp-container {
    max-width: 760px;
    /* Оптимальная ширина для чтения */
    margin: 0 auto;
}

.vp-edit-link {
    text-align: right;
    margin-bottom: 20px;
}

.vp-edit-link a {
    font-size: 12px;
    color: var(--vp-text-2);
    text-decoration: none;
}

.vp-edit-link a:hover {
    color: var(--vp-brand);
}

/* --- ТИПОГРАФИКА MARKDOWN --- */
.markdown-body {
    color: var(--vp-text-2);
    line-height: 1.7;
}

.markdown-body h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--vp-text-1);
    line-height: 1.2;
}

.markdown-body h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 48px 0 16px;
    border-top: 1px solid var(--vp-border);
    padding-top: 24px;
    color: var(--vp-text-1);
}

.markdown-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--vp-text-1);
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.markdown-body a {
    color: var(--vp-brand);
    text-decoration: none;
    font-weight: 500;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body code {
    font-family: monospace;
    color: var(--text-main);
    background: var(--border-highlight);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.markdown-body pre {
    background: var(--card-bg);
    border: 1px solid var(--vp-border);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text-main);
}

/* --- КНОПКИ ВНИЗУ (FOOTER NAV) --- */
.vp-footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 64px;
    border-top: 1px solid var(--vp-border);
    padding-top: 24px;
}

.vp-nav-card {
    border: 1px solid var(--vp-border);
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    transition: border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.vp-nav-card:hover {
    border-color: var(--vp-brand);
}

.vp-nav-card.next {
    text-align: right;
    align-items: flex-end;
}

.vp-nav-card .desc {
    font-size: 11px;
    color: var(--vp-text-2);
    margin-bottom: 4px;
}

.vp-nav-card .title {
    font-size: 14px;
    font-weight: 500;
    color: var(--vp-brand);
}

/* --- ПРАВОЕ МЕНЮ (TOC) --- */
.vp-toc {
    width: 220px;
    position: sticky;
    top: 32px;
    height: calc(100vh - 32px);
    overflow-y: auto;
    padding-left: 32px;
    padding-top: 32px;
    flex-shrink: 0;
}

.vp-toc-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--vp-text-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.vp-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--vp-border);
}

.toc-item a {
    display: block;
    color: var(--vp-text-2);
    text-decoration: none;
    font-size: 13px;
    padding: 4px 0 4px 12px;
    transition: 0.2s;
    border-left: 2px solid transparent;
    margin-left: -1px;
}

.toc-item a:hover {
    color: var(--vp-text-1);
    border-left-color: var(--vp-text-1);
}

.toc-item.level-3 a {
    padding-left: 24px;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1280px) {
    .vp-toc {
        display: none;
    }

    /* Скрываем правое меню на планшете */
}

@media (max-width: 960px) {
    .vp-sidebar {
        display: none;
    }

    /* Скрываем левое меню на телефоне */
    .vp-doc {
        padding: 24px;
    }
}

/* Якоря для навигации */
.wiki-anchor {
    display: block;
    position: relative;
    top: -80px;
    /* Смещение, чтобы шапка сайта не закрывала заголовок */
    visibility: hidden;
}

/* ==================================================
   ФИНАЛЬНЫЙ ФИКС ДЛИННОГО ТЕКСТА (ADMIN + TOWNS)
   ================================================== */

/* 1. Глобальное правило: ломать всё, что не влезает */
*,
*::before,
*::after {
    overflow-wrap: anywhere;
    /* Самый современный способ переноса */
}

/* 2. Конкретно для заголовков, описаний и карточек */
.page-title,
.header-text h1,
.town-description,
.town-card-minimal,
.town-request-item,
/* Карточка заявки в админке */
.admin-list-item,
.request-info {
    word-break: break-all !important;
    /* Жестко ломает длинные слова */
    white-space: normal !important;
    /* Разрешает перенос */
    max-width: 100% !important;
    /* Не дает элементу быть шире родителя */
}

/* 3. Для описания города (сохраняем абзацы, но ломаем слова) */
.town-description {
    white-space: pre-wrap !important;
}

/* 4. Спец-фикс для Flex-контейнеров (чтобы текст в админке сжимался) */
.town-request-card .info,
.town-info-col {
    min-width: 0;
    /* Магия CSS: разрешает тексту сжиматься внутри Flexbox */
    flex: 1;
}

/* ИСПРАВЛЕНИЕ: Убираем pre-wrap с родителя */
.town-description {
    white-space: normal !important;
    /* Теперь отступы в коде не будут видны */
}

/* Применяем его ТОЛЬКО к тексту внутри */
.desc-text,
.town-desc-text {
    white-space: pre-wrap !important;
    /* Сохраняет абзацы, которые написал игрок */
    word-break: break-all !important;
    /* Ломает длинные слова */
    overflow-wrap: anywhere !important;
}

/* ==================================================
   ФИКС ПЕРЕНОСОВ (ЧТОБЫ СЛОВА НЕ РВАЛИСЬ)
   ================================================== */

/* 1. Глобальный сброс на "умный" перенос */
*,
p,
h1,
h2,
h3,
h4,
span,
div,
li,
a {
    word-break: normal !important;
    /* Запрещает разрыв слова посередине (Здес-ь) */
    overflow-wrap: anywhere !important;
    /* Разрешает разрыв ТОЛЬКО если слово не влезает целиком (для ссылок) */
    hyphens: auto;
    /* Добавляет дефис при переносе, если браузер умеет */
}

/* 2. Специфичный фикс для карточек на главной (скриншот) */
.feature-card p,
.info-text,
.desc-text {
    word-break: normal !important;
    line-height: 1.6;
    /* Чуть больше воздуха между строками для читаемости */
}

/* 3. Исключение: блоки кода и "сырые" данные можно ломать жестко */
pre,
code,
.raw-data {
    word-break: break-all !important;
}

/* =========================================
   ФИКС КАРТОЧЕК ДОНАТА (MOBILE)
   ========================================= */

/* 1. Контейнер карточек: заставляем переноситься на новую строку */
.pricing-grid,
.donate-grid,
.cards-container {
    display: flex;
    flex-wrap: wrap !important;
    /* Самое важное: разрешает перенос */
    justify-content: center;
    /* Центрирует карточки */
    gap: 20px;
    /* Отступ между ними */
    padding: 10px;
    /* Отступы от краев экрана */
}

/* 2. Сами карточки: ограничиваем ширину */
.pricing-card,
.donate-card,
.offer-card {
    width: 100% !important;
    /* На телефоне занимает всю ширину */
    max-width: 380px !important;
    /* На ПК не становится гигантской */
    min-width: 280px;
    /* Чтобы не сжималась в ниточку */
    margin: 0 auto;
    /* Центрирование */
    box-sizing: border-box;
    /* Чтобы padding не ломал ширину */
}

/* 3. Фикс обрезания снизу (добавляем воздух внизу страницы) */
.pricing-section,
section {
    padding-bottom: 80px;
    /* Чтобы последняя карточка не прилипала к низу */
}

/* =========================================
   ФИНАЛЬНЫЙ ФИКС УВЕДОМЛЕНИЙ (MOBILE)
   ========================================= */

@media (max-width: 768px) {
    .notif-dropdown {
        /* 1. Отвязываем от кнопки и фиксируем на экране */
        position: fixed !important;
        top: 70px !important;
        /* Чуть ниже шапки */

        /* 2. Центрируем по горизонтали */
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;

        /* 3. Размеры */
        width: 90% !important;
        /* Занимает 90% ширины экрана */
        max-width: 360px !important;
        /* Но не шире 360px */
        max-height: 70vh !important;
        /* Чтобы влезало по высоте */

        /* 4. Визуал */
        overflow-y: auto !important;
        /* Скролл, если много уведомлений */
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.7) !important;
        /* Сильная тень, чтобы выделить */
        border: 1px solid var(--border-color);
        z-index: 9999 !important;
        /* Поверх всего */
    }
}

/* =========================================
   МОБИЛЬНОЕ МЕНЮ (ГАМБУРГЕР)
   ========================================= */

/* 1. Скрываем кнопку меню на ПК */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 1001;
    /* Поверх всего */
}

/* Рисуем полоски кнопки */
.burger-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

/* 2. НАСТРОЙКИ ДЛЯ ТЕЛЕФОНОВ */
@media (max-width: 768px) {

    /* Показываем кнопку гамбургера */
    .burger-btn {
        display: flex;
        order: 3;
        /* Ставим справа (или используй order: -1 для лева) */
    }

    /* Скрываем обычное меню и делаем из него выпадающее */
    .main-nav {
        position: fixed;
        top: 70px;
        /* Высота шапки */
        left: 0;
        width: 100%;
        background: var(--card-bg);
        /* Цвет фона как у карточек */
        border-bottom: 1px solid var(--border-color);
        padding: 20px 0;

        display: none;
        /* Скрыто по умолчанию */
        flex-direction: column;
        align-items: center;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    /* Класс active добавляется скриптом, когда меню открыто */
    .main-nav.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    /* Ссылки в мобильном меню */
    .main-nav a {
        font-size: 1.1rem;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    /* Анимация появления */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Чтобы кнопка и профиль стояли красиво */
    .header-content {
        justify-content: space-between;
    }
}

/* =========================================
   MOBILE MENU (PLASMO STYLE)
   ========================================= */

/* 1. Скрываем бургер на ПК */
.burger-btn {
    display: none;
}

/* 2. Адаптив для шапки */
@media (max-width: 768px) {

    .desktop-nav,
    .desktop-only {
        display: none !important;
    }

    .burger-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .burger-btn span {
        width: 24px;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
    }
}

/* 3. Оверлей меню (Скрыт по умолчанию) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* Фон темы */
    z-index: 9999;
    padding: 20px;
    display: flex;
    flex-direction: column;

    /* Анимация появления */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Когда меню активно */
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Шапка меню */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Большая синяя кнопка (Авторизация) */
.mobile-auth-section {
    margin-bottom: 30px;
}

.mobile-main-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #3b82f6;
    /* Синий Plasmo */
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Строка с темой */
.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-main);
    font-weight: 500;
}

/* Ссылки меню */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--text-main);
}

.m-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* === СТИЛЬ ПЕРЕКЛЮЧАТЕЛЯ (IOS STYLE) === */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Активное состояние (Синий) */
input:checked+.slider {
    background-color: #3b82f6;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* =========================================
   MOBILE MENU (PLASMO STYLE)
   ========================================= */

/* 1. Скрываем бургер на ПК */
.burger-btn {
    display: none;
}

/* 2. Адаптив для шапки */
@media (max-width: 768px) {

    .desktop-nav,
    .desktop-only {
        display: none !important;
    }

    .burger-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .burger-btn span {
        width: 24px;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
    }
}

/* 3. Оверлей меню (Скрыт по умолчанию) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* Фон темы */
    z-index: 9999;
    padding: 20px;
    display: flex;
    flex-direction: column;

    /* Анимация появления */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Когда меню активно */
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Шапка меню */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Большая синяя кнопка (Авторизация) */
.mobile-auth-section {
    margin-bottom: 30px;
}

.mobile-main-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #3b82f6;
    /* Синий Plasmo */
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Строка с темой */
.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-main);
    font-weight: 500;
}

/* Ссылки меню */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--text-main);
}

.m-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* === СТИЛЬ ПЕРЕКЛЮЧАТЕЛЯ (IOS STYLE) === */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Активное состояние (Синий) */
input:checked+.slider {
    background-color: #3b82f6;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* =========================================
   MOBILE MENU (SKYLAND NATIVE STYLE)
   ========================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* ВАЖНО: Используем переменную фона, а не черный цвет */
    background-color: var(--bg-color);

    z-index: 9999;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    /* Выезжает сбоку, как на iPhone */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Шапка меню */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.mobile-menu-header .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 5px;
    cursor: pointer;
    display: flex;
}

.close-menu-btn:active {
    color: var(--text-main);
}

/* --- БОЛЬШАЯ КНОПКА (ПРОФИЛЬ) --- */
.mobile-auth-section {
    margin-bottom: 25px;
}

.mobile-main-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: 0.2s;
}

/* Стиль кнопки для авторизованного (как карточка) */
.profile-btn {
    background-color: var(--card-bg);
    /* Цвет карточки из темы */
    border: 1px solid var(--border-color);
}

.profile-btn:active {
    background-color: var(--hover-bg);
}

/* Стиль кнопки Входа (Яркая синяя) */
.login-btn {
    background-color: #3b82f6;
    color: #fff;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.mobile-head {
    border-radius: 6px;
    margin-right: 12px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.m-nick {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

.m-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.arrow-icon {
    color: var(--text-muted);
}

/* Уведомление */
.mobile-notif-alert {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #ef4444;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

/* --- ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ --- */
.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 20px;
}

.mobile-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 25px;
}

/* --- СПИСОК ССЫЛОК --- */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    /* Серый цвет по умолчанию */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s;
}

/* SVG Иконки */
.m-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2px;
}

/* Активная ссылка или наведение */
.mobile-link.active,
.mobile-link:active {
    color: #3b82f6;
    /* Синий цвет активной ссылки */
}

.mobile-link.active .m-icon {
    stroke: #3b82f6;
}

/* =========================================
   MOBILE MENU (FIXED LAYOUT)
   ========================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Фон берется из темы (будет меняться) */
    background-color: var(--bg-color);

    z-index: 10000;
    /* Поверх всего */

    /* ВАЖНО: border-box, чтобы padding не ломал ширину */
    box-sizing: border-box;
    padding: 24px;

    display: flex;
    flex-direction: column;

    /* Анимация */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Все элементы внутри меню тоже должны учитывать границы */
.mobile-menu-overlay * {
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* --- ШАПКА МЕНЮ --- */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}

.mobile-menu-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}

.close-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
}

.close-menu-btn:active {
    background-color: var(--hover-bg);
    color: var(--text-main);
}

/* --- ПРОФИЛЬ / ВХОД --- */
.mobile-auth-section {
    margin-bottom: 30px;
    width: 100%;
}

.mobile-main-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    transition: 0.2s;
    position: relative;
}

/* Стиль профиля */
.profile-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    justify-content: space-between;
    /* Разносит аватар и стрелку */
}

.profile-btn:active {
    background-color: var(--hover-bg);
    transform: scale(0.98);
}

/* Внутренняя группировка профиля */
.profile-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Стиль кнопки входа */
.login-btn {
    background-color: #3b82f6;
    color: #ffffff !important;
    justify-content: center;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: none;
}

.mobile-head {
    border-radius: 8px;
    width: 32px;
    height: 32px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.m-nick {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
}

.m-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.mobile-notif-alert {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: #ef4444;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

/* --- ТЕМА --- */
.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 5px;
    /* Чуть отступа, чтобы визуально ровно было */
}

.theme-label {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
}

.mobile-divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    margin-bottom: 25px;
    opacity: 0.5;
}

/* --- НАВИГАЦИЯ --- */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 10px;
    /* Увеличил зону клика */
    border-radius: 10px;
    transition: all 0.2s;
}

.mobile-link:active {
    background-color: var(--hover-bg);
    color: var(--text-main);
}

.mobile-link.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.m-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

/* =========================================
   MOBILE MENU (FINAL STYLE)
   ========================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* Адаптивный фон */
    z-index: 10000;

    /* Отступы */
    padding: 20px 24px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay * {
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ШАПКА */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}

.mobile-menu-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    /* Чтобы SVG был по центру */
}

.close-menu-btn:active {
    background: var(--hover-bg);
}

/* ПРОФИЛЬ */
.mobile-auth-section {
    margin-bottom: 25px;
    width: 100%;
}

.mobile-main-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: 0.2s;
}

.profile-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    justify-content: space-between;
}

.profile-btn:active {
    background-color: var(--hover-bg);
    transform: scale(0.98);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-head {
    border-radius: 8px;
    width: 36px;
    height: 36px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.m-nick {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
}

.m-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* КНОПКА ВХОДА */
.login-btn {
    background-color: #3b82f6;
    color: #fff !important;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ТЕМА И РАЗДЕЛИТЕЛЬ */
.mobile-theme-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.theme-label {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

.mobile-divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    margin-bottom: 20px;
    opacity: 0.6;
}

/* НАВИГАЦИЯ */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px;
    border-radius: 10px;
    transition: 0.2s;
}

.m-icon {
    width: 22px;
    height: 22px;
    stroke: var(--text-muted);
    /* Цвет иконки по умолчанию */
}

/* Активное состояние */
.mobile-link:active,
.mobile-link.active {
    background-color: var(--hover-bg);
    color: #3b82f6;
}

.mobile-link.active .m-icon {
    stroke: #3b82f6;
}

/* =========================================
   MOBILE MENU (FINAL STYLE)
   ========================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* Адаптивный фон */
    z-index: 10000;

    padding: 20px 16px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay * {
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 1. ШАПКА */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.mobile-menu-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.close-menu-btn {
    background: none;
    border: none;
    padding: 5px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
}

/* 2. ПРОФИЛЬ */
.mobile-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-decoration: none;
    transition: 0.2s;
}

.mobile-profile-card:active {
    background: var(--hover-bg);
    transform: scale(0.98);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-head {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.m-nick {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
}

.m-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* КНОПКА ВОЙТИ */
.login-btn {
    background: #3b82f6;
    color: white !important;
    text-align: center;
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* 3. НАВИГАЦИЯ */
.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    transition: 0.2s;
}

.m-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    opacity: 0.8;
}

/* Активное состояние */
.mobile-link.active {
    color: #3b82f6;
    font-weight: 600;
}

.mobile-link.active .m-icon {
    opacity: 1;
    stroke-width: 2.5px;
}

/* 4. НИЖНЯЯ ЧАСТЬ */
.mobile-spacer {
    flex: 1;
    min-height: 20px;
}

/* Толкает низ вниз */

.mobile-bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.bottom-link {
    padding: 8px 0;
}

/* Красная точка уведомлений */
.badge-dot {
    position: absolute;
    top: -1px;
    right: -2px;
    width: 9px;
    height: 9px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
}

/* Переключатель темы */
.theme-toggle-row {
    justify-content: space-between;
    cursor: pointer;
}

.theme-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #e4e4e7;
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Логика цвета свитча */
body:not(.light-theme) .toggle-switch {
    background: #3b82f6;
}

body:not(.light-theme) .toggle-switch::after {
    transform: translateX(20px);
}

body.light-theme .toggle-switch {
    background: #d4d4d8;
}

/* =========================================
   MOBILE NOTIFICATIONS DRAWER
   ========================================= */

/* Сам слой (выезжает справа) */
.mob-notif-drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 10001;
    /* Поверх основного контента меню */
    transform: translateX(100%);
    /* Спрятан справа */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mob-notif-drawer.active {
    transform: translateX(0);
    /* Выезжает */
}

/* Шапка слоя (Кнопка назад) */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
}

.drawer-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Контент (Список) */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Карточка уведомления */
.mob-notif-card {
    background-color: var(--card-bg);
    /* Темный фон карточки */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.mn-top {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.mn-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.mn-text {
    flex: 1;
}

.mn-msg {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.mn-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Кнопки действий (Принять/Отказать) */
.mn-actions {
    display: flex;
    gap: 10px;
}

.mn-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.btn-accept {
    background-color: rgba(16, 185, 129, 0.15);
    /* Зеленый фон */
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-accept:active {
    background-color: rgba(16, 185, 129, 0.25);
}

.btn-decline {
    background-color: rgba(239, 68, 68, 0.15);
    /* Красный фон */
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-decline:active {
    background-color: rgba(239, 68, 68, 0.25);
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    margin-top: 50px;
}

.mark-read-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ИСПРАВЛЕННАЯ ШАПКА УВЕДОМЛЕНИЙ */
.drawer-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Три колонки: 1.Кнопка 2.Текст 3.Пустота */
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    justify-self: start;
    /* Прижимаем кнопку влево */
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
}

.drawer-title {
    justify-self: center;
    /* Прижимаем текст идеально в центр */
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Ссылка "Пометить все" */
.mark-read-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    padding: 10px;
}

.mark-read-link:active {
    opacity: 0.7;
}

/* =========================================
   ФИНАЛЬНЫЕ ПРАВКИ ДИЗАЙНА
   ========================================= */

/* 1. ИСПРАВЛЕНИЕ ПЕРЕКЛЮЧАТЕЛЯ */
/* В ТЕМНОЙ ТЕМЕ: Фон переключателя темный, а не белый */
.toggle-switch {
    background: #27272a !important;
    /* Темно-серый цвет */
    border: 1px solid var(--border-color);
    /* Тонкая рамка */
}

/* В СВЕТЛОЙ ТЕМЕ: Фон светло-серый (как на iPhone) */
body.light-theme .toggle-switch {
    background: #e4e4e7 !important;
    border: none;
}

/* Кружочек внутри всегда белый */
.toggle-switch::after {
    background: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Когда переключатель "Включен" (Светлая тема) - кружок справа */
body.light-theme .toggle-switch::after {
    transform: translateX(20px);
}

/* Когда переключатель "Выключен" (Темная тема) - кружок слева */
body:not(.light-theme) .toggle-switch::after {
    transform: translateX(2px);
    /* Чуть поправил позицию */
}


/* 2. УБИРАЕМ "СЕРУЮ ШТУКУ" (ФОН) У АКТИВНОЙ КНОПКИ */
.mobile-link.active {
    background-color: transparent !important;
    /* Фон полностью прозрачный */
    color: #3b82f6 !important;
    /* Текст ярко-синий */
}

/* Красим иконку активной кнопки в синий */
.mobile-link.active .m-icon {
    stroke: #3b82f6 !important;
    opacity: 1 !important;
}

/* (Опционально) Легкая подсветка только в момент касания пальцем */
.mobile-link:active {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* =========================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ (ИНТУИТИВНЫЙ)
   - Темная тема ВКЛ = синий + кружок справа
   - Темная тема ВЫКЛ (светлая) = серый + кружок слева
   ========================================= */

/* Строка с переключателем */
.theme-toggle-row {
    display: flex;
    align-items: center !important;
    justify-content: space-between;
}

/* 1. ТРЕК (Основа переключателя) */
.toggle-switch {
    width: 50px !important;
    height: 28px !important;
    border-radius: 28px !important;
    position: relative;
    transition: background 0.3s ease !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
    cursor: pointer;
    border: none !important;
}

/* Цвет трека когда ТЕМНАЯ тема ВКЛЮЧЕНА (синий) */
body:not(.light-theme) .toggle-switch {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Цвет трека когда СВЕТЛАЯ тема (серый = темная выключена) */
body.light-theme .toggle-switch {
    background: #d4d4d8 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* 2. КРУЖОК (Ручка) */
.toggle-switch::after {
    content: '';
    position: absolute;
    background-color: #ffffff !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50%;
    top: 3px !important;
    left: 3px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* Кружок СПРАВА когда темная тема ВКЛЮЧЕНА */
body:not(.light-theme) .toggle-switch::after {
    transform: translateX(22px) !important;
}

/* Кружок СЛЕВА когда светлая тема (темная выключена) */
body.light-theme .toggle-switch::after {
    transform: translateX(0) !important;
}

/* =========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ЖЕСТКИЙ ПЕРЕНОС)
   ========================================= */

@media (max-width: 768px) {

    /* 1. Глобальный запрет на горизонтальный скролл для контейнеров */
    .admin-table-wrapper,
    .container,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 2. Ломаем структуру таблицы */
    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        /* ВАЖНО: Разрешает сжиматься ниже контента */
        box-sizing: border-box !important;
    }

    .admin-table thead {
        display: none;
    }

    /* Скрываем шапку */

    /* 3. Карточка (бывшая строка) */
    .admin-table tr {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        margin-bottom: 15px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

        /* ГАРАНТИЯ, что карточка не шире экрана */
        max-width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 4. ВЕРХНЯЯ ЧАСТЬ (Ник + ID) */
    .admin-table td:first-child {
        background: rgba(59, 130, 246, 0.08);
        padding: 15px;
        border-bottom: 1px solid var(--border-color);

        /* Flex для выравнивания */
        display: flex !important;
        flex-direction: column !important;
        /* Элементы друг под другом */
        align-items: flex-start !important;
        gap: 6px;
    }

    /* --- САМОЕ ГЛАВНОЕ: ПЕРЕНОС ДЛИННОГО ID --- */
    .admin-table td:first-child span,
    .id-hint {
        display: block !important;
        width: 100% !important;

        /* Магия переноса длинных строк без пробелов */
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-all !important;
        /* Рвет строку в любом месте */
        overflow-wrap: anywhere !important;

        font-size: 0.8rem;
        color: var(--text-muted);
        font-family: monospace;
        line-height: 1.3;
    }

    /* Стиль для самого ника */
    .user-cell-content {
        font-weight: 700;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* 5. СРЕДНЯЯ ЧАСТЬ (Статус и прочее) */
    .admin-table td:not(:first-child):not(:last-child) {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        font-size: 0.95rem;
        color: var(--text-muted);
    }

    /* Подписи (только если нужно) */
    .admin-table td:nth-child(2)::before {
        content: "Регистрация";
        font-weight: 600;
        color: var(--text-main);
    }

    .admin-table td:nth-child(3)::before {
        content: "Статус";
        font-weight: 600;
        color: var(--text-main);
    }


    /* 6. НИЖНЯЯ ЧАСТЬ (Кнопка) */
    .admin-table td:last-child {
        padding: 12px;
        background: rgba(0, 0, 0, 0.02);
    }

    .btn-mini {
        width: 100%;
        display: block;
        text-align: center;
        padding: 12px;
        font-size: 1rem;
    }

    /* 5. СРЕДНЯЯ ЧАСТЬ (Дата и Статус) */
    .admin-table td:not(:first-child):not(:last-child) {
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);

        /* ГЛАВНОЕ ИСПРАВЛЕНИЕ: */
        display: flex !important;
        justify-content: space-between !important;
        /* Раскидываем по краям */
        align-items: center !important;
        /* Центруем по вертикали */

        font-size: 0.95rem;
        color: var(--text-muted);
        width: 100% !important;
    }

    /* Подписи (добавил отступ margin-right на всякий случай) */
    .admin-table td:nth-child(2)::before {
        content: "Регистрация:";
        /* Добавил двоеточие */
        font-weight: 600;
        color: var(--text-main);
        margin-right: auto;
        /* Толкает значение вправо, если flex заглючит */
        padding-right: 15px;
        /* Минимальный отступ */
    }

    .admin-table td:nth-child(3)::before {
        content: "Статус:";
        font-weight: 600;
        color: var(--text-main);
        margin-right: auto;
        padding-right: 15px;
    }
}

/* =========================================
   ФИКС ЗАГОЛОВКА (БЕЗ ПЕРЕНОСОВ)
   ========================================= */

.hero-title,
h1 {
    /* Запрещаем разрывать слова дефисами */
    -webkit-hyphens: manual !important;
    -ms-hyphens: manual !important;
    hyphens: manual !important;

    /* Слова должны переноситься только целиком */
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* На мобильных чуть уменьшим шрифт, чтобы длинные слова влезали целиком */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
        /* Чуть меньше, чтобы "технологичный" влезло */
        line-height: 1.2;
    }
}

/* =========================================
   ЗАПРЕТ НА ПЕРЕНОС СЛОВ (АНТИ-ДЕФИС)
   ========================================= */

/* Применяем ко всем заголовкам, кнопкам и меню */
h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.page-title,
/* Заголовок страницы */
.section-title,
/* Заголовки секций */
.back-link,
/* Кнопка назад */
.btn,
/* Обычные кнопки */
.btn-mini,
/* Маленькие кнопки в таблице */
.mobile-link,
/* Пункты меню */
.nav-link

/* Ссылки в шапке */
    {
    /* 1. Запрещаем автоматические переносы */
    -webkit-hyphens: manual !important;
    -ms-hyphens: manual !important;
    hyphens: manual !important;

    /* 2. Слова переносятся только целиком */
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* ФИКС ДЛЯ МОБИЛОК: Если слово ОЧЕНЬ длинное */
@media (max-width: 480px) {

    h1,
    .hero-title,
    .page-title {
        /* Чуть уменьшаем шрифт, чтобы слово "Статистика" влезло целиком */
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    /* Если заголовок все равно не влезает, разрешаем мягкий перенос без дефиса */
    .hero-title span {
        display: inline-block;
    }
}

/* =========================================
   МОБИЛЬНЫЙ ПРОФИЛЬ (СТАТУС)
   ========================================= */

/* 1. Отключаем поведение кнопки для карточки */
.mobile-profile-card.no-action {
    cursor: default !important;
    /* Обычный курсор */
    background-color: var(--card-bg);
    /* Убираем эффекты нажатия */
    transform: none !important;
}

.mobile-profile-card.no-action:active {
    background-color: var(--card-bg) !important;
    transform: none !important;
}

/* 2. Стили статуса */
.m-status {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Если проходка АКТИВНА (Зеленый) */
.m-status.active {
    color: #22c55e;
    /* Ярко-зеленый */
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    /* Зеленое свечение */
    display: inline-block;
}

/* Если проходки НЕТ (Ссылка купить) */
.m-status.buy-link {
    color: #3b82f6;
    /* Синий цвет ссылки */
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    /* На ссылку нажимать можно */
    transition: 0.2s;
}

.m-status.buy-link:active {
    opacity: 0.7;
}

/* =========================================
   ЯДЕРНЫЙ ЗАПРЕТ НА ПЕРЕНОСЫ (ТИРЕ)
   ========================================= */

/* Применяем ко всем элементам на сайте */
*,
*::before,
*::after {
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    hyphens: none !important;
}

/* Дополнительно для текста в таблицах и карточках */
.admin-table td,
.card,
.hero-title,
p,
span,
div {
    /* Слова переносятся только целиком */
    word-break: normal;
    overflow-wrap: break-word;
}

/* НО! Для длинных ID (цифр) оставляем исключение, 
   иначе они сломают верстку на телефоне */
.id-hint,
.user-id-text,
.admin-table td:first-child span {
    word-break: break-all !important;
    /* Цифры можно ломать */
    white-space: normal !important;
}

/* =========================================
   ТЕГИ ТИПА ПОДПИСКИ (Профиль)
   ========================================= */
.sub-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
}

.sub-tag-forever {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.sub-tag-season {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
}

/* =========================================
   АДАПТАЦИЯ ГОРОДОВ (FIX OVERFLOW v2)
   ========================================= */

.towns-grid {
    display: grid;
    /* ПО УМОЛЧАНИЮ 3 КОЛОНКИ НА ПК (как просили) */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 1100px) {
    .towns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .towns-grid {
        grid-template-columns: 1fr;
        /* Одна колонка на мобилках */
    }
}

.town-card-minimal {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    padding: 12px;
    /* Уменьшил паддинг с 16px */
    text-decoration: none;
    transition: transform 0.2s;

    /* ФИКС РАЗМЕРОВ */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* Скрываем все, что вылезает */
    position: relative;
    word-break: break-word;
}

.town-card-minimal:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
    background: var(--hover-bg);
}

.minimal-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Уменьшил отступ между заголовком и статами (было 10) */
    width: 100%;
    min-width: 0;
    /* Разрешаем сжатие */
}

.minimal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Чуть поплотнее (было 12) */
    width: 100%;
    min-width: 0;
    /* Критично для flex-контейнера */
}

.tiny-head {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.name-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Центрируем по вертикали относительно иконки */
    align-items: flex-start;
    /* Прижимаем к левому краю */
    overflow: hidden;
}

.town-name-min {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    text-align: left;
    /* Принудительно влево */

    /* НА ПК ПОКАЗЫВАЕМ ПОЛНОЕ НАЗВАНИЕ (разрешаем перенос) */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;

    max-width: 100%;
    display: block;
}

/* На мобильных разрешаем перенос строк */
@media (max-width: 600px) {
    .town-name-min {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

.my-town-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: #3b82f6;
    text-transform: uppercase;
}

.minimal-stats {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
    /* Уменьшил отступ сверху (было 10) */
    font-size: 0.85rem;
    /* Чуть уменьшил шрифт (было 0.9) */
    color: var(--text-muted);

    /* Чтобы статы тоже не ломали ширину */
    width: 100%;
    overflow: hidden;
}

.minimal-stats li {
    margin-bottom: 2px;
    /* Уменьшил отступ между строками (было 4) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* СТИЛИ ДЛЯ СВОЕГО ГОРОДА */
.my-town-card {
    border: 1px solid #3b82f6 !important;
    /* Синяя обводка */
    background: linear-gradient(rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.05)), var(--card-bg);
    position: relative;
    box-shadow: none !important;
    /* Убираем любые тени */
}

/* КНОПКА ПОДАЧИ ЗАЯВКИ (Зеленая, красивая) */
.btn-apply-town {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn-apply-town:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-apply-town:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* ИСПРАВЛЕНИЕ КНОПКИ РЕДАКТИРОВАНИЯ ОПИСАНИЯ */
.sidebar-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Явный отступ между заголовком и кнопкой */
    margin-bottom: 12px;
}

.btn-icon-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    /* Легкий фон */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    /* Чуть побольше отступы */
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    /* Чтобы текст не прыгал */
}

.btn-icon-edit:hover {
    background: var(--hover-bg);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.icon-pencil {
    font-size: 0.9rem;
    /* Чуть крупнее иконка */
}

/* =========================================
   СТРАНИЦА ПРОФИЛЯ
   ========================================= */
.profile-section {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: calc(100vh - 150px);
}

.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-header {
    margin-bottom: 30px;
    text-align: center;
}

.profile-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.profile-card {
    background: transparent;
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    gap: 50px;
    align-items: center;
}

body.light-theme .profile-card {
    background: transparent;
    border-color: var(--border-highlight);
}

.profile-skin-column {
    flex: 0 0 350px;
    display: flex;
    justify-content: center;
}

.skin-wrapper {
    width: 350px;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    border-radius: 20px;
}

.skin-img {
    height: 90%;
    width: 90%;
    padding: 5%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.profile-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pi-header {
    margin-bottom: 30px;
}

.pi-username {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pi-head {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    image-rendering: pixelated;
}

.pi-role {
    display: inline-block;
}

.pi-stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pi-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pi-stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pi-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.town-name {
    color: #60a5fa;
    text-decoration: none;
    transition: 0.2s;
}

.town-name:hover {
    color: #3b82f6;
    text-decoration: underline !important;
}

.town-name {
    color: #60a5fa;
    text-decoration: none;
    transition: 0.2s;
}

.town-name:hover {
    color: #3b82f6;
    text-decoration: underline !important;
}

.heatmap-section {
    margin-top: 40px;
}

.heatmap-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.heatmap-container {
    overflow-x: auto;
    padding: 10px 10px 15px 10px;
    margin: -10px -10px 0 -10px;
}

.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-auto-columns: 20px;
    grid-auto-flow: column;
    gap: 6px;
    width: max-content;
}

.heatmap-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

body.light-theme .heatmap-box {
    background: rgba(0, 0, 0, 0.05);
}

.heatmap-box:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Green theme similar to GitHub */
.heatmap-box.level-1 {
    background: #0e4429;
}

.heatmap-box.level-2 {
    background: #006d32;
}

.heatmap-box.level-3 {
    background: #26a641;
}

.heatmap-box.level-4 {
    background: #39d353;
}

/* ==================================================
   SERVER STATUS CARD (STATS PAGE)
   ================================================== */
.server-status-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 40px;
}

body:not(.light-theme) .server-status-card {
    background: #111113;
    /* Как на референсе */
}

.ssc-top {
    padding: 24px 24px 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ssc-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ssc-title {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.ssc-ip-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ssc-ip-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

body.light-theme .ssc-ip-btn {
    background: rgba(0, 0, 0, 0.03);
}

.ssc-ip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-theme .ssc-ip-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.ssc-ip-btn svg {
    color: var(--text-muted);
}

.ssc-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.ssc-online {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
}

.ssc-chart-wrapper {
    height: 60px;
    width: 100%;
}

body.light-theme .heatmap-box.level-1 {
    background: #9be9a8;
}

body.light-theme .heatmap-box.level-2 {
    background: #40c463;
}

body.light-theme .heatmap-box.level-3 {
    background: #30a14e;
}

body.light-theme .heatmap-box.level-4 {
    background: #216e39;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        padding: 25px;
        text-align: center;
        gap: 30px;
    }

    .profile-skin-column {
        flex: 0 0 auto;
    }

    .pi-username {
        justify-content: center;
        flex-direction: column-reverse;
    }

    .pi-head {
        margin-bottom: 5px;
    }
}

/* === HEAD CROP FOR AVATARS === */
.head-crop {
    width: 100%;
    height: 100%;
    background-size: 812% 812%;
    background-position: 14.285% 14.285%;
    image-rendering: pixelated;
    border-radius: inherit;
    background-repeat: no-repeat;
}

.head-crop.is-minotar,
.avatar-helm.is-minotar {
    background-size: cover !important;
    background-position: center !important;
}

/* === RESET SKIN BUTTON === */
.btn-reset {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Skin History Styles */
.skin-history-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.history-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.skin-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-item {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: var(--hover-bg);
}

.history-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-highlight);
}

.history-item.active {
    border-color: #ffd700;
    /* Gold for active */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.history-head {
    width: 64px;
    height: 64px;
    background-size: 512px 512px;
    /* Scale for head from 64x64 or 32x32 skin */
    background-position: -64px -64px;
    /* Position for the head */
    image-rendering: pixelated;
    transform: scale(0.8);
    /* Fit inside 50px item */
    transform-origin: top left;
}

.delete-skin-small {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.history-item:hover .delete-skin-small {
    display: flex;
}

/* Profile Skin History (Heads list) */
.profile-skin-history {
    margin-top: 25px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.history-heads-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.history-head-mini {
    width: 48px;
    height: 48px;
    background-size: 812% 812%;
    background-position: 14.285% 14.285%;
    image-rendering: pixelated;
    border-radius: 10px;
    border: 1px solid var(--border-highlight);
    background-color: var(--card-bg);
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.history-head-mini.is-minotar {
    background-size: cover;
    background-position: center;
}

.history-item-active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.history-head-mini:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #3b82f6;
    z-index: 10;
}

/* No more layers/ghosts */
.history-head-mini::before,
.history-head-mini::after,
.history-head-mini span {
    display: none !important;
}