:root {
    --bg: #07090f;
    --bg-2: #0c111c;
    --panel: rgba(18, 24, 38, 0.7);
    --panel-solid: #121826;
    --border: rgba(120, 160, 255, 0.18);
    --text: #e6ecff;
    --muted: #8a96b3;
    --accent: #5cf2ff;
    --accent-2: #7c5cff;
    --accent-3: #ff5cae;
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #ef4444;
    --radius: 14px;
    --shadow: 0 20px 60px -20px rgba(92, 242, 255, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(60% 50% at 10% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
        radial-gradient(50% 40% at 100% 0%, rgba(92, 242, 255, 0.18), transparent 60%),
        radial-gradient(40% 40% at 50% 110%, rgba(255, 92, 174, 0.15), transparent 60%),
        linear-gradient(180deg, #07090f 0%, #0a0d18 100%);
    z-index: -2;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 160, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 160, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
    z-index: -1;
    pointer-events: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 14px; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 18px; }

p { color: var(--muted); margin: 0 0 12px; }

.container { width: min(1200px, 100% - 32px); margin: 0 auto; }

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(7, 9, 15, 0.65);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 20px; color: #fff;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.brand-logo {
    width: 36px; height: 36px; border-radius: 10px;
    background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
    display: grid; place-items: center;
    box-shadow: 0 6px 22px rgba(124, 92, 255, 0.45);
    font-size: 18px;
}
.nav-links { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav-links a, .nav-links button {
    color: var(--text); padding: 8px 14px; border-radius: 10px;
    background: transparent; border: 1px solid transparent; cursor: pointer; font: inherit;
    transition: 0.2s;
}
.nav-links a:hover, .nav-links button:hover { background: rgba(120, 160, 255, 0.1); border-color: var(--border); color: #fff; }
.nav-links .active { background: rgba(120, 160, 255, 0.12); border-color: var(--border); }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; border-radius: 12px;
    border: 1px solid var(--border); background: rgba(120, 160, 255, 0.08);
    color: #fff; font: inherit; font-weight: 600; cursor: pointer;
    transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.btn:hover { background: rgba(120, 160, 255, 0.15); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #07090f; border: none;
    box-shadow: 0 10px 30px -10px rgba(92, 242, 255, 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(124, 92, 255, 0.7); color: #07090f; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #fecaca; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.field label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .info-icon {
    width: 16px; height: 16px; border-radius: 50%; background: rgba(120, 160, 255, 0.2);
    display: inline-grid; place-items: center; font-size: 11px; cursor: help; color: var(--accent);
    position: relative;
}
.field .info-icon[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--panel-solid); border: 1px solid var(--border);
    padding: 8px 12px; border-radius: 8px; font-size: 12px; color: var(--text);
    white-space: normal; width: max-content; max-width: 260px;
    box-shadow: var(--shadow); z-index: 100;
}

.input, .textarea, .select {
    background: rgba(7, 9, 15, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 12px;
    font: inherit;
    width: 100%;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(92, 242, 255, 0.12);
    background: rgba(7, 9, 15, 0.85);
}
.textarea { min-height: 120px; resize: vertical; }

.card {
    background: var(--panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: rgba(120, 160, 255, 0.12); color: var(--text);
    border: 1px solid var(--border);
}
.badge.good   { background: rgba(74, 222, 128, 0.15); color: #bbf7d0; border-color: rgba(74, 222, 128, 0.35); }
.badge.warn   { background: rgba(251, 191, 36, 0.15); color: #fde68a; border-color: rgba(251, 191, 36, 0.35); }
.badge.bad    { background: rgba(239, 68, 68, 0.15);  color: #fecaca; border-color: rgba(239, 68, 68, 0.35); }
.badge.info   { background: rgba(92, 242, 255, 0.15); color: #a5f3fc; border-color: rgba(92, 242, 255, 0.35); }

.players-badge-ico {
    display: inline-flex;
    flex-shrink: 0;
}
.players-badge-ico svg {
    display: block;
    width: 14px;
    height: 14px;
    opacity: 0.92;
}

.hero {
    padding: 64px 0 28px;
    text-align: center;
}
.hero .glow {
    background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
    max-width: 640px;
    margin: 0 auto 20px;
    font-size: 17px;
    color: var(--muted);
}
.hero-lead strong { color: var(--text); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .hero-actions { display: none; }

.hero-slider {
    max-width: 720px;
    margin: 0 auto 24px;
    min-height: 5.2em;
    animation: fade-rise 0.5s ease 0.22s both;
}
.hero-slider-viewport {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(120, 160, 255, 0.12);
    background: rgba(7, 9, 15, 0.35);
    backdrop-filter: blur(8px);
}
.hero-slider-track {
    display: flex;
    width: 200%;
    animation: hero-slider-move 14s ease-in-out infinite;
}
.hero-slider-slide {
    width: 50%;
    flex: 0 0 50%;
    margin: 0;
    padding: 18px 20px;
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
    color: var(--muted);
    box-sizing: border-box;
}
.hero-slider-slide strong { color: var(--text); }

@keyframes hero-slider-move {
    0%, 40% { transform: translateX(0); }
    48%, 88% { transform: translateX(-50%); }
    96%, 100% { transform: translateX(0); }
}

.filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 1.15fr);
    gap: 12px;
    margin: 24px 0;
    align-items: stretch;
}
.filters .input {
    max-width: none;
    width: 100%;
    min-width: 0;
}

.catalog-category {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(7, 9, 15, 0.6);
    overflow: hidden;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}
.catalog-category:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(92, 242, 255, 0.12);
}
.cat-arrow {
    flex: 0 0 52px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: rgba(120, 160, 255, 0.06);
    color: var(--text);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.cat-arrow:hover {
    background: rgba(92, 242, 255, 0.14);
    color: var(--accent);
}
.cat-arrow:active {
    background: rgba(92, 242, 255, 0.22);
}
.cat-strip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    min-width: 0;
}
.cat-label {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}

.chip-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-suggestion {
    padding: 4px 10px; font-size: 12px;
    border-radius: 999px;
    background: rgba(120, 160, 255, 0.08);
    border: 1px dashed var(--border);
    color: var(--muted);
    cursor: pointer; transition: 0.2s;
}
.chip-suggestion:hover { background: rgba(92, 242, 255, 0.15); color: var(--accent); border-color: var(--accent); border-style: solid; }

.games-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin-bottom: 60px;
}
.game-card {
    background: var(--panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, border 0.2s, box-shadow 0.3s;
    display: flex; flex-direction: column;
    cursor: pointer;
    position: relative;
}
.game-card::before {
    content: '';
    position: absolute; inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, rgba(92, 242, 255, 0), rgba(124, 92, 255, 0));
    pointer-events: none; transition: 0.3s;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(92, 242, 255, 0.45); box-shadow: var(--shadow); }
.game-card:hover::before { background: linear-gradient(135deg, rgba(92, 242, 255, 0.08), rgba(124, 92, 255, 0.08)); }
.game-card .cover {
    aspect-ratio: 16 / 9;
    z-index: 1;
    background-color: #0a0e1a;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
/* <img> вместо background-image: надёжнее с backdrop-filter/overflow на карточке */
.game-card .cover .cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    display: block;
}
.game-card:hover .cover { transform: scale(1.05); }
.game-card .cover::after {
    content: ''; position: absolute; inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(7, 9, 15, 0.7));
}
.game-card .body { position: relative; z-index: 1; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h3 { margin: 0; color: #fff; font-size: 17px; }
.game-card .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.game-card .price { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-card .price .amount { font-size: 18px; font-weight: 700; color: var(--accent); }
.discount-tag {
    position: absolute; top: 12px; left: 12px;
    z-index: 2;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
    padding: 4px 10px; border-radius: 999px; font-weight: 700;
    font-size: 12px; color: #fff;
}

.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.stock-pill.stock-ok {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.28), rgba(74, 222, 128, 0.16));
    color: #d6ffe6;
    border-color: rgba(74, 222, 128, 0.7);
    box-shadow: 0 0 22px rgba(74, 222, 128, 0.45), inset 0 0 12px rgba(74, 222, 128, 0.1);
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}
.stock-pill.stock-empty {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.12));
    color: #ffd6d6;
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.25);
}
.stock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: stock-pulse 1.6s ease-out infinite;
}
@keyframes stock-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.75), 0 0 8px rgba(74, 222, 128, 0.9); }
    70%  { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0), 0 0 8px rgba(74, 222, 128, 0.9); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0), 0 0 4px rgba(74, 222, 128, 0.4); }
}

