/**
 * Основные стили сайта
 * Тёмный фон, сетка, красный акцент
 */

@font-face {
    font-family: '28 Days Later';
    src: url('../fonts/28DaysLater.ttf') format('truetype'),
         url('../fonts/28DaysLater.woff') format('woff'),
         url('../fonts/28DaysLater.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Core Theme */
    --theme-black: #0a0a0a;
    --theme-dark: #111111;
    --theme-darker: #0d0d0d;
    /* Имена legacy: «cyan» = основной акцент (красная тема) */
    --theme-cyan: #ff5252;
    --theme-cyan-dark: #c62828;
    --theme-red: #ff4444;
    --theme-green: #44ff44;
    --theme-orange: #ffaa00;
    --theme-gray-800: #1a1a1a;
    --theme-gray-700: #2a2a2a;
    --theme-gray-600: #3a3a3a;
    --theme-gray-500: #666666;
    --theme-gray-400: #888888;

    --primary-red: var(--theme-cyan-dark);
    --dark-red: #5c1010;
    --light-red: #ff8a80;
    --accent-red: var(--theme-cyan);
    /* Старые шаблоны админки */
    --accent-blue: var(--accent-red);
    --red-glow: rgba(244, 67, 54, 0.35);
    --red-shadow: rgba(244, 67, 54, 0.25);

    /* Реальная опасность / удаление (остаётся красным) */
    --danger-red: #ff4444;
    --danger-red-dark: #cc3333;

    --dark-bg: var(--theme-black);
    --dark-gray: var(--theme-darker);
    --medium-gray: var(--theme-gray-800);
    --light-gray: var(--theme-gray-700);
    --card-bg: rgba(17, 17, 17, 0.92);
    --card-bg-hover: rgba(26, 26, 26, 0.96);
    --border-gray: rgba(255, 255, 255, 0.08);

    --text-light: #ffffff;
    --text-dark: #b8c1ca;
    --text-muted: #8f98a3;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(244, 67, 54, 0.45);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.65);
    --red-glow-shadow: 0 4px 24px rgba(244, 67, 54, 0.28);
    --glow: 0 0 24px rgba(244, 67, 54, 0.35);

    --gradient-red: linear-gradient(135deg, var(--theme-cyan-dark) 0%, var(--theme-cyan) 100%);
    --gradient-dark: linear-gradient(180deg, var(--theme-black) 0%, var(--theme-darker) 100%);
    --gradient-card: linear-gradient(135deg, rgba(17, 17, 17, 0.96) 0%, rgba(26, 26, 26, 0.96) 100%);
    --hover-shadow: 0 8px 32px rgba(244, 67, 54, 0.14);

    --accent-tint-bg: rgba(244, 67, 54, 0.1);
    --accent-tint-bg-strong: rgba(244, 67, 54, 0.15);
    --accent-glow-soft: rgba(244, 67, 54, 0.15);
    --accent-glow-medium: rgba(244, 67, 54, 0.35);
    --accent-glow-strong: rgba(244, 67, 54, 0.5);

    /* Карточки / сетки (как main-store: rounded-lg, border-gray-800) */
    --radius-card: 10px;
    --radius-card-lg: 12px;
    --border-card: 1px solid rgba(42, 42, 42, 0.95);
    --border-card-muted: 1px solid rgba(255, 255, 255, 0.06);
    --surface-card: rgba(17, 17, 17, 0.82);
    --surface-card-soft: rgba(17, 17, 17, 0.62);
    --shadow-card-hover: 0 12px 40px rgba(244, 67, 54, 0.12), 0 8px 32px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--theme-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--theme-cyan-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-cyan);
}

::selection {
    background: rgba(244, 67, 54, 0.3);
    color: #fff;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--theme-black);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(244, 67, 54, 0.1), transparent 55%),
        linear-gradient(rgba(244, 67, 54, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 67, 54, 0.015) 1px, transparent 1px);
    background-size: auto, 50px 50px, 50px 50px;
    background-attachment: fixed;
    position: relative;
}

/* Публичный сайт: общий масштаб −15% (0.85). Админка использует body.admin-body — без уменьшения. */
body:not(.admin-body) {
    zoom: 0.92;
    --site-scale: 0.92;
}

body::after {
    content: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header (theme: тёмная плашка + лёгкое стекло) */
.main-header {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(244, 67, 54, 0.08), var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.main-nav {
    flex: 1;
    justify-content: center;
    display: flex;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.logo a span {
    font-family: '28 Days Later', 'Arial Black', sans-serif;
    font-weight: normal;
    letter-spacing: 1px;
    text-transform: none;
    white-space: nowrap;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--red-glow));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.logo:hover .logo-image {
    filter: drop-shadow(0 0 15px var(--accent-red));
    transform: scale(1.05);
}

.logo i {
    font-size: 32px;
    color: var(--accent-red);
    filter: drop-shadow(0 0 8px var(--red-glow));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.logo:hover i {
    filter: drop-shadow(0 0 15px var(--accent-red));
    transform: scale(1.1);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: #d4d4d4;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(26, 26, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.main-nav a:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
    border-color: rgba(244, 67, 54, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12);
}

/* Выпадающее меню для правил */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    padding: 5px 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    border-bottom: 1px solid var(--border-gray);
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background: var(--medium-gray);
    color: var(--accent-red);
    padding-left: 25px;
}

.nav-dropdown-menu a i {
    margin-right: 8px;
    width: 20px;
}

.login-btn {
    background: rgba(26, 26, 26, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
    color: #d4d4d4 !important;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    background: rgba(244, 67, 54, 0.1) !important;
    border-color: rgba(244, 67, 54, 0.35) !important;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12) !important;
    transform: translateY(-1px);
    opacity: 1 !important;
    color: #fff !important;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

.user-menu-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu.active .user-menu-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-menu.active .user-avatar {
    border-color: var(--accent-red);
    box-shadow: 0 0 12px rgba(244, 67, 54, 0.45);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    /* backdrop-filter: blur(10px); Убрано для улучшения производительности */
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: var(--hover-shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
}

.user-menu.active .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
}

.user-menu.active .user-menu-wrapper .fa-chevron-down {
    transform: rotate(180deg);
}

.user-menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    border-bottom: 1px solid var(--border-gray);
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
}

.user-menu-dropdown a:hover {
    background: var(--medium-gray);
    color: var(--accent-red);
    padding-left: 25px;
}

.user-menu-dropdown a i {
    margin-right: 8px;
    width: 20px;
}

/* Main Content (ритм секций как py-20 в theme) */
.main-content {
    padding: 48px 0 72px;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* Hero Section (как блоки theme: dark/80 + blur + rounded-lg) */
.hero-section {
    background: var(--surface-card-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-card);
    border-radius: var(--radius-card-lg);
    padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 40px);
    margin: 32px 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    /* Убрана анимация для улучшения производительности */
}

.hero-section h1 {
    font-family: '28 Days Later', 'Arial Black', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: normal;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-red);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.9),
        0 0 28px rgba(244, 67, 54, 0.4);
}

/* Hero CMS: режим «название проекта» — белый заголовок + красное свечение */
.hero-section h1.hero-title-main {
    font-family: '28 Days Later', 'Arial Black', sans-serif;
    font-weight: normal;
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    letter-spacing: clamp(0.08em, 0.05em + 0.6vw, 0.16em);
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: clamp(18px, 3vw, 26px);
    text-shadow:
        0 2px 1px rgba(0, 0, 0, 0.92),
        0 0 12px rgba(255, 138, 128, 0.85),
        0 0 28px rgba(244, 67, 54, 0.7),
        0 0 52px rgba(198, 40, 40, 0.45),
        0 0 84px rgba(92, 16, 16, 0.3);
}

.hero-section.hero-section--main-title > p {
    color: rgba(255, 183, 173, 0.92);
    font-weight: 600;
    letter-spacing: 0.06em;
}

.hero-section.hero-section--main-title .stat-card-value {
    color: #ffffff;
    text-shadow:
        0 0 12px rgba(255, 138, 128, 0.48),
        0 0 24px rgba(244, 67, 54, 0.25);
}

.hero-section p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-dark);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    line-height: 1.65;
}

/* Режим банера: ширина как у остальных блоков, картинка обрезается по 10px с каждой стороны */
.hero-banner-wrap {
    width: 100%;
    margin: 32px 0;
    border-radius: var(--radius-card-lg);
    overflow: hidden;
    border: var(--border-card);
    box-shadow: var(--shadow);
}

.hero-banner-link {
    display: block;
    text-decoration: none;
    outline: none;
}

.hero-banner {
    width: calc(100% + 20px);
    max-width: none;
    height: auto;
    display: block;
    margin-left: -10px;
    vertical-align: bottom;
    background-color: var(--dark-gray);
}

/* Расширенный стиль hero применяется к основному hero напрямую */
.hero-section.hero-section--main {
    margin-top: -48px;
    min-height: calc((100dvh - 72px) / var(--site-scale, 1));
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero-section.hero-section--main::before {
    content: none;
    display: none;
}

.hero-main-icon-wrap {
    margin: 0 0 16px;
}

.hero-main-icon {
    font-size: clamp(2rem, 3.5vw, 2.9rem);
    color: #3de6ff;
    filter: drop-shadow(0 0 10px rgba(61, 230, 255, 0.7)) drop-shadow(0 0 24px rgba(61, 230, 255, 0.45));
}

.hero-main-icon-img {
    width: clamp(84px, 10vw, 130px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: none;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-main-subtitle {
    margin: 0 0 6px;
    font-size: clamp(0.95rem, 1.8vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #ff8a80;
    text-shadow: 0 0 18px rgba(244, 67, 54, 0.38);
}

.hero-main-tagline {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(200, 212, 225, 0.65);
    text-transform: uppercase;
}

.hero-main-description {
    margin-bottom: 18px !important;
    max-width: 42rem;
    color: rgba(205, 215, 225, 0.8) !important;
    font-size: clamp(0.9rem, 1.5vw, 1.02rem) !important;
}

.hero-main-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hero-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    min-height: 42px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #d4d4d4;
    background: rgba(26, 26, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-main-btn--primary {
    color: #d4d4d4;
    background: rgba(26, 26, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.hero-main-btn--secondary {
    color: #d4d4d4;
    background: rgba(26, 26, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-main-btn:hover {
    transform: translateY(-1px);
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
    border-color: rgba(244, 67, 54, 0.35);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12);
}

.hero-main-btn--secondary:hover {
    background: rgba(244, 67, 54, 0.1);
}

.hero-main-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 760px);
    margin: 0 auto;
}

.hero-main-stat {
    padding: 12px 10px;
    border-radius: 8px;
    background: rgba(8, 12, 18, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-main-stat-icon {
    font-size: 19px;
    margin-bottom: 8px;
}

.hero-main-stat-icon--cyan { color: #ff8a80; }
.hero-main-stat-icon--green { color: #55e36a; }
.hero-main-stat-icon--orange { color: #f4be4b; }
.hero-main-stat-icon--red { color: #ff6666; }

.hero-main-stat-value {
    color: #fff;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 4px;
}

.hero-main-stat-label {
    color: rgba(186, 196, 208, 0.78);
    font-size: 11px;
    letter-spacing: 0.12em;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .hero-main-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .hero-main-stats {
        grid-template-columns: 1fr;
    }
}

/* Stats Cards (сетка как на главной theme: gap-4, плитки dark/60) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.stat-card {
    background: var(--surface-card-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 67, 54, 0.32);
    box-shadow: var(--shadow-card-hover);
    background: rgba(26, 26, 26, 0.75);
}

.stat-card-value {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.15;
}

.hero-section .stat-card-value {
    color: var(--accent-red);
    text-shadow: 0 0 14px var(--accent-glow-medium);
}

.stat-card-label {
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* Cards (как ProductCard / блоки theme) */
.card {
    background: var(--surface-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.28);
    background: rgba(26, 26, 26, 0.88);
}

.card-header {
    border-bottom: var(--border-card-muted);
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.card-header h2 {
    color: #fff;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--accent-red);
    filter: drop-shadow(0 0 6px rgba(244, 67, 54, 0.35));
}

/* Подзаголовок секции (eyebrow) — как «Каталог» на theme */
.section-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--accent-red);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 20px;
    text-align: center;
}

.section-head {
    text-align: center;
    margin-bottom: 32px;
}

/* Плитки метрик (общая статистика и т.п.) */
.stat-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-tile {
    text-align: center;
    padding: 22px 16px;
    background: var(--surface-card-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 67, 54, 0.32);
    box-shadow: var(--shadow-card-hover);
}

.stat-tile__value {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--accent-red);
    text-shadow: 0 0 14px var(--accent-glow-medium);
    margin-bottom: 8px;
    line-height: 1.1;
}

.stat-tile__label {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    color: #d4d4d4;
    background: rgba(26, 26, 26, 0.65);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background: rgba(26, 26, 26, 0.65);
    color: #d4d4d4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn-primary:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
    border-color: rgba(244, 67, 54, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12);
}

.btn-secondary {
    background: rgba(26, 26, 26, 0.65);
    color: #d4d4d4;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
    border-color: rgba(244, 67, 54, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12);
}

.btn-secondary.updating {
    background: var(--accent-red);
    border-color: rgba(244, 67, 54, 0.5);
    box-shadow: 0 0 18px rgba(244, 67, 54, 0.45);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 18px rgba(244, 67, 54, 0.45);
    }
    50% {
        box-shadow: 0 0 28px rgba(244, 67, 54, 0.75);
    }
}

.btn-danger {
    background: rgba(26, 26, 26, 0.65);
    color: #d4d4d4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn-danger:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
    border-color: rgba(244, 67, 54, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.12);
}

/* Круговая диаграмма онлайна */
.server-online-circle {
    width: 80px;
    height: 80px;
    margin: 10px auto;
    position: relative;
}

.circle-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--border-gray);
    stroke-width: 6;
}

.circle-progress {
    fill: none;
    stroke: var(--accent-red);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 251; /* 2 * PI * 40 (радиус уменьшен для компактности) */
    stroke-dashoffset: 251;
    transition: stroke-dashoffset 1s ease-in-out, stroke 0.3s;
    animation: circleProgress 1s ease-in-out;
}

.circle-progress.offline {
    stroke: var(--text-muted);
}

.circle-text {
    font-size: 14px;
    font-weight: bold;
    fill: var(--text-light);
    transform: rotate(90deg);
    transform-origin: 50px 50px;
}

@keyframes circleProgress {
    from {
        stroke-dashoffset: 283;
    }
}

/* Server Monitor Widget */
.server-monitor {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 8px 0 0;
}

@media (max-width: 1400px) {
    .server-monitor {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .server-monitor {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .server-monitor {
        grid-template-columns: 1fr;
    }
}

.server-card {
    background: var(--surface-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 18px 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-red);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.server-card.online::before {
    background: linear-gradient(90deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.server-card.offline::before {
    background: linear-gradient(90deg, #616161 0%, #424242 100%);
    box-shadow: 0 0 10px rgba(97, 97, 97, 0.3);
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.28);
    background: rgba(26, 26, 26, 0.88);
}

.server-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-name::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--red-glow);
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    /* backdrop-filter: blur(10px); Убрано для улучшения производительности */
}

.server-status.online {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.server-status.offline {
    background: rgba(97, 97, 97, 0.15);
    color: #9E9E9E;
    border: 1px solid rgba(97, 97, 97, 0.3);
    box-shadow: 0 0 10px rgba(97, 97, 97, 0.2);
}

.server-status i {
    font-size: 10px;
}

.server-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-gray);
}

.server-info:last-of-type {
    border-bottom: none;
}

.server-info-label {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.server-info-value {
    color: var(--text-light);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.server-players {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-gray);
}

.player-bar {
    background: rgba(0, 0, 0, 0.3);
    height: 18px;
    border-radius: 9px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--border-gray);
    position: relative;
}

.player-bar-fill {
    height: 100%;
    background: var(--gradient-red);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--red-glow);
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
}

.player-bar-percent {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    z-index: 2;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.player-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    /* Убрана анимация shimmer для улучшения производительности */
    z-index: 0;
}

/* News Block */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.news-item {
    background: var(--surface-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.28);
}

.news-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gradient-dark);
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-image {
    transform: scale(1.05);
}

.news-item-content {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-item-title {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.news-item:hover .news-item-title {
    color: var(--accent-red);
}

.news-item-excerpt {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.7;
    flex: 1;
}

/* Страница новостей: развёрнутый список (друг за другом) */
.news-list-expanded {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-expanded-item {
    padding: 24px;
    background: var(--surface-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.news-expanded-item:hover {
    border-color: rgba(244, 67, 54, 0.22);
    box-shadow: var(--shadow-card-hover);
}

.news-expanded-item:last-child {
    margin-bottom: 0;
}

.news-expanded-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-expanded-title {
    color: var(--accent-red);
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.news-expanded-title a:hover {
    color: var(--light-red);
}

.news-expanded-meta {
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 20px;
}

.news-expanded-content {
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.8;
}

.news-expanded-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--surface-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: var(--border-card);
}

.stats-table thead {
    background: var(--dark-gray);
    /* backdrop-filter: blur(10px); Убрано для улучшения производительности */
}

.stats-table th {
    padding: 15px;
    text-align: left;
    color: var(--accent-red);
    font-weight: bold;
    border-bottom: 2px solid var(--border-gray);
}

.stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-gray);
}

.stats-table tbody tr:hover {
    background: var(--medium-gray);
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* Top Players */
.top-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.top-player-card {
    background: var(--surface-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.top-player-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.28);
    background: rgba(26, 26, 26, 0.88);
}

.top-player-rank {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    border: 3px solid var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-light);
    box-shadow: var(--red-glow-shadow);
    z-index: 10;
}

.top-player-card.rank-1 .top-player-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FFD700;
    color: var(--dark-gray);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.top-player-card.rank-2 .top-player-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    border-color: #C0C0C0;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
}

.top-player-card.rank-3 .top-player-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    border-color: #CD7F32;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.4);
}

/* Центрирование 10-й карточки */
/* Для 3 колонок (стандартный вид) - 10-я карточка во 2-й колонке 4-й строки */
.top-players .top-player-card.rank-10,
.top-players .top-player-card:nth-child(10) {
    grid-column-start: 2;
    grid-column-end: 3;
}

/* Для экранов с 4+ колонками - центрируем во 2-й колонке */
@media (min-width: 1200px) {
    .top-players {
        grid-template-columns: repeat(3, 1fr);
    }
    .top-players .top-player-card.rank-10,
    .top-players .top-player-card:nth-child(10) {
        grid-column-start: 2;
        grid-column-end: 3;
    }
}

/* Для экранов с 2 колонками - центрируем в 1-й колонке */
@media (max-width: 768px) {
    .top-players .top-player-card.rank-10,
    .top-players .top-player-card:nth-child(10) {
        grid-column-start: 1;
        grid-column-end: 2;
        justify-self: center;
        max-width: 250px;
    }
}

.top-player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--border-gray);
    margin: 25px auto 15px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-player-card:hover .top-player-avatar {
    transform: scale(1.1);
    border-color: var(--accent-red);
    box-shadow: var(--red-glow-shadow);
}

/* Стили для ссылки на профиль Steam */
.top-player-card a[href*="steamcommunity.com"] {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.top-player-card a[href*="steamcommunity.com"]:hover {
    transform: scale(1.05);
}

.top-player-card a[href*="steamcommunity.com"]:hover .top-player-avatar {
    transform: scale(1.15);
    border-color: var(--accent-red);
    box-shadow: 0 0 28px rgba(244, 67, 54, 0.65);
}

.top-player-name {
    color: var(--text-light);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.top-player-card:hover .top-player-name {
    color: var(--accent-red);
}

.top-player-stats {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.8;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--accent-red);
    font-weight: 600;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

/* Footer — 4 колонки + нижняя полоса */
.main-footer {
    background: var(--theme-black);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: clamp(48px, 6vw, 72px) 0 28px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-red);
    opacity: 0.65;
}

.footer-main-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 48px);
    align-items: flex-start;
    justify-items: center;
    padding-bottom: clamp(28px, 4vw, 40px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.footer-main-col {
    width: 100%;
    max-width: 17rem;
}

.footer-main-col--brand {
    max-width: 22rem;
}

/* Строка 1: логотип + название; строка 2: подзаголовок на всю ширину; затем описание и статусы */
.footer-brand-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-bottom: 14px;
}

.footer-brand-top {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
}

.footer-brand-logo {
    height: auto;
    max-height: 56px;
    width: auto;
    max-width: min(100px, 32vw);
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 0 10px rgba(244, 67, 54, 0.35));
}

.footer-brand-title {
    flex: 1;
    min-width: 0;
    font-family: '28 Days Later', 'Arial Black', sans-serif;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: normal;
    letter-spacing: 0.06em;
    color: var(--text-light);
    line-height: 1.15;
    margin: 0;
    text-align: left;
}

.footer-brand-tagline {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--theme-gray-500);
    text-align: left;
    line-height: 1.45;
    width: 100%;
}

.footer-brand-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--theme-gray-500);
    text-align: left;
    width: 100%;
}

.footer-brand-tagline + .footer-brand-desc {
    margin-top: -4px;
}

.footer-main-heading {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 auto 18px;
    text-align: center;
}

.footer-main-links,
.footer-main-social {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-main-links li,
.footer-main-social li {
    margin-bottom: 10px;
}

.footer-main-links a {
    font-size: 14px;
    color: var(--theme-gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-main-links a:hover {
    color: var(--accent-red);
}

.footer-main-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--theme-gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-main-social a i {
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: var(--theme-gray-400);
    transition: color 0.2s ease;
}

.footer-main-social a:hover {
    color: var(--accent-red);
}

.footer-main-social a:hover i {
    color: var(--accent-red);
}

.footer-main-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-main-copy {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--theme-gray-600);
    max-width: 52rem;
    text-align: center;
}

.footer-main-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    align-items: center;
    justify-content: center;
    margin-left: 0;
}

.footer-main-legal:empty {
    display: none;
}

.footer-main-legal a {
    font-size: 12px;
    color: var(--theme-gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-main-legal a:hover {
    color: var(--accent-red);
}

@media (max-width: 1100px) {
    .footer-main-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-main-col--brand {
        grid-column: span 2;
        max-width: 36rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 560px) {
    .footer-main-grid {
        grid-template-columns: 1fr;
    }

    .footer-main-col--brand {
        grid-column: span 1;
        max-width: 22rem;
    }

    .footer-main-bar {
        flex-direction: column;
        align-items: center;
    }
}

/* Стили для карточек серверов */
.server-card-link {
    text-decoration: none;
    display: block;
}

.server-card-link:hover .server-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.32);
    background: rgba(26, 26, 26, 0.88);
}

.server-card-link:hover .server-card h3 {
    color: var(--accent-red);
}

/* Стили для описания сервера с HTML */
.server-description {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 16px;
}

.server-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--border-gray);
}

.server-description h1,
.server-description h2,
.server-description h3 {
    color: var(--accent-red);
    margin-top: 20px;
    margin-bottom: 10px;
}

.server-description p {
    margin-bottom: 15px;
}

.server-description ul,
.server-description ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.server-description a {
    color: var(--accent-red);
    text-decoration: none;
}

.server-description a:hover {
    text-decoration: underline;
}

/* .footer-bottom — устарело, оставлено для обратной совместимости */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-gray);
    color: var(--text-dark);
}

/* Современные чекбоксы */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-gray);
    border-radius: 4px;
    background: var(--dark-gray);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin: 0;
    flex-shrink: 0;
}

