/* Header */
.header {
    background: linear-gradient(to bottom, rgba(5, 5, 7, 0.98), rgba(3, 3, 5, 0.98));
    border-bottom: 2px solid rgba(224, 36, 36, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px 20px;
    flex-wrap: nowrap;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-red-light);
    text-decoration: none;
    flex-shrink: 0;
}
.logo span {
    color: white;
}
.logo-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.2;
}
.logo-title {
    font-family: 'Bebas Neue', 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.12em;
    color: #fff;
    white-space: nowrap;
}
.logo-subtitle {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-red-light);
    margin-top: 2px;
}
.logo:hover .logo-title,
.logo:hover .logo-subtitle {
    color: var(--color-red-light);
}
.logo-text .logo-title {
    color: #fff;
}
.logo-text .logo-subtitle {
    color: rgba(224, 36, 36, 0.9);
}
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s;
}
.nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}
.nav a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}
.nav a:hover {
    color: var(--text-primary);
    background-color: rgba(224, 36, 36, 0.12);
    border-color: rgba(224, 36, 36, 0.25);
}
.nav a:focus-visible {
    outline: none;
    border-color: rgba(224, 36, 36, 0.5);
    box-shadow: 0 0 0 2px rgba(224, 36, 36, 0.2);
}
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}
/* Переключатель темы (в личном кабинете) */
.theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(224, 36, 36, 0.4);
}
.theme-toggle .theme-toggle-icon {
    line-height: 1;
}
.theme-toggle .theme-toggle-icon[hidden] {
    display: none;
}
.btn-link {
    color: var(--text-secondary);
}
.btn-link:hover {
    color: white;
}

/* Footer: блоки ссылок, логотип, слоган */
.footer {
    background: radial-gradient(circle at top, rgba(224, 36, 36, 0.2), transparent 55%),
                linear-gradient(to top, #050508, #090910);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-container {
    color: var(--text-secondary);
}
.footer-brand {
    text-align: center;
    margin-bottom: 2rem;
}
.footer-logo {
    display: inline-block;
    font-family: 'Orbitron', 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 0.35rem;
}
.footer-logo:hover {
    color: var(--color-red-light);
}
.footer-logo-sub {
    color: var(--color-red-light);
    font-weight: 500;
}
.footer-slogan {
    font-size: 0.9rem;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.5;
    opacity: 0.9;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
    margin-bottom: 2rem;
}
.footer-nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.footer-nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-red-light);
    margin-bottom: 0.25rem;
}
.footer-nav-group a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 2px 0;
}
.footer-nav-group a:hover {
    color: var(--color-red-light);
}
.footer-bottom {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-copy {
    font-size: 0.85rem;
    margin: 0;
}
.footer-heart {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-red-light);
}
@media (max-width: 640px) {
    .footer-nav { gap: 1.5rem 2rem; }
    .footer-slogan { font-size: 0.85rem; }
}

/* Hero – главный сталкерский баннер */
.hero {
    position: relative;
    padding: 80px 0 70px;
    background:
        radial-gradient(circle at 10% 0, rgba(224, 36, 36, 0.32), transparent 60%),
        linear-gradient(135deg, #050508 0%, #08090f 45%, #0b0c14 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(-120deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 120px 120px;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.hero-title {
    font-family: 'Bebas Neue', 'Orbitron', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow: 0 0 24px rgba(224, 36, 36, 0.8), 0 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 12px;
}

.hero-subtitle {
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 1rem;
    text-transform: none;
}

.hero-buttons {
    margin-top: 26px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Декоративная иконка «радиация» в hero */
.hero-radiation {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    opacity: 0.5;
    z-index: 0;
    animation: rotateSlow 30s linear infinite;
}
.hero-radiation svg {
    width: 100%;
    height: 100%;
}

/* Секция с отступами (используем переменные) */
.section-pad {
    padding: var(--section-pad-top, 2.5rem) 0 var(--section-pad-bottom, 3rem);
}
@media (max-width: 768px) {
    .section-pad {
        padding: var(--section-pad-top-mobile, 1.75rem) 0 var(--section-pad-bottom-mobile, 2rem);
    }
}

/* Сетка фич */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.feature-card {
    text-align: center;
    padding: 28px 20px;
}
a.feature-card {
    color: inherit;
    text-decoration: none;
    display: block;
}
.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}
.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* Хлебные крошки */
.breadcrumb {
    margin-bottom: 1rem;
}
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}
.breadcrumb-item a:hover {
    color: var(--color-red-light);
}
.breadcrumb-sep {
    color: rgba(255,255,255,0.35);
    user-select: none;
}
.breadcrumb-item--current span {
    color: var(--text-primary);
}