.star-rating {
    display: inline-flex;
    gap: 6px;
    user-select: none;
}
.star-rating .star {
    background: transparent;
    border: 0;
    padding: 0 2px;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.18);
    transition: transform 0.12s ease, color 0.12s ease, text-shadow 0.12s ease;
}
.star-rating .star:hover {
    transform: scale(1.18);
}
.star-rating .star.on {
    color: #facc15;
    text-shadow: 0 0 14px rgba(250, 204, 21, 0.65), 0 0 4px rgba(250, 204, 21, 0.9);
}

.stars-static {
    display: inline-flex;
    gap: 2px;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0;
}
.stars-static > span {
    color: rgba(255, 255, 255, 0.18);
}
.stars-static > span.on {
    color: #facc15;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.45);
}

.bundle-badge {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 191, 36, 0.1));
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.55);
    font-weight: 700;
}

.busy-info {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px dashed rgba(239, 68, 68, 0.35);
}

.game-card .cover .stock-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    font-size: 11px;
    padding: 6px 11px;
}

.toast-wrap { position: fixed; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; max-width: 340px; }
.toast {
    background: var(--panel-solid); border: 1px solid var(--border);
    padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow);
    animation: slide-in 0.25s ease;
}
.toast.success { border-color: rgba(74, 222, 128, 0.5); }
.toast.error   { border-color: rgba(239, 68, 68, 0.5); }
.toast .t-title { font-weight: 700; margin-bottom: 2px; }
.toast .t-text { font-size: 13px; color: var(--muted); }
.toast.toast-sticky { border-color: rgba(251, 191, 36, 0.5); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
@keyframes slide-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(3, 5, 10, 0.7);
    backdrop-filter: blur(8px); z-index: 100;
    display: grid; place-items: center; padding: 16px;
    animation: fade-in 0.2s;
}
.modal {
    background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; width: min(640px, 100%);
    max-height: 92vh; overflow-y: auto;
    box-shadow: var(--shadow);
    animation: pop 0.25s ease;
}
.modal h2 { margin-top: 0; }
.modal-close { float: right; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; }