input[type="checkbox"]:hover {
    border-color: var(--accent-red);
    background: var(--accent-tint-bg);
}

input[type="checkbox"]:checked {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #0a0a0a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.25);
}

/* Чекбокс "Выбрать все" */
#selectAll {
    width: 22px;
    height: 22px;
}

/* Чекбоксы в таблицах */
.news-checkbox,
.stats-checkbox {
    width: 18px;
    height: 18px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: var(--medium-gray);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--border-gray);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pagination a:hover {
    background: var(--gradient-red);
    border-color: var(--accent-red);
    transform: translateY(-1px);
    box-shadow: var(--red-glow-shadow);
}

.pagination .active {
    background: var(--gradient-red);
    border-color: var(--accent-red);
    cursor: default;
    box-shadow: var(--red-glow-shadow);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .server-monitor {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .top-players {
        grid-template-columns: 1fr;
    }
}

/* Уведомления (вместо баннеров): левый верхний угол под шапкой, 10 сек */
.site-notifications {
    position: fixed;
    top: calc(72px + 10px);
    left: 12px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    pointer-events: none;
}
.site-notification {
    pointer-events: auto;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: site-notification-in 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
@keyframes site-notification-in {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.site-notification.success {
    background: rgba(76, 175, 80, 0.95);
    border: 1px solid #4CAF50;
    color: #fff;
}
.site-notification.error {
    background: rgba(244, 67, 54, 0.95);
    border: 1px solid #F44336;
    color: #fff;
}
.site-notification .site-notification-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.85;
    cursor: pointer;
    padding: 0 4px;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.site-notification .site-notification-close:hover {
    opacity: 1;
}
.site-notification .site-notification-text {
    flex: 1;
}

/* Вкладки профиля (Профиль, Пополнить, Платежи, Покупки) — в глобальном CSS, чтобы не было вспышки при переключении */
.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 700;
}
.profile-tab:hover {
    border-color: rgba(244, 67, 54, 0.45);
    color: #fff;
}
.profile-tab.active {
    background: rgba(244, 67, 54, 0.12);
    border-color: rgba(244, 67, 54, 0.55);
    color: #fff;
}
.profile-tab-badge {
    margin-left: 4px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

.discord-account-card {
    background: rgba(10, 10, 10, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.discord-account-body {
    display: flex;
    align-items: center;
    gap: 18px;
}

.discord-account-avatar-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    flex-shrink: 0;
}

.discord-account-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.discord-account-avatar-fallback {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ff6b6b;
    font-size: 38px;
}

.discord-account-avatar-fallback.is-visible,
.discord-account-avatar-wrap.discord-account-avatar-fallback-visible .discord-account-avatar-fallback {
    display: flex;
}

.discord-account-meta {
    flex: 1;
    min-width: 0;
}

.discord-account-name {
    color: var(--text-light);
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 600;
}

.discord-account-handle {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-top: 3px;
}

.discord-account-id {
    color: #d7dde3;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    font-size: 14px;
    word-break: break-all;
}

.discord-account-actions {
    display: inline-block;
}

@media (max-width: 640px) {
    .discord-account-body {
        align-items: flex-start;
    }

    .discord-account-avatar-wrap,
    .discord-account-avatar {
        width: 76px;
        height: 76px;
    }
}

/* Обёртка с фоновым изображением из настроек */
.site-content-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Заголовок в духе main-store (опционально для главной) */
.font-stalker-hero-title {
    font-family: '28 Days Later', 'Arial Black', sans-serif;
    font-weight: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.92),
        0 0 1px rgba(0, 0, 0, 1),
        0 0 36px rgba(244, 67, 54, 0.45);
}

/* ---------- Главная: секции как main-store ---------- */
.home-page {
    padding-bottom: 32px;
}

/* Главная без обёрток секций — только карточки и сетки, ровный вертикальный шаг */
.home-page--cards-only {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4.6vw, 3.5rem);
}

.home-page--cards-only .stats-grid,
.home-page--cards-only .news-grid,
.home-page--cards-only .server-monitor {
    margin-top: 0;
    margin-bottom: 0;
}

.home-page--cards-only .home-cta-inner.card {
    margin-bottom: 0;
}

.home-cards-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
    padding: 1.25rem 1rem;
}

.home-page--cards-only .home-cards-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Страница статистики: только контентные блоки без внешней card-рамки */
.page-stats .stats-panel,
.page-top .stats-panel {
    margin: 0;
    padding: 0;
}

.page-stats .card-header,
.page-top .card-header {
    border-bottom: var(--border-card-muted);
    padding-left: 0;
    padding-right: 0;
}

.stats-panel--player {
    margin-top: 20px;
}

.stats-panel__body {
    padding: 20px;
}

.player-server-block {
    margin-bottom: 56px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.player-server-title {
    color: var(--text-light);
    margin: 0 0 22px 0;
    padding-bottom: 10px;
    border-bottom: var(--border-card-muted);
    font-size: 22px;
}

.player-stats-grid {
    margin-bottom: 18px;
}

.stats-meta-note {
    color: var(--text-dark);
    margin-left: 10px;
}

.player-discord-note__muted {
    color: var(--text-dark);
}

.home-page--cards-only .section-head {
    text-align: left;
    margin-bottom: 1rem;
}

.home-page--cards-only .section-head .section-eyebrow {
    text-align: left;
}

.home-page--cards-only .section-title {
    text-align: left;
    margin-bottom: 0;
}

.home-page .home-hero {
    margin-bottom: 28px;
}

/* Не увеличиваем промежуток между hero и первым блоком (мониторинг) */
.home-page--cards-only > .home-hero + .home-cards-section {
    margin-top: calc(-1 * clamp(0.75rem, 1.6vw, 1.25rem));
}

.home-section {
    margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.home-page .home-section > .card {
    margin-bottom: 0;
}

.section-head--split {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 1.5rem;
    text-align: left;
    margin-bottom: 1.25rem;
}

.section-head--split .section-eyebrow {
    text-align: left;
}

.section-head--split .section-title {
    text-align: left;
    margin-bottom: 0;
}

.section-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.home-server-meta {
    font-size: 12px;
    color: var(--theme-gray-500);
    white-space: nowrap;
}

.home-refresh-btn {
    padding: 10px;
    font-size: 18px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.home-news-all {
    align-self: center;
}

.home-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.home-calendar-card {
    background: var(--theme-gray-800);
    border: var(--border-card-muted);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-calendar-card:hover {
    border-color: rgba(244, 67, 54, 0.28);
    box-shadow: var(--shadow-card-hover);
}

.home-calendar-card__dates {
    color: var(--accent-red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.home-calendar-card__title {
    color: var(--text-light);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.35;
}

.home-calendar-card__desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.home-project-stats {
    gap: 18px;
}

.home-cta {
    margin-top: 8px;
    margin-bottom: 8px;
}

.home-page--cards-only #home-news + .home-cta-inner,
.home-page--cards-only #home-stats + .home-cta-inner,
.home-page--cards-only #home-events + .home-cta-inner {
    margin-top: clamp(1.4rem, 3vw, 2.3rem);
}

.home-cta-inner {
    text-align: center;
    padding: clamp(1rem, 2.2vw, 1.5rem) 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.home-cta-inner--fullwidth-overlay {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: clamp(1.35rem, 2.8vw, 2rem) 0;
    background: rgba(10, 10, 10, 0.56);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
}

.home-cta-title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #fff;
}

.home-cta-text {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 520px;
    margin: 0 auto 22px;
    line-height: 1.5;
}

.home-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* ---------- Магазин: layout как main-store ---------- */
.page-shop {
    --shop-sticky-top: 64px;
    --shop-server-row-height: 78px;
}

.page-shop .shop-page-header {
    margin-bottom: 28px;
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.shop-page-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
    color: #fff;
}

.shop-page-sub {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.shop-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.shop-main {
    width: 100%;
}

.shop-content-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-top: 0;
}

.shop-products-panel {
    flex: 1;
    min-width: 0;
}

@media (min-width: 1024px) {
    .shop-content-layout .shop-sidebar {
        flex: 0 0 220px;
        position: sticky;
        top: calc(var(--shop-sticky-top) + 14px);
        margin-bottom: 0;
        align-self: flex-start;
        z-index: 35;
    }

    .shop-category-rail--mobile {
        display: none;
    }
}

@media (max-width: 1023px) {
    .shop-content-layout {
        display: block;
        margin-top: 0;
    }

    .shop-content-layout .shop-sidebar {
        display: none;
    }
}

.shop-sidebar {
    padding: 18px 16px;
    background: var(--surface-card-soft);
    border: var(--border-card);
    border-radius: var(--radius-card-lg);
    margin-bottom: 20px;
}

.shop-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--theme-gray-500);
    margin: 0 0 14px;
}

.shop-category-nav--vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shop-cat-link {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.shop-cat-link:hover {
    border-color: rgba(244, 67, 54, 0.25);
    color: #fff;
    background: rgba(244, 67, 54, 0.06);
}

.shop-server-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
    overflow-x: hidden;
    position: static;
    top: auto;
    z-index: 1;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.shop-server-chip {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    color: var(--text-light);
    background: var(--theme-gray-800);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

@media (max-width: 1200px) {
    .shop-server-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .page-shop {
        --shop-sticky-top: 56px;
        --shop-server-row-height: 72px;
    }

    .shop-server-strip {
        grid-template-columns: 1fr;
    }
}

.shop-server-chip:hover {
    border-color: rgba(244, 67, 54, 0.45);
    background: rgba(26, 26, 26, 0.95);
}

.shop-server-chip__icon {
    font-size: 13px;
    opacity: 0.65;
    color: var(--accent-red);
}

.shop-server-chip__name {
    font-size: 15px;
    font-weight: 700;
    width: 100%;
    line-height: 1.25;
}

.shop-server-chip__players {
    font-size: 13px;
    color: var(--text-muted);
}

.shop-category-rail {
    margin-bottom: 22px;
    padding: 14px 16px;
    background: var(--surface-card-soft);
    border: var(--border-card);
    border-radius: var(--radius-card);
}

.shop-category-rail__inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-category-rail__btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--theme-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.shop-category-rail__btn:hover {
    border-color: rgba(244, 67, 54, 0.5);
    background: rgba(244, 67, 54, 0.1);
    color: #fff;
}

.shop-category-rail__scroll {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.shop-category-rail__scroll::-webkit-scrollbar {
    display: none;
}

.shop-cat-pill {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.shop-cat-pill:hover:not(.active) {
    color: var(--accent-red);
}

.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 1400px) {
    .shop-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .shop-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .shop-products-grid {
        grid-template-columns: 1fr;
    }
}

.page-shop .shop-item-card {
    background: var(--surface-card);
    border: var(--border-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.page-shop .shop-item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(244, 67, 54, 0.22);
}

.shop-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 48px 16px;
    font-size: 15px;
}

.shop-fallback-banner {
    margin-bottom: 16px;
}

.shop-alert {
    margin-bottom: 18px;
    padding: 16px 20px;
    border-radius: var(--radius-card);
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shop-alert--warn {
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.45);
}

.shop-alert--info {
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.35);
}

.shop-alert__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.shop-alert--warn .shop-alert__icon {
    color: #ff9800;
}

.shop-alert--info .shop-alert__icon {
    color: var(--accent-red);
}