/* Auth: форма входа/регистрации */
.auth-section .container {
    max-width: 440px;
}
.auth-card {
    padding: 32px 28px;
}
.auth-card h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.auth-form .form-group {
    margin-bottom: 16px;
}
.auth-form .form-group input {
    width: 100%;
}
.auth-form button[type="submit"] {
    margin-top: 8px;
    margin-bottom: 16px;
}
.auth-divider {
    text-align: center;
    color: var(--text-secondary);
    margin: 16px 0;
    font-size: 0.9rem;
}
.auth-google-btn {
    display: inline-block;
    text-align: center;
    width: 100%;
    margin-bottom: 16px;
}
.auth-switch {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.auth-switch a {
    font-weight: 600;
}

/* Профиль */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.profile-main,
.profile-subscription {
    padding: 24px;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.profile-avatar {
    flex-shrink: 0;
}
.profile-avatar img,
.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}
.profile-info h2 {
    margin-bottom: 6px;
    font-size: 1.5rem;
}
.profile-tier {
    margin-bottom: 4px;
}
.profile-rating {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.profile-last-matches {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.profile-last-matches h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}
.last-matches-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}
.last-matches-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.last-matches-list li:last-child {
    border-bottom: none;
}
.last-match-result {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
}
.last-match-result--win {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-green, #22c55e);
}
.last-match-result--loss {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red, #ef4444);
}
.last-match-result--dispute,
.last-match-result--other {
    background: rgba(234, 179, 8, 0.2);
    color: var(--accent-amber, #eab308);
}
.profile-stat {
    text-align: center;
}
.profile-stat span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.profile-stat strong {
    font-size: 1.25rem;
    color: var(--text-primary);
}
.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.profile-subscription h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}
.profile-subscription p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Галочки и цветные ники в шапке и профиле */
.username-badges-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
a.username-link,
a.username-badges-wrap {
    color: inherit;
    text-decoration: none;
}
a.username-link:hover,
a.username-badges-wrap:hover {
    text-decoration: underline;
}
.badge-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-check::after {
    content: "✓";
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.badge-check--official {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.badge-check--verified {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}
.badge-check--media {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}
/* Префикс к нику (за достижения) */
.username-prefix {
    font-size: 0.85em;
    color: var(--text-secondary, #94a3b8);
    margin-right: 4px;
}
/* Тег сотрудника (только для staff) */
.staff-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}
.staff-tag--owner {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.staff-tag--developer {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}
.staff-tag--media {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #1c1917;
}
.staff-tag--moderator {
    background: linear-gradient(135deg, #64748b, #475569);
    color: #fff;
}
/* Чат лобби матча */
.lobby-msg {
    padding: 4px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lobby-msg:last-child { border-bottom: none; }
.lobby-msg-user { font-weight: 600; color: var(--text-secondary, #94a3b8); }
.lobby-msg-time { font-size: 0.75rem; color: var(--text-secondary, #64748b); margin-left: 6px; }
.lobby-msg--me .lobby-msg-user { color: var(--color-green-light, #86efac); }
.lobby-msg--subscribed { border-left: 3px solid rgba(255, 180, 50, 0.6); padding-left: 6px; }
.lobby-msg--subscribed .lobby-msg-user { color: var(--stalker-amber, rgba(255, 180, 50, 0.9)); }
.lobby-msg-empty { color: var(--text-secondary); font-style: italic; }

.badge-premium {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(234, 179, 8, 0.3));
    color: #c4b5fd;
    margin-left: 4px;
}
.badge-premium-pro {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: linear-gradient(90deg, #e02424, #f59e0b, #22c55e, #3b82f6, #8b5cf6);
    background-size: 200% 100%;
    animation: usernameRainbow 4s linear infinite;
    color: #fff;
    margin-left: 4px;
    font-weight: 600;
}

/* Бейдж уровня (1–100) — классический прямоугольный */
.badge-level {
    font-weight: 700;
    min-width: 2em;
    background: linear-gradient(135deg, rgba(224, 36, 36, 0.35), rgba(139, 92, 246, 0.25));
    color: #f9fafb;
}

/* ——— Ранг (1–100): круг с дугой прогресса, стиль Stalcraft ——— */
.rank-ring {
    --pct: 0;
    --rank-color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rank-ring-arc {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 100%;
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--rank-color) calc(var(--pct, 0) * 3.6deg), #1a1d24 0);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), inset 0 0 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.rank-ring-inner {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: linear-gradient(180deg, #0d0e12 0%, #111217 100%);
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.rank-ring-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--rank-color);
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 20px rgba(224, 36, 36, 0.3);
    pointer-events: none;
    z-index: 1;
}
.rank-ring--sm .rank-ring-arc { width: 32px; height: 32px; }
.rank-ring--sm .rank-ring-num { font-size: 0.75rem; }
.rank-ring--sm .rank-ring-inner { inset: 10%; }
.rank-ring--md .rank-ring-arc { width: 48px; height: 48px; }
.rank-ring--md .rank-ring-num { font-size: 1rem; }
.rank-ring--lg .rank-ring-arc { width: 72px; height: 72px; }
.rank-ring--lg .rank-ring-num { font-size: 1.5rem; }
.rank-ring--xl .rank-ring-arc { width: 96px; height: 96px; }
.rank-ring--xl .rank-ring-num { font-size: 2rem; }
/* Градация ранга: от тёмно-красного к яркому янтарному */
.rank-ring--rank-1 { --rank-color: #7f1d1d; }
.rank-ring--rank-2 { --rank-color: #b91c1c; }
.rank-ring--rank-3 { --rank-color: #dc2626; }
.rank-ring--rank-4 { --rank-color: #ea580c; }
.rank-ring--rank-5 { --rank-color: #f59e0b; }

/* ——— Тир лиги (T5–T1): такой же круг + дуга прогресса очков тира ——— */
.tier-ring {
    --pct: 0;
    --tier-color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tier-ring-arc {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 100%;
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--tier-color) calc(var(--pct, 0) * 3.6deg), #1a1d24 0);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), inset 0 0 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.tier-ring-inner {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: linear-gradient(180deg, #0d0e12 0%, #111217 100%);
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.tier-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--tier-color);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.02em;
    pointer-events: none;
    z-index: 1;
}
.tier-ring--sm .tier-ring-arc { width: 32px; height: 32px; }
.tier-ring--sm .tier-ring-label { font-size: 0.6rem; }
.tier-ring--sm .tier-ring-inner { inset: 10%; }
.tier-ring--md .tier-ring-arc { width: 48px; height: 48px; }
.tier-ring--md .tier-ring-label { font-size: 0.75rem; }
.tier-ring--lg .tier-ring-arc { width: 72px; height: 72px; }
.tier-ring--lg .tier-ring-label { font-size: 1.1rem; }
.tier-ring--xl .tier-ring-arc { width: 96px; height: 96px; }
.tier-ring--xl .tier-ring-label { font-size: 1.5rem; }
.tier-ring--t5 { --tier-color: #6b7280; }
.tier-ring--t4 { --tier-color: #16a34a; }
.tier-ring--t3 { --tier-color: #2563eb; }
.tier-ring--t2 { --tier-color: #9333ea; }
.tier-ring--t1 { --tier-color: #dc2626; }

/* Бейджи тиров (T5–T1, киберспорт) */
.badge-tier {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}
.badge-tier--t5 { background: rgba(107, 114, 128, 0.5); color: #d1d5db; }
.badge-tier--t4 { background: rgba(34, 197, 94, 0.35); color: #86efac; }
.badge-tier--t3 { background: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.badge-tier--t2 { background: rgba(168, 85, 247, 0.35); color: #c4b5fd; }
.badge-tier--t1 { background: linear-gradient(135deg, rgba(224, 36, 36, 0.5), rgba(245, 158, 11, 0.4)); color: #fef3c7; }
.badge-placement {
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 2rem;
    background: rgba(224, 36, 36, 0.25);
    color: var(--color-red-light);
}

/* Турниры: блок бейджей на карточке, интро */
.tournament-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.tournaments-intro {
    max-width: 720px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.tournaments-intro a {
    color: var(--color-red-light);
}

/* ---- Единый дизайн тултипов (плашки при наведении) ---- */
:root {
    --tooltip-bg: rgba(22, 24, 30, 0.98);
    --tooltip-border: rgba(255, 255, 255, 0.1);
    --tooltip-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.06);
    --tooltip-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

.tooltip-wrap {
    position: relative;
    display: inline-flex;
    cursor: help;
}
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    z-index: 10001;
    min-width: 180px;
    max-width: 280px;
    padding: 10px 14px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-primary);
    background: var(--tooltip-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--tooltip-border);
    border-radius: 8px;
    box-shadow: var(--tooltip-shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--tooltip-ease), visibility 0.2s var(--tooltip-ease), transform 0.2s var(--tooltip-ease);
    pointer-events: none;
    white-space: normal;
    text-align: center;
}
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--tooltip-border);
}
.tooltip-wrap:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.tooltip-content strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
.tooltip-content span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* Тултип через атрибут data-tooltip (заголовки таблиц, кнопки и т.д.) */
[data-tooltip] {
    position: relative;
    cursor: help;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    z-index: 10001;
    min-width: 160px;
    max-width: 260px;
    padding: 8px 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-primary);
    background: var(--tooltip-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--tooltip-border);
    border-radius: 8px;
    box-shadow: var(--tooltip-shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--tooltip-ease), visibility 0.2s var(--tooltip-ease), transform 0.2s var(--tooltip-ease);
    pointer-events: none;
    white-space: normal;
    text-align: center;
}
[data-tooltip]::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--tooltip-border);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--tooltip-ease), visibility 0.2s var(--tooltip-ease);
}
[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}
[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(0);
}
/* Тултип для th — показывать снизу */
th[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
}
th[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(0);
}
th[data-tooltip]::before {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--tooltip-border);
}
/* Элементы с title — единообразный вид нативного тултипа не меняем; кастомные плашки выше */
[title]:not([data-tooltip]):not(.tooltip-wrap *) {
    cursor: default;
}

/* ---- Единый дизайн выпадающих списков (select) ---- */
select.form-control,
select:not([multiple]) {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 2rem 0.55rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='rgba(255,255,255,0.6)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
select.form-control:hover,
select:not([multiple]):hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: rgba(0, 0, 0, 0.45);
}
select.form-control:focus,
select:not([multiple]):focus {
    outline: none;
    border-color: rgba(224, 36, 36, 0.5);
    box-shadow: 0 0 0 2px rgba(224, 36, 36, 0.15);
}
select.form-control option,
select option {
    background: #16181e;
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
}
/* Специфичные селекты без класса form-control (дашборд, формы жалоб) */
select[name="pm_ban_days"],
select[name="chat_ban_days"],
select[name="status"],
select[name="category"],
select[name="reason"],
select#report-reason,
select#reply-template-select,
select#id_avatar_frame,
select#id_favorite_map_1,
select#id_favorite_map_2,
select#id_favorite_map_3 {
    padding: 0.55rem 2rem 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='rgba(255,255,255,0.6)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
select.pm-report-reason-select {
    padding: 0.5rem 1.75rem 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

.username-colored { color: var(--nick-color, var(--text-primary)); }
.username-rainbow {
    background: linear-gradient(90deg, #e02424, #f59e0b, #22c55e, #3b82f6, #8b5cf6, #ec4899, #e02424);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: usernameRainbow 6s linear infinite;
}
@keyframes usernameRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}
.header .username-badges-wrap { gap: 4px; }
.header .username-display { font-weight: 600; }
.header .username-display.username-rainbow { font-weight: 700; }

/* Информационные страницы (FAQ, О проекте, Кодекс) */
.info-page .container--narrow {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
.info-page .content-card {
    padding: 2rem 2.25rem;
}
.info-page .content-card + .content-card {
    margin-top: 1.5rem;
}
.info-page .content-section {
    margin-bottom: 2rem;
}
.info-page .content-section:last-child {
    margin-bottom: 0;
}
.info-page .content-section h2 {
    font-size: var(--h2-size);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.info-page .content-section h3 {
    font-size: var(--h3-size);
    margin: 1.25rem 0 0.5rem;
    color: var(--text-primary);
}
.info-page .content-section p,
.info-page .content-section li {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}
.info-page .content-section ul {
    margin: 0.5rem 0 1rem 1.25rem;
}
.info-page .content-section a {
    color: var(--color-red-light);
    text-decoration: none;
}
.info-page .content-section a:hover {
    text-decoration: underline;
}
.info-page .content-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.info-page .faq-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-red-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.75rem 0 0.75rem;
}
.info-page .faq-group-title:first-child {
    margin-top: 0;
}
/* Группировка пар dt/dd в карточки */
.info-page .faq-dl--grouped {
    margin-bottom: 1rem;
}
.info-page .faq-dl--grouped .faq-dt {
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    transition: border-color 0.2s, background 0.2s;
}
.info-page .faq-dl--grouped .faq-dt:first-of-type {
    margin-top: 0;
}
.info-page .faq-dl--grouped .faq-dd {
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.98rem;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    border-top: 1px solid var(--border-color);
    transition: border-color 0.2s;
}
.info-page .faq-dl--grouped .faq-dt:hover,
.info-page .faq-dl--grouped .faq-dd:hover {
    border-color: var(--color-gray-light);
}
.info-page .faq-dl--grouped .faq-dt:hover + .faq-dd {
    border-color: var(--color-gray-light);
}
.info-page .stat-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}
.info-page .stat-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}
.info-page .stat-list li:last-child {
    border-bottom: none;
}
.info-page .stat-list strong {
    color: var(--text-primary);
    min-width: 220px;
}
.info-page .highlight-box {
    background: rgba(224, 36, 36, 0.08);
    border: 1px solid rgba(224, 36, 36, 0.25);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}
.info-page .highlight-box p {
    margin: 0;
}

/* FAQ (legacy and new) */
.faq-list {
    padding: 24px 28px;
}
.faq-dl {
    margin: 0;
}
.faq-dl dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    font-size: 1.05rem;
}
.faq-dl dt:first-child {
    margin-top: 0;
}
.faq-dl dd {
    margin: 8px 0 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 0;
}

/* Таблица рейтинга */
.table-wrap {
    padding: 0 !important;
    overflow: hidden;
}
.table-wrap .table-responsive {
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}
.leaderboard-table {
    font-size: 0.95rem;
    border-collapse: collapse;
    width: 100%;
}
.leaderboard-table thead {
    background: rgba(10, 10, 12, 0.95);
    position: relative;
    z-index: 2;
}
.leaderboard-table thead th {
    padding: 14px 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    border-bottom: 2px solid rgba(224, 36, 36, 0.4);
    vertical-align: middle;
    text-align: left;
    color: #fff;
    font-weight: 600;
}
.leaderboard-table tbody tr {
    background: rgba(0, 0, 0, 0.2);
}
.leaderboard-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}
.leaderboard-row-me {
    background: rgba(224, 36, 36, 0.12);
    border-left: 3px solid var(--color-red);
}
/* Топ-3 в рейтинге: подсветка строк */
.leaderboard-table tbody tr.leaderboard-top-3 {
    border-left: 3px solid transparent;
}
.leaderboard-table tbody tr.leaderboard-top-1 {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(0,0,0,0.2) 100%);
    border-left-color: #f59e0b;
}
.leaderboard-table tbody tr.leaderboard-top-2 {
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.15) 0%, rgba(0,0,0,0.2) 100%);
    border-left-color: #cbd5e1;
}
.leaderboard-table tbody tr.leaderboard-top-3 {
    background: linear-gradient(90deg, rgba(180, 83, 9, 0.2) 0%, rgba(0,0,0,0.2) 100%);
    border-left-color: #b45309;
}
.leaderboard-col-rank {
    width: 3rem;
    text-align: center;
}
.leaderboard-medal {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
}
.leaderboard-medal--1 { filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)); }
.leaderboard-medal--2 { filter: drop-shadow(0 0 6px rgba(203, 213, 225, 0.5)); }
.leaderboard-medal--3 { filter: drop-shadow(0 0 6px rgba(180, 83, 9, 0.6)); }
.rating-num {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--color-red-light);
}
.empty-row {
    text-align: center;
    padding: 48px 20px !important;
    color: var(--text-secondary);
    font-style: italic;
}

/* Пустые списки: иконка + призыв к действию */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.empty-state-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}
.empty-state-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.empty-state-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.empty-state .btn-primary,
.empty-state .btn-outline {
    margin-top: 0.25rem;
}


@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        padding: 12px;
        min-width: 48px;
        min-height: 48px;
        align-items: center;
        justify-content: center;
    }
    .nav {
        display: none;
        position: fixed;
        inset: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 98;
        width: 100%;
        margin: 0;
        padding: 4rem 1.5rem 2rem;
        background: rgba(5, 5, 8, 0.97);
        backdrop-filter: blur(12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        overflow-y: auto;
    }
    .nav.active {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        visibility: visible;
    }
    .nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .nav a {
        display: block;
        padding: 14px 24px;
        min-height: 48px;
        line-height: 1.4;
        font-size: 1.1rem;
        border-radius: 8px;
        min-width: 200px;
        text-align: center;
    }
    .auth-buttons {
        order: 2;
    }
}