/* ===== StalCraft X — визуал 2026: стекло, меши, глубина ===== */

:root {
    --glass-bg: rgba(17, 18, 23, 0.72);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --glow-red: 0 0 60px rgba(224, 36, 36, 0.25), 0 0 120px rgba(224, 36, 36, 0.12);
}

/* Хедер в стиле стекла */
body.theme-2026 .header {
    background: rgba(5, 5, 7, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* Градиентный меш фона (многослойный) */
.body-bg-mesh {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}
.body-bg-mesh::before {
    content: "";
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(224, 36, 36, 0.22), transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(180, 20, 20, 0.18), transparent 45%),
        radial-gradient(ellipse 100% 40% at 50% 0%, rgba(224, 36, 36, 0.12), transparent 55%),
        conic-gradient(from 180deg at 50% 50%, rgba(224, 36, 36, 0.06) 0deg, transparent 60deg, rgba(224, 36, 36, 0.04) 120deg, transparent 180deg);
    animation: meshShift 20s ease-in-out infinite alternate;
}
@keyframes meshShift {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.08) rotate(2deg); opacity: 0.95; }
}

/* Зерно поверх всего (премиум-текстура) */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Стеклянные панели (карточки, хедер) */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 0 var(--glass-highlight),
        0 24px 48px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}
.glass-panel:hover {
    border-color: rgba(224, 36, 36, 0.35);
    box-shadow:
        inset 0 1px 0 0 var(--glass-highlight),
        0 24px 48px rgba(0, 0, 0, 0.4),
        var(--glow-red);
}

/* Hero: полноэкранный блок с градиентной маской */
.hero-v2 {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-v2 .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-v2 .hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 0.2em;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 200, 200, 0.95) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(224, 36, 36, 0.5));
}
.hero-v2 .hero-subtitle {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Кнопки с градиентной обводкой */
.btn-glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(224, 36, 36, 0.5);
    color: var(--text-primary);
}
.btn-glass::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 50%, rgba(224,36,36,0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.btn-glass:hover {
    border-color: var(--color-red-light);
    box-shadow: var(--glow-red);
}

/* ===== Единый стиль внутренних страниц (как Рейтинг): секции не налезают, красные рамки ===== */
body.page-inner {
    min-height: 100vh;
}
body.page-inner main {
    min-height: calc(100vh - 180px);
    position: relative;
}
.page-inner .hero--with-bg,
.page-inner .hero.hero--compact {
    overflow: hidden;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(224, 36, 36, 0.25);
}
.page-inner .section-pad {
    padding-top: var(--section-pad-top, 2.5rem);
    padding-bottom: var(--section-pad-bottom, 3rem);
}
@media (max-width: 768px) {
    .page-inner .section-pad {
        padding-top: var(--section-pad-top-mobile, 1.75rem);
        padding-bottom: var(--section-pad-bottom-mobile, 2rem);
    }
}
.page-inner .section-pad .container > * + * {
    margin-top: 1.25rem;
}
.page-inner .section-pad .container > .section-title {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.page-inner .section-pad .container > .section-title:first-child {
    margin-top: 0;
}
.page-inner .section-pad .container .news-list-grid,
.page-inner .section-pad .container .tournament-grid {
    margin-top: 0.5rem;
}
.page-inner .card.glass-panel {
    border: 1px solid rgba(224, 36, 36, 0.3);
    position: relative;
}
.page-inner .section-animated-bg {
    overflow: hidden;
    position: relative;
}
.page-inner .form-control,
.page-inner .matchmaking-select {
    border: 1px solid rgba(224, 36, 36, 0.35);
    background: rgba(0, 0, 0, 0.35);
}
.page-inner .form-control:focus,
.page-inner .matchmaking-select:focus {
    border-color: rgba(224, 36, 36, 0.6);
    outline: none;
}
/* Формы: фокус (клавиатурная навигация) и ошибки */
.form-control:focus-visible,
.matchmaking-select:focus-visible,
input:focus-visible:not([type="checkbox"]):not([type="radio"]),
textarea:focus-visible,
select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(224, 36, 36, 0.4);
}
.form-group.has-error .form-control,
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select,
.form-control.is-invalid,
input.is-invalid {
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.06);
}
.form-group.has-error .errorlist,
.form-group .errorlist,
.form-control.is-invalid + .errorlist {
    color: var(--color-red-light, #f87171);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    list-style: none;
    padding: 0;
}
/* Кнопка «Отправить» в состоянии загрузки */
.btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn--loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpinner 0.7s linear infinite;
}
@keyframes btnSpinner {
    to { transform: rotate(360deg); }
}

/* Скелетоны загрузки (пульсирующие плейсхолдеры) */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.2s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-block {
    height: 1em;
    margin-bottom: 0.5rem;
}
.skeleton-block--title { height: 1.4em; width: 70%; }
.skeleton-block--text { height: 0.9em; width: 100%; }
.skeleton-block--text.short { width: 60%; }
.skeleton-block--avatar { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto; }
.skeleton-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.skeleton-row .skeleton { flex: 1; height: 24px; }
.skeleton-table .skeleton-row:last-child { border-bottom: none; }
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; background: rgba(255,255,255,0.08); }
}

/* Рейтинг: отдельная секция без наложения — flex-колонка с жёсткими отступами */
.page-inner .section-leaderboard {
    position: relative;
    isolation: isolate;
    background: var(--bg-dark, #08080a);
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}
.page-inner .section-leaderboard .container {
    position: relative;
    z-index: 1;
}
.leaderboard-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.leaderboard-blocks > * {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Hero с фоновым изображением (атмосфера StalCraft X) */
.hero--with-bg {
    min-height: 320px;
    display: flex;
    align-items: center;
}
.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #0a0a0c;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.hero-bg-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,5,8,0.75) 0%, rgba(5,5,8,0.92) 70%, rgba(5,5,8,0.98) 100%);
    pointer-events: none;
}
/* Видео-фон на главной (вместо картинки) */
.hero-bg-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.hero-bg-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,5,8,0.75) 0%, rgba(5,5,8,0.92) 70%, rgba(5,5,8,0.98) 100%);
    pointer-events: none;
}
.hero--with-bg .hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.hero--with-bg .hero-deco {
    z-index: 1;
}
.hero--with-bg .hero-content {
    z-index: 2;
}
/* Крутящиеся кольца и объекты в hero с фоном (как на главной) */
.hero--with-bg .deco-spin-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}
.hero--with-bg .deco-spin-wrap .deco-ring {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(224, 36, 36, 0.25);
    border-radius: 50%;
    border-top-color: rgba(224, 36, 36, 0.6);
    animation: decoSpin 8s linear infinite;
}
.hero--with-bg .deco-spin-wrap .deco-ring--outer {
    position: absolute;
    inset: -20px;
    width: auto;
    height: auto;
    border-color: rgba(139, 92, 246, 0.2);
    border-right-color: rgba(139, 92, 246, 0.5);
    animation-duration: 12s;
    animation-direction: reverse;
}
/* Плавающие кубы */
.hero--with-bg .hero-cube {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(224, 36, 36, 0.3);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
.hero--with-bg .hero-cube--1 {
    left: 12%;
    top: 28%;
    animation: heroPageCube1 8s ease-in-out infinite;
}
.hero--with-bg .hero-cube--2 {
    right: 10%;
    bottom: 25%;
    animation: heroPageCube2 9s ease-in-out infinite 1s;
}
@keyframes heroPageCube1 {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.45; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}
@keyframes heroPageCube2 {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.4; }
    50% { transform: translateY(18px) rotate(-180deg) scale(1.08); opacity: 0.65; }
}
/* Сканлайн */
.hero--with-bg .hero-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(224, 36, 36, 0.5), transparent);
    box-shadow: 0 0 16px rgba(224, 36, 36, 0.4);
    z-index: 1;
    animation: heroScanline 5s linear infinite;
}
@keyframes heroScanline {
    0% { top: 0; opacity: 0.8; }
    100% { top: 100%; opacity: 0.8; }
}
/* Крутящийся символ радиации по центру */
.hero--with-bg .hero-radiation--spin {
    position: absolute;
    width: 140px;
    height: 140px;
    left: 50%;
    top: 50%;
    margin-left: -70px;
    margin-top: -70px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    animation: heroRadiationSpin 22s linear infinite;
}
.hero--with-bg .hero-radiation--spin svg {
    width: 100%;
    height: 100%;
}
@keyframes heroRadiationSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Орбы: лёгкое движение поверх фона */
.hero--with-bg .hero-orb--1 {
    animation: glowPulse 5s ease-in-out infinite, heroOrbFloat 12s ease-in-out infinite;
}
.hero--with-bg .hero-orb--2 {
    animation: glowPulse 6s ease-in-out infinite 1s, heroOrbFloat 10s ease-in-out infinite 0.5s;
}
.hero--with-bg .hero-orb--3 {
    animation: glowPulse 4s ease-in-out infinite 0.5s, heroOrbFloat 8s ease-in-out infinite 1s;
}
@keyframes heroOrbFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}
.hero--compact {
    min-height: 220px;
    padding-top: 50px;
    padding-bottom: 50px;
}
.hero-title--small {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

/* Список / таблица: строки с плавным появлением */
.reveal-row {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.reveal-row.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Индикатор поиска (пульсирующие кольца) */
.searching-rings {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}
.searching-rings::before,
.searching-rings::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid rgba(224, 36, 36, 0.4);
    border-radius: 50%;
    animation: ringPulse 2s var(--ease-out-quart) infinite;
}
.searching-rings::after {
    animation-delay: 0.5s;
    border-color: rgba(224, 36, 36, 0.6);
}
@keyframes ringPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Шаги поиска и пульсирующая полоска */
.matchmaking-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.matchmaking-step {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}
.matchmaking-step--current {
    color: var(--color-red-light);
    opacity: 1;
    font-weight: 600;
}
.matchmaking-step--done {
    opacity: 0.9;
    color: var(--color-green, #059669);
}
.matchmaking-steps--found .matchmaking-step--current { color: var(--color-green, #059669); }
.searching-pulse {
    width: 120px;
    height: 4px;
    margin: 1rem auto 1.5rem;
    background: linear-gradient(90deg, transparent, rgba(224, 36, 36, 0.5), transparent);
    border-radius: 2px;
    animation: searchingPulse 1.5s ease-in-out infinite;
}
@keyframes searchingPulse {
    0%, 100% { opacity: 0.4; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Полоска статуса на странице матча (ожидание результата) */
.match-status-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: rgba(224, 36, 36, 0.08);
    border: 1px solid rgba(224, 36, 36, 0.25);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.match-status-strip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-red-light);
    flex-shrink: 0;
    animation: statusDotPulse 1.5s ease-in-out infinite;
}
@keyframes statusDotPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Плавный скролл */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Матчмейкинг: карточка состояний */
.matchmaking-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 32px;
    text-align: center;
}
.matchmaking-state {
    transition: opacity 0.4s var(--ease-out-expo);
}
.matchmaking-label,
.matchmaking-found-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.matchmaking-select {
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(17, 18, 23, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin: 0 auto;
    display: block;
    cursor: pointer;
}
.matchmaking-select:focus {
    outline: none;
    border-color: rgba(224, 36, 36, 0.6);
}
.mode-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.mode-btn {
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.mode-btn:hover,
.mode-btn.selected {
    border-color: rgba(224, 36, 36, 0.6);
    box-shadow: 0 0 24px rgba(224, 36, 36, 0.25);
}
.mode-btn.selected {
    transform: scale(1.05);
}
.matchmaking-status {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.matchmaking-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.opponent-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}
.opponent-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.opponent-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.opponent-rating {
    font-size: 0.9rem;
    color: var(--color-red-light);
}
.matchmaking-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Турниры: сетка карточек */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
}
.tournament-card {
    padding: 0;
    text-align: left;
    overflow: hidden;
    transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease, border-color 0.3s ease;
}
.tournament-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35), 0 0 24px rgba(224, 36, 36, 0.08);
}
.tournament-card-image {
    height: 120px;
    background: linear-gradient(135deg, rgba(224, 36, 36, 0.15) 0%, rgba(224, 36, 36, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.9;
}
.tournament-card-body {
    padding: 20px 24px;
}
.tournament-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}
.tournament-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.tournament-prize {
    font-size: 0.9rem;
    color: var(--color-red-light);
    margin-bottom: 12px;
}
.tournament-card--past .tournament-prize { color: var(--text-secondary); }
.tournament-card--past .tournament-card-image { opacity: 0.5; }
.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
}

/* Поддержка: форма + список */
.support-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .support-layout { grid-template-columns: 1fr; }
}
.support-form-card,
.support-tickets {
    padding: 28px;
}
.support-form-card h2,
.support-tickets h2 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}
.ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ticket-item {
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.ticket-item:last-child { margin-bottom: 0; }
.ticket-item-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 14px 16px;
    color: inherit;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.ticket-item-link:hover {
    border-color: rgba(224, 36, 36, 0.4);
    background: rgba(224, 36, 36, 0.06);
    box-shadow: 0 0 20px rgba(224, 36, 36, 0.1);
}
.ticket-item-subject {
    flex: 1 1 100%;
    font-weight: 600;
}
@media (min-width: 500px) {
    .ticket-item-subject { flex: 1 1 auto; }
}
.ticket-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.ticket-item-category {
    font-size: 0.8rem;
    opacity: 0.9;
}
.ticket-date,
.ticket-item-arrow {
    margin-left: auto;
}
.ticket-item-arrow {
    opacity: 0.6;
    transition: transform 0.2s;
}
.ticket-item-link:hover .ticket-item-arrow {
    transform: translateX(4px);
    opacity: 1;
}
.badge--support { font-size: 0.75rem; }
.badge-amber {
    background: rgba(200, 140, 0, 0.25);
    color: #e6c84d;
}
.support-empty {
    padding: 28px 16px;
    text-align: center;
}
.support-empty-text {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* ----- Чат обращения (support_ticket_detail) ----- */
.support-detail-container {
    max-width: 720px;
}
.support-back-link {
    margin-bottom: 1.5rem;
    display: inline-block;
}
.support-ticket-detail {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.support-chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.support-chat-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    font-size: 0.9rem;
}
.support-chat-category {
    color: var(--text-secondary);
}
.support-chat-created {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.support-chat-thread {
    padding: 1.25rem;
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.support-msg {
    max-width: 85%;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    position: relative;
}
.support-msg--user {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
}
.support-msg--staff {
    align-self: flex-end;
    background: rgba(224, 36, 36, 0.12);
    border: 1px solid rgba(224, 36, 36, 0.3);
    border-left-width: 4px;
}
.support-msg-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.support-msg--staff .support-msg-label { color: rgba(224, 36, 36, 0.95); }
.support-msg-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}
.support-msg-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.support-chat-reply {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
.support-chat-reply-title {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
}
.support-reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.support-reply-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: inherit;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s;
}
.support-reply-field textarea:focus {
    outline: none;
    border-color: rgba(224, 36, 36, 0.5);
    box-shadow: 0 0 0 2px rgba(224, 36, 36, 0.15);
}
.support-reply-submit {
    align-self: flex-start;
}
.support-chat-closed {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.support-chat-closed a {
    color: var(--color-red);
    text-decoration: none;
}
.support-chat-closed a:hover { text-decoration: underline; }

/* ----- Рейтинг: блок «моё место», тулбар, таблица ----- */
.leaderboard-my-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}
.leaderboard-my-label { font-weight: 600; }
.leaderboard-my-num {
    font-size: 1.5rem;
    color: var(--color-red-light);
}
.leaderboard-toolbar {
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}
.leaderboard-table-card {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 0 !important;
}
.leaderboard-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
.leaderboard-search .leaderboard-search-input { max-width: 280px; }
/* Вкладки рейтинга: По рейтингу / По тирам */
.leaderboard-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.leaderboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin: -0.25rem 0 0 0;
}
.leaderboard-tab {
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.leaderboard-tab:hover {
    color: var(--text-primary);
}
.leaderboard-tab--active {
    color: var(--color-red-light);
    border-bottom-color: var(--color-red-light);
}
.leaderboard-section-title {
    margin: 0 0 1rem 0;
    padding: 1rem 1.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}
/* Рейтинг по тирам: карточки по тирам */
.leaderboard-by-tiers {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.leaderboard-tiers-intro {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.leaderboard-tier-card {
    padding: 0 !important;
    overflow: hidden;
}
.leaderboard-tier-title {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}
.leaderboard-tier-name {
    color: var(--text-secondary);
    font-weight: 500;
}
.leaderboard-tier-card .table-responsive {
    padding: 0;
}
.leaderboard-table--compact thead th {
    padding: 10px 16px;
    font-size: 0.9rem;
}
.leaderboard-tier-card .leaderboard-table tbody td {
    padding: 10px 16px;
    font-size: 0.95rem;
}
.page-inner .leaderboard-table-card .table-responsive {
    padding: 0;
    margin: 0;
    min-height: 0;
}
.page-inner .leaderboard-table-card .leaderboard-table {
    margin: 0;
}

/* ----- Новости: карточки и детальная страница ----- */
.news-list-image-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-list-image-wrap:hover { opacity: 0.95; }
.news-list-time {
    display: block;
    font-size: 0.85rem;
    color: var(--color-red-light);
}
.news-list-title { margin: 0.35rem 0 0.5rem; }
.news-list-excerpt { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }
.news-detail-container { max-width: 720px; }
.news-detail-back { margin-bottom: 1rem; display: inline-block; }

/* ----- Играть: контейнер и карточка ----- */
.matchmaking-container { max-width: 560px; margin-left: auto; margin-right: auto; }
.matchmaking-card--enhanced { padding: 2rem; }

/* ----- Турниры: детальная страница ----- */
.tournament-detail-container { max-width: 720px; }
.tournament-detail-back { margin-bottom: 1rem; display: inline-block; }
.tournament-grid--ongoing .tournament-card { border-left: 3px solid rgba(0,200,100,0.5); }

/* ===== Глобальные визуальные улучшения: анимации, 3D, вращения, фоны ===== */
.page-zone-bg .body-bg-mesh::after {
    content: "";
    position: absolute;
    inset: -30%;
    pointer-events: none;
    background:
        radial-gradient(ellipse 40% 40% at 85% 15%, rgba(139, 92, 246, 0.12), transparent 45%),
        radial-gradient(ellipse 35% 35% at 10% 90%, rgba(224, 36, 36, 0.1), transparent 40%);
    animation: globalOrbFloat 25s ease-in-out infinite;
}
@keyframes globalOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    33% { transform: translate(3%, -2%) scale(1.05); opacity: 1; }
    66% { transform: translate(-2%, 2%) scale(0.98); opacity: 0.85; }
}
.page-floating-particles { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.page-floating-particles .particle {
    position: absolute; width: 4px; height: 4px; border-radius: 50%;
    background: rgba(224, 36, 36, 0.35); animation: particleFloat 15s ease-in-out infinite;
}
.page-floating-particles .particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.page-floating-particles .particle:nth-child(2) { left: 80%; top: 60%; animation-delay: -3s; }
.page-floating-particles .particle:nth-child(3) { left: 50%; top: 80%; animation-delay: -6s; }
.page-floating-particles .particle:nth-child(4) { left: 25%; top: 70%; animation-delay: -2s; }
.page-floating-particles .particle:nth-child(5) { left: 90%; top: 15%; animation-delay: -5s; }
.page-floating-particles .particle:nth-child(6) { left: 60%; top: 40%; animation-delay: -8s; }
@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    50% { transform: translate(20px, -30px); opacity: 0.8; }
}
.deco-spin-slow { position: absolute; pointer-events: none; animation: decoSpin 20s linear infinite; }
.deco-spin-slow--reverse { animation-direction: reverse; }
@keyframes decoSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.deco-ring {
    width: 120px; height: 120px; border: 2px solid rgba(224, 36, 36, 0.25); border-radius: 50%;
    border-top-color: rgba(224, 36, 36, 0.6); animation: decoSpin 8s linear infinite;
}
.deco-ring--outer {
    border-color: rgba(139, 92, 246, 0.2); border-right-color: rgba(139, 92, 246, 0.5);
    animation-duration: 12s; animation-direction: reverse;
}
.hero .deco-spin-wrap {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 200px; height: 200px; pointer-events: none; z-index: 0; opacity: 0.25;
}
.hero .deco-spin-wrap .deco-ring { width: 100%; height: 100%; }
.hero .deco-spin-wrap .deco-ring--outer { position: absolute; inset: -20px; width: auto; height: auto; }
.perspective-wrap-strong { perspective: 1000px; }
.card-3d-strong {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.card-3d-strong:hover {
    transform: rotateX(6deg) rotateY(-6deg) translateZ(16px) scale(1.02);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 40px rgba(224, 36, 36, 0.15);
}
.section-animated-bg { position: relative; overflow: hidden; }
.section-animated-bg::before {
    content: ""; position: absolute; inset: -20%; z-index: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(224, 36, 36, 0.06), transparent 60%);
    animation: sectionBgPulse 12s ease-in-out infinite; pointer-events: none;
}
.section-animated-bg .container, .section-animated-bg > * { position: relative; z-index: 1; }
@keyframes sectionBgPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Нижние секции: только анимации (орбы, сканлайн, пульс), без фоновых картинок */
.section-deco {
    position: relative;
    overflow: hidden;
}
.section-deco::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: 0;
    background: radial-gradient(ellipse 50% 40% at 20% 30%, rgba(224, 36, 36, 0.05), transparent 50%),
                radial-gradient(ellipse 60% 50% at 80% 70%, rgba(224, 36, 36, 0.04), transparent 55%);
    animation: sectionDecoPulse 14s ease-in-out infinite;
    pointer-events: none;
}
.section-deco::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    top: 0;
    z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(224, 36, 36, 0.2), transparent);
    box-shadow: 0 0 12px rgba(224, 36, 36, 0.15);
    animation: sectionDecoScan 10s linear infinite;
    pointer-events: none;
}
.section-deco .container,
.section-deco > * { position: relative; z-index: 1; }
@keyframes sectionDecoPulse {
    0%, 100% { opacity: 0.7; transform: scale(1) translate(0, 0); }
    33% { opacity: 1; transform: scale(1.05) translate(2%, 1%); }
    66% { opacity: 0.85; transform: scale(0.98) translate(-1%, 2%); }
}
@keyframes sectionDecoScan {
    0% { top: 0; opacity: 0.4; }
    5% { opacity: 0.7; }
    95% { opacity: 0.7; }
    100% { top: 100%; opacity: 0.4; }
}

.stagger-children > * {
    opacity: 0; transform: translateY(20px);
    animation: staggerIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
@keyframes staggerIn { to { opacity: 1; transform: translateY(0); } }
/* Stagger появление в сетках (карточки новостей, турниров, фич) */
.home-news-grid .animate-on-scroll:nth-child(1) { animation-delay: 0.05s; }
.home-news-grid .animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.home-news-grid .animate-on-scroll:nth-child(3) { animation-delay: 0.15s; }
.home-news-grid .animate-on-scroll:nth-child(4) { animation-delay: 0.2s; }
.home-news-grid .animate-on-scroll:nth-child(5) { animation-delay: 0.25s; }
.tournament-grid .animate-on-scroll:nth-child(1) { animation-delay: 0.05s; }
.tournament-grid .animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.tournament-grid .animate-on-scroll:nth-child(3) { animation-delay: 0.15s; }
.tournament-grid .animate-on-scroll:nth-child(4) { animation-delay: 0.2s; }
.features-grid .animate-on-scroll:nth-child(1) { animation-delay: 0.05s; }
.features-grid .animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.features-grid .animate-on-scroll:nth-child(3) { animation-delay: 0.15s; }
.features-grid .animate-on-scroll:nth-child(4) { animation-delay: 0.2s; }
.btn-primary:hover, .btn-glass:hover { animation: btnHoverGlow 1.5s ease-in-out infinite; }
@keyframes btnHoverGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(224, 36, 36, 0.3); }
    50% { box-shadow: 0 0 32px rgba(224, 36, 36, 0.5); }
}
.leaderboard-table tbody tr { transition: background 0.25s ease; }
.leaderboard-table tbody tr:hover { background: rgba(224, 36, 36, 0.06); }
.profile-main.card { animation: cardBorderBreath 4s ease-in-out infinite; }
@keyframes cardBorderBreath {
    0%, 100% { box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 24px 48px rgba(0,0,0,0.4); }
    50% { box-shadow: inset 0 1px 0 0 var(--glass-highlight), 0 24px 48px rgba(0,0,0,0.4), 0 0 30px rgba(224,36,36,0.08); }
}
.sub-plan-card { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease; }
.sub-plan-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0,0,0,0.4), 0 0 40px rgba(224, 36, 36, 0.12);
}
.sub-plan-card.featured:hover { box-shadow: 0 24px 48px rgba(0,0,0,0.4), 0 0 50px rgba(224, 160, 32, 0.2); }
@media (prefers-reduced-motion: reduce) {
    .page-zone-bg .body-bg-mesh::after, .section-animated-bg::before, .section-deco::before, .section-deco::after, .deco-spin-slow, .deco-ring,
    .page-floating-particles .particle { animation: none; }
    .hero--with-bg .hero-orb, .hero--with-bg .deco-spin-wrap .deco-ring,
    .hero--with-bg .hero-cube, .hero--with-bg .hero-scanline, .hero--with-bg .hero-radiation--spin { animation: none; }
    .card-3d-strong:hover, .sub-plan-card:hover { transform: none; }
    .stagger-children > * { animation: none; opacity: 1; transform: none; }
    .searching-pulse, .match-status-strip-dot { animation: none; opacity: 1; transform: none; }
}