.steam-agent-modal {
    width: min(520px, 100%);
}

.modal-actions {
    position: sticky;
    bottom: -24px;
    margin: 20px -24px -24px;
    padding: 14px 24px;
    background: linear-gradient(to top, var(--panel-solid) 70%, rgba(18, 24, 38, 0.85));
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    z-index: 5;
}
@media (max-width: 600px) {
    .modal-actions { flex-wrap: wrap; }
    .modal-actions .btn { flex: 1; min-width: 0; justify-content: center; }
}
@keyframes pop { from { transform: scale(0.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.empty {
    text-align: center; padding: 60px 16px; color: var(--muted);
    border: 1px dashed var(--border); border-radius: var(--radius);
}

.auth-page {
    min-height: calc(100vh - 80px);
    display: grid; place-items: center; padding: 40px 16px;
}
.auth-card { width: min(440px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 14px; }
.auth-switch { text-align: center; margin-top: 12px; font-size: 14px; color: var(--muted); }

.section { padding: 30px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

.row { display: grid; gap: 22px; }
.row.two { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 800px) {
    .row.two, .row.three { grid-template-columns: 1fr; }
    .nav-inner { flex-wrap: wrap; }
    .nav-links { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .nav-links a, .nav-links button { white-space: nowrap; }
    .hero { padding: 32px 0 16px; }
    .filters {
        grid-template-columns: 1fr;
    }
}

.game-page-hero {
    position: relative; padding: 40px 0;
    margin-bottom: 30px;
}
.game-page-hero .hero-bg {
    position: absolute; inset: -20px -20px 0; z-index: -1;
    background-size: cover; background-position: center; filter: blur(40px) saturate(1.2); opacity: 0.5;
    mask-image: linear-gradient(180deg, black, transparent);
}

/* Тест: трейлер на фоне страницы игры (game.js + video_url) */
body.game-trailer-bg #nav-root {
    position: relative;
    z-index: 50;
}
body.game-trailer-bg .footer {
    position: relative;
    z-index: 50;
}
#root {
    position: relative;
}
.game-bg-trailer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.game-bg-trailer__dim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse 120% 80% at 50% 20%, rgba(7, 9, 15, 0.45) 0%, rgba(7, 9, 15, 0.88) 55%, rgba(7, 9, 15, 0.94) 100%);
}
.game-bg-trailer__media {
    position: absolute;
    inset: -6%;
    width: 112%;
    height: 112%;
    z-index: 0;
}
.game-bg-trailer__media video,
.game-bg-trailer__media iframe {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    border: 0;
    object-fit: cover;
}
.game-page-stack {
    position: relative;
    z-index: 1;
}
.game-bg-trailer-badge {
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 60;
    pointer-events: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(124, 92, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}
@media (max-width: 640px) {
    .game-bg-trailer,
    .game-bg-trailer-badge {
        display: none;
    }
}
.gallery {
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
}
.gallery .main {
    aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
    background-color: #0a0e1a;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid var(--border); position: relative;
}
.gallery .main video, .gallery .main iframe { width: 100%; height: 100%; display: block; }
.gallery .thumbs {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
}
.gallery .thumbs .thumb {
    width: 110px; aspect-ratio: 16/9; flex: 0 0 auto;
    border-radius: 10px;
    background-color: #0a0e1a;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer; opacity: 0.7;
    border: 1px solid var(--border); transition: 0.2s;
}
.gallery .thumbs .thumb.active, .gallery .thumbs .thumb:hover { opacity: 1; border-color: var(--accent); }
.gallery .thumbs .thumb.video { position: relative; }
.gallery .thumbs .thumb.video::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }

.rent-card .price-big { font-size: 32px; font-weight: 800; color: var(--accent); }
.rent-card .hours-controls { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }

.range-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.range-row .label { color: var(--muted); font-size: 13px; }
.range-display {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #07090f;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 6px 22px -6px rgba(124, 92, 255, 0.6);
    min-width: 70px; justify-content: center;
}

.range {
    -webkit-appearance: none; appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(to right,
        var(--accent) 0%,
        var(--accent-2) var(--range-fill, 0%),
        rgba(120, 160, 255, 0.12) var(--range-fill, 0%),
        rgba(120, 160, 255, 0.12) 100%);
    outline: none;
    cursor: pointer;
    transition: background 0.1s;
    border: 1px solid var(--border);
}
.range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #e0e9ff 70%);
    border: 3px solid var(--accent);
    box-shadow:
        0 0 0 4px rgba(92, 242, 255, 0.18),
        0 6px 20px rgba(92, 242, 255, 0.5);
    cursor: grab;
    transition: transform 0.15s, box-shadow 0.2s;
}
.range::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow:
        0 0 0 6px rgba(92, 242, 255, 0.25),
        0 8px 28px rgba(124, 92, 255, 0.7);
}
.range:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.18); border-color: var(--accent-2); }
.range::-moz-range-thumb {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #e0e9ff 70%);
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(92, 242, 255, 0.18), 0 6px 20px rgba(92, 242, 255, 0.5);
    cursor: grab;
}
.range:focus { box-shadow: 0 0 0 3px rgba(92, 242, 255, 0.15); }

.range-ticks {
    position: relative; height: 8px; margin-top: -4px;
    pointer-events: none;
}
.range-ticks span {
    position: absolute; transform: translateX(-50%);
    width: 1px; height: 6px; background: rgba(120, 160, 255, 0.3);
}
.range-ticks .lbl {
    position: absolute; transform: translateX(-50%); top: 10px;
    width: auto; height: auto; background: transparent;
    color: var(--muted); font-size: 11px; white-space: nowrap;
}

/* === Глобальные скроллбары в стиле digital === */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
    background: rgba(7, 9, 15, 0.4);
    border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 10px;
    border: 2px solid rgba(7, 9, 15, 0.6);
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    border-color: rgba(7, 9, 15, 0.3);
}
*::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-color: var(--accent-2) rgba(7, 9, 15, 0.4); scrollbar-width: thin; }

.cabinet-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin: 24px 0 60px; }
.cabinet-side { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: max-content; }
.cabinet-side .menu { display: flex; flex-direction: column; gap: 4px; }
.cabinet-side .menu button {
    text-align: left; padding: 10px 12px; border-radius: 10px;
    background: transparent; border: 0; color: var(--text); cursor: pointer; font: inherit;
    transition: 0.2s;
}
.cabinet-side .menu button:hover { background: rgba(120, 160, 255, 0.08); }
.cabinet-side .menu button.active { background: rgba(92, 242, 255, 0.15); color: var(--accent); }
.cabinet-side .balance { margin: 0 0 12px; padding: 14px; border-radius: 12px; background: rgba(92, 242, 255, 0.06); border: 1px solid rgba(92, 242, 255, 0.2); }
.cabinet-side .balance .amount { font-size: 24px; font-weight: 700; color: var(--accent); }

@media (max-width: 800px) { .cabinet-grid { grid-template-columns: 1fr; } }

.rental-row {
    display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center;
    padding: 14px; border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 10px; background: rgba(7, 9, 15, 0.4);
}
.rental-row .rcover {
    width: 80px; height: 50px; border-radius: 8px;
    background-color: #0a0e1a;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
.rental-row .rtitle { font-weight: 600; }
.rental-row .rmeta { font-size: 13px; color: var(--muted); }
.rental-row .ractions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 600px) {
    .rental-row { grid-template-columns: 1fr; }
    .rental-row .rcover { width: 100%; height: 120px; }
    .rental-row .ractions { justify-content: flex-end; }
}

.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.admin-tabs button {
    padding: 8px 14px; border-radius: 10px; background: transparent; border: 1px solid var(--border);
    color: var(--text); cursor: pointer; font: inherit;
    transition: transform 0.15s ease, background 0.2s, border-color 0.2s, color 0.2s;
}
.admin-tabs button:hover { transform: translateY(-1px); background: rgba(120, 160, 255, 0.08); }
.admin-tabs button.active { background: rgba(92, 242, 255, 0.12); border-color: var(--accent); color: var(--accent); }

table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }

.image-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.image-list .img-thumb {
    width: 80px; height: 50px; border-radius: 8px; background: #0a0e1a center/cover; position: relative;
    border: 1px solid var(--border);
}
.image-list .img-thumb button { position: absolute; top: -6px; right: -6px; background: var(--bad); color: #fff; border: 0; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 12px; }

.stat-card { padding: 18px; }
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 800; color: #fff; margin-top: 4px; }

.skeleton { background: linear-gradient(90deg, rgba(120, 160, 255, 0.05), rgba(120, 160, 255, 0.12), rgba(120, 160, 255, 0.05)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.footer {
    border-top: 1px solid var(--border);
    margin-top: 40px; padding: 28px 0;
    color: var(--muted); font-size: 13px; text-align: center;
}
.footer a { color: var(--text); }

.help-bar {
    position: fixed;
    bottom: 92px;
    right: 22px;
    z-index: 98;
    background: var(--panel-solid);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
    max-width: min(480px, calc(100vw - 100px));
}
.help-bar:hover { color: var(--accent); border-color: var(--accent); }

.payment-step { padding: 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: rgba(7, 9, 15, 0.4); }
.payment-step b { color: var(--accent); }
.copy-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; font-family: monospace; word-break: break-all; }

.kbd { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); background: rgba(7, 9, 15, 0.6); font-family: monospace; font-size: 12px; }

/* ─── Живые анимации ─── */
@keyframes nav-enter {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes glow-shift {
    0%, 100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.12) saturate(1.08); }
}
@keyframes float-brand {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes help-pop {
    0% { opacity: 0; transform: translateY(12px) scale(0.94); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nav { animation: nav-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

.hero h1 { animation: hero-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both; }
.hero-lead { animation: hero-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
.hero-actions { animation: hero-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both; }
.hero .glow { animation: glow-shift 5s ease-in-out infinite; }

.section-title { animation: fade-rise 0.45s ease 0.04s both; }
.filters { animation: fade-rise 0.45s ease 0.1s both; }

.games-grid .game-card {
    animation: fade-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.games-grid .game-card:nth-child(1) { animation-delay: 0.03s; }
.games-grid .game-card:nth-child(2) { animation-delay: 0.06s; }
.games-grid .game-card:nth-child(3) { animation-delay: 0.09s; }
.games-grid .game-card:nth-child(4) { animation-delay: 0.12s; }
.games-grid .game-card:nth-child(5) { animation-delay: 0.15s; }
.games-grid .game-card:nth-child(6) { animation-delay: 0.18s; }
.games-grid .game-card:nth-child(7) { animation-delay: 0.21s; }
.games-grid .game-card:nth-child(8) { animation-delay: 0.24s; }
.games-grid .game-card:nth-child(9) { animation-delay: 0.27s; }
.games-grid .game-card:nth-child(10) { animation-delay: 0.3s; }
.games-grid .game-card:nth-child(11) { animation-delay: 0.33s; }
.games-grid .game-card:nth-child(12) { animation-delay: 0.36s; }
.games-grid .game-card:nth-child(13) { animation-delay: 0.39s; }
.games-grid .game-card:nth-child(14) { animation-delay: 0.42s; }
.games-grid .game-card:nth-child(15) { animation-delay: 0.45s; }
.games-grid .game-card:nth-child(16) { animation-delay: 0.48s; }
.games-grid .game-card:nth-child(17) { animation-delay: 0.51s; }
.games-grid .game-card:nth-child(18) { animation-delay: 0.54s; }
.games-grid .game-card:nth-child(19) { animation-delay: 0.57s; }
.games-grid .game-card:nth-child(20) { animation-delay: 0.6s; }

.brand-logo { animation: float-brand 6s ease-in-out infinite; }

.auth-card {
    animation: fade-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.game-page-hero {
    animation: fade-rise 0.45s ease both;
}

.footer {
    animation: fade-rise 0.55s ease 0.15s both;
}

.help-bar {
    animation: help-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

.stat-card {
    transition: transform 0.2s ease, border-color 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(92, 242, 255, 0.35);
}

.gallery .thumbs .thumb {
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}
.gallery .thumbs .thumb:hover {
    transform: scale(1.04);
    opacity: 1;
    border-color: var(--accent);
}
.gallery .thumbs .thumb.active {
    box-shadow: 0 0 0 2px var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

.rent-card {
    animation: fade-rise 0.45s ease 0.12s both;
}

.rules-page .rules-block { max-width: 860px; margin: 0 auto; }
.rules-page .rules-block h2 {
    font-size: 17px;
    margin-top: 26px;
    margin-bottom: 10px;
    color: var(--accent);
}
.rules-page .rules-block ol {
    margin: 0 0 8px;
    padding-left: 1.35rem;
    color: var(--text);
}
.rules-page .rules-block li { margin-bottom: 12px; }
.rules-page .rules-block .lead { color: var(--muted); line-height: 1.65; }

.support-fab-wrap {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    max-width: calc(100vw - 20px);
    pointer-events: none;
}
.support-fab-wrap .support-fab {
    pointer-events: auto;
}
.support-fab-hint {
    font-size: 12px;
    line-height: 1.35;
    color: rgba(186, 200, 230, 0.95);
    text-align: right;
    max-width: 132px;
    text-shadow: 0 1px 14px rgba(7, 9, 15, 0.95);
    pointer-events: none;
}
.support-fab-hint b {
    color: var(--accent);
    font-weight: 600;
}
@media (max-width: 520px) {
    .support-fab-hint {
        display: none;
    }
}

.support-fab {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(92, 242, 255, 0.45);
    background: linear-gradient(145deg, rgba(124, 92, 255, 0.55), rgba(92, 242, 255, 0.28));
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
}
.support-fab:hover { filter: brightness(1.08); }
.support-fab.support-fab-unread {
    border-color: rgba(251, 191, 36, 0.85);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.45), 0 8px 28px rgba(0, 0, 0, 0.38);
    animation: support-fab-pulse 1.4s ease-in-out infinite;
}
@keyframes support-fab-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.45), 0 8px 28px rgba(0, 0, 0, 0.38); }
    50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.25), 0 8px 32px rgba(251, 191, 36, 0.15); }
}
.support-site-modal {
    width: min(94vw, 820px);
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.support-site-modal .support-site-msg-list {
    flex: 1 1 auto;
    min-height: 260px;
    max-height: min(62vh, 620px);
    overflow-y: auto;
}
.support-site-modal .textarea {
    min-height: 100px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .nav, .hero h1, .hero-lead, .hero-actions, .section-title, .filters,
    .games-grid .game-card, .auth-card, .game-page-hero, .footer, .help-bar, .rent-card {
        animation: none !important;
        animation-delay: 0s !important;
    }
    .hero .glow, .brand-logo, .stock-dot {
        animation: none !important;
    }
    .game-card:hover .cover { transform: none; }
    .hero-slider-track { animation: none !important; transform: none !important; }
    .hero-slider { min-height: 0; animation: none !important; }
    .hero-slider-viewport { overflow: visible; border: 0; background: transparent; backdrop-filter: none; }
    .hero-slider-track { width: 100%; flex-direction: column; gap: 14px; }
    .hero-slider-slide { width: 100%; flex: none; padding: 0; }
    .support-fab.support-fab-unread { animation: none !important; }
}
