/* ═══════════════════════════════════════════════════════════════════════
   Сливы TG — v4 · Deep Ocean Theme
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-deep: #060b18;
    --bg-surface: #0c1222;
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-hover: rgba(22, 33, 56, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border: rgba(99, 149, 255, 0.1);
    --border-hover: rgba(99, 149, 255, 0.25);
    --text-primary: #e8edf5;
    --text-secondary: #8b9dc3;
    --text-muted: #4f6089;
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.2);
    --coral: #f97316;
    --coral-glow: rgba(249, 115, 22, 0.15);
    --emerald: #10b981;
    --rose: #f43f5e;
    --gold: #eab308;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-glow: 0 4px 20px var(--accent-glow);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Mesh gradient background */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 15% 20%, rgba(59,130,246,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 85% 80%, rgba(6,182,212,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(249,115,22,0.03) 0%, transparent 60%);
    pointer-events: none; z-index: 0;
}

a { color: var(--accent-bright); text-decoration: none; transition: var(--transition); }
a:hover { color: #93c5fd; }
img { max-width: 100%; height: auto; }

/* ── Particles ─────────────────────────────────────────────────────── */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; border-radius: 50%; opacity: 0; animation: pFloat linear infinite; }
.p1 { width: 3px; height: 3px; background: var(--accent); left: 12%; animation-duration: 20s; }
.p2 { width: 5px; height: 5px; background: var(--cyan); left: 35%; animation-duration: 26s; animation-delay: 4s; }
.p3 { width: 3px; height: 3px; background: var(--coral); left: 58%; animation-duration: 18s; animation-delay: 7s; }
.p4 { width: 4px; height: 4px; background: var(--emerald); left: 78%; animation-duration: 22s; animation-delay: 2s; }
.p5 { width: 3px; height: 3px; background: var(--gold); left: 92%; animation-duration: 24s; animation-delay: 10s; }
@keyframes pFloat { 0% { transform: translateY(100vh) scale(0); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateY(-10vh) scale(1); opacity: 0; } }

/* ── Header ────────────────────────────────────────────────────────── */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(6, 11, 24, 0.88);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.brand-row { display: flex; justify-content: center; padding: 14px 20px 2px; }

.nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.35rem; font-weight: 700; color: #fff;
    text-decoration: none; letter-spacing: -0.02em;
}

.nav-brand .brand-svg { color: var(--accent-bright); filter: drop-shadow(0 0 6px var(--accent-glow)); }

.nav-row {
    display: flex; justify-content: center; gap: 4px;
    padding: 6px 16px 12px; flex-wrap: wrap;
}

.nav-row a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 500;
    color: var(--text-secondary); transition: var(--transition); text-decoration: none;
    border: 1px solid transparent;
}

.nav-row a svg { opacity: 0.5; transition: var(--transition); flex-shrink: 0; }
.nav-row a:hover, .nav-row a.active { color: #fff; background: rgba(59,130,246,0.1); border-color: var(--border); }
.nav-row a:hover svg, .nav-row a.active svg { opacity: 1; }

.nav-row a.game-link {
    color: var(--cyan); background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    animation: gameGlow 3s ease-in-out infinite;
}
.nav-row a.game-link:hover, .nav-row a.game-link.active {
    background: rgba(6,182,212,0.16); border-color: rgba(6,182,212,0.4);
    box-shadow: 0 0 20px rgba(6,182,212,0.15);
}
@keyframes gameGlow { 0%,100% { box-shadow: 0 0 4px rgba(6,182,212,0.08); } 50% { box-shadow: 0 0 14px rgba(6,182,212,0.15); } }

.nav-row a.admin-link { color: var(--coral); }

/* ── Container ─────────────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px 60px; position: relative; z-index: 1; }

/* ── Page Hero ─────────────────────────────────────────────────────── */
.page-hero { text-align: center; padding: 52px 0 40px; }

.page-hero h1 {
    font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 0%, var(--accent-bright) 50%, var(--cyan) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 12px;
}

.page-hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

/* ── Search ────────────────────────────────────────────────────────── */
.search-box { max-width: 500px; margin: 24px auto 0; position: relative; }
.search-box input {
    width: 100%; padding: 14px 20px 14px 48px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary); font-size: 0.95rem;
    font-family: var(--font); outline: none; transition: var(--transition);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-box .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: var(--transition); margin-bottom: 16px;
    backdrop-filter: blur(8px);
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-content { padding: 20px 24px; }

a.card-link { display: block; text-decoration: none; color: inherit; }
a.card-link:hover { color: inherit; }
a.card-link .channel-info h3 { transition: var(--transition); }
a.card-link:hover .channel-info h3 { color: var(--accent-bright); }

/* ── Channel Cards ─────────────────────────────────────────────────── */
.channel-grid { display: grid; gap: 14px; }
.channel-item { display: flex; align-items: center; gap: 16px; }

.channel-avatar {
    width: 54px; height: 54px; border-radius: 14px; object-fit: cover;
    flex-shrink: 0; border: 2px solid var(--border);
}

.channel-avatar-placeholder {
    width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: #fff; font-weight: 700;
}

.channel-info { flex: 1; min-width: 0; }
.channel-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.channel-desc {
    color: var(--text-secondary); font-size: 0.84rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.channel-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 0.76rem; color: var(--text-muted); }

/* ── Channel Detail ────────────────────────────────────────────────── */
.channel-detail-card { max-width: 700px; margin: 0 auto; text-align: center; padding: 48px 32px; }
.channel-detail-card .avatar-large {
    width: 112px; height: 112px; border-radius: 26px; object-fit: cover;
    margin-bottom: 20px; border: 3px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.channel-detail-card .avatar-large-placeholder {
    width: 112px; height: 112px; border-radius: 26px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.8rem; color: #fff; font-weight: 700; margin: 0 auto 20px;
}
.channel-detail-card h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; }
.channel-detail-card .desc { color: var(--text-secondary); max-width: 500px; margin: 0 auto 20px; font-size: 0.95rem; }
.channel-detail-card .meta-line { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }

/* ── Category Tabs ─────────────────────────────────────────────────── */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-tab {
    display: inline-flex; align-items: center; padding: 8px 18px;
    border-radius: 20px; font-size: 0.84rem; font-weight: 500;
    color: var(--text-secondary); background: var(--bg-glass);
    border: 1px solid var(--border); text-decoration: none; transition: var(--transition);
}
.cat-tab:hover { background: var(--bg-card); color: var(--text-primary); }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-glow); }

/* ── Section Title ─────────────────────────────────────────────────── */
.section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }

/* ── Posts ──────────────────────────────────────────────────────────── */
.posts-section { margin-top: 40px; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.post-card .post-image { width: 100%; height: 150px; object-fit: cover; }
.post-card .post-text {
    color: var(--text-secondary); font-size: 0.86rem; line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .post-date { display: block; margin-top: 8px; font-size: 0.73rem; color: var(--text-muted); font-family: var(--mono); }

/* ── Articles ──────────────────────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.article-card .article-image { width: 100%; height: 200px; object-fit: cover; }
.article-card .card-content { padding: 20px; }
.article-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.article-card h3 a { color: var(--text-primary); }
.article-card h3 a:hover { color: var(--accent-bright); }
.article-card .article-date { font-size: 0.8rem; color: var(--text-muted); font-family: var(--mono); }
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail .article-image-full { width: 100%; border-radius: var(--radius-lg); margin-bottom: 24px; }
.article-content { color: var(--text-secondary); line-height: 1.8; font-size: 1rem; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 10px; font-size: 0.88rem;
    font-weight: 500; font-family: var(--font); border: none;
    cursor: pointer; transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); color: #fff; }
.btn-secondary { background: var(--bg-glass); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card); border-color: var(--border-hover); color: #fff; }
.btn-danger { background: rgba(244,63,94,0.12); color: var(--rose); border: 1px solid rgba(244,63,94,0.2); }
.btn-danger:hover { background: rgba(244,63,94,0.2); }
.btn-success { background: linear-gradient(135deg, var(--emerald), #059669); color: #fff; }
.btn-success:hover { transform: translateY(-1px); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; border-radius: 8px; }
.btn-lg { padding: 14px 34px; font-size: 1rem; border-radius: var(--radius); }

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.88rem; font-weight: 500; color: var(--text-secondary); }
.form-input, .form-group input[type="text"], .form-group input[type="password"], .form-group textarea, select.form-input {
    width: 100%; padding: 12px 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text-primary); font-size: 0.92rem;
    font-family: var(--font); outline: none; transition: var(--transition);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-input:focus, .form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
select.form-input {
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234f6089' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer;
}
select.form-input option { background: var(--bg-surface); color: var(--text-primary); }
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.form-check label { color: var(--text-secondary); font-size: 0.88rem; cursor: pointer; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Flash ─────────────────────────────────────────────────────────── */
.flash { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.88rem; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.flash-success { background: rgba(16,185,129,0.1); color: #34d399; border: 1px solid rgba(16,185,129,0.15); }
.flash-error { background: rgba(244,63,94,0.1); color: #fb7185; border: 1px solid rgba(244,63,94,0.15); }

/* ── Admin ─────────────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th { background: rgba(255,255,255,0.03); padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.88rem; color: var(--text-secondary); }
tr:hover td { background: rgba(255,255,255,0.015); }
.table-actions { display: flex; gap: 8px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.admin-header h1 { font-size: 1.5rem; font-weight: 700; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.login-card { width: 100%; max-width: 400px; padding: 40px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); backdrop-filter: blur(12px); }
.login-card h1 { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.login-card .login-sub { text-align: center; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 32px; }
.login-card .lock-icon { width: 52px; height: 52px; background: linear-gradient(135deg, var(--accent), var(--cyan)); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.login-card .lock-icon svg { color: #fff; }

.stat-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: rgba(59,130,246,0.1); border-radius: 20px; font-size: 0.76rem; color: var(--accent-bright); font-family: var(--mono); }

.pin-icon { display: inline-flex; margin-right: 4px; color: var(--coral); }
.card.pinned { border-color: rgba(249,115,22,0.2); background: rgba(249,115,22,0.04); }
.card.pinned:hover { border-color: rgba(249,115,22,0.35); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; margin-bottom: 20px; }

.error-page { text-align: center; padding: 80px 20px; }
.error-page .error-code { font-size: 6rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 16px; }
.error-page p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 24px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.88rem; margin-top: 24px; }
.back-link:hover { color: var(--text-primary); }

/* ── Channel Slider ────────────────────────────────────────────────── */
.other-channels { margin-top: 52px; padding-top: 36px; border-top: 1px solid var(--border); }
.other-channels-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; }
.slider-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 8px 4px 16px; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.other-channel-card {
    flex: 0 0 150px; scroll-snap-align: start;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 12px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; transition: var(--transition); text-align: center;
}
.other-channel-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-3px); }
.other-channel-avatar { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; border: 2px solid var(--border); }
.other-channel-avatar-ph { width: 60px; height: 60px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--cyan)); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; font-weight: 700; }
.other-channel-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.other-channel-visits { font-size: 0.7rem; color: var(--text-muted); font-family: var(--mono); }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(6,11,24,0.92);
    color: var(--text-primary); font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); backdrop-filter: blur(8px);
}
.slider-arrow:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.slider-arrow-left { left: -14px; }
.slider-arrow-right { right: -14px; }

/* ── Leaderboard ───────────────────────────────────────────────────── */
.leaderboard { max-width: 420px; margin: 28px auto 0; }
.leaderboard h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.lb-list { list-style: none; }
.lb-item {
    display: flex; align-items: center; padding: 10px 14px;
    border-radius: 10px; margin-bottom: 5px; transition: var(--transition);
    background: var(--bg-card); border: 1px solid var(--border);
}
.lb-item:hover { background: var(--bg-card-hover); }
.lb-rank { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; margin-right: 12px; flex-shrink: 0; }
.lb-rank.gold   { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.lb-rank.silver { background: linear-gradient(135deg, #9ca3af, #6b7280); color: #fff; }
.lb-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.lb-rank.normal { background: var(--bg-glass); color: var(--text-muted); }
.lb-score { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-right: auto; }
.lb-date { font-size: 0.7rem; color: var(--text-muted); font-family: var(--mono); }

/* ── Engagement: Random Tip Banner ─────────────────────────────────── */
.tip-banner {
    background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(59,130,246,0.08));
    border: 1px solid rgba(6,182,212,0.15); border-radius: var(--radius-lg);
    padding: 20px 24px; margin-bottom: 28px; display: flex; align-items: center; gap: 16px;
}
.tip-banner .tip-icon { font-size: 1.5rem; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: rgba(6,182,212,0.12); display: flex; align-items: center; justify-content: center; }
.tip-banner .tip-icon svg { color: var(--cyan); }
.tip-banner .tip-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.tip-banner .tip-text b { color: var(--text-primary); }

/* ── Engagement: Stats Counter ─────────────────────────────────────── */
.stats-row {
    display: flex; justify-content: center; gap: 36px; margin: 0 auto 36px;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .stat-num {
    font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-bright), var(--cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-item .stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── Back to Top ───────────────────────────────────────────────────── */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-glow);
    opacity: 0; transform: translateY(20px); pointer-events: none;
    transition: var(--transition);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 28px var(--accent-glow); }

/* ── Footer ────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 28px 20px; text-align: center; color: var(--text-muted); font-size: 0.78rem; position: relative; z-index: 1; }

/* ── Game Canvas ───────────────────────────────────────────────────── */
.game-canvas-wrap { position: relative; flex-shrink: 0; }
.game-canvas-wrap canvas {
    display: block; border-radius: 14px; border: 2px solid rgba(6,182,212,0.2);
    cursor: pointer; max-width: 100%; box-shadow: 0 0 30px rgba(6,182,212,0.06);
    touch-action: manipulation;
}
#score-display { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font-size: 2.2rem; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.6); pointer-events: none; z-index: 10; }
#combo-display { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); font-size: 0.85rem; font-weight: 600; color: var(--cyan); opacity: 0; pointer-events: none; z-index: 10; transition: opacity 0.3s; }
@media (max-width: 480px) { .game-canvas-wrap canvas { max-width: calc(100vw - 64px); } }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 20px 16px 40px; }
    .page-hero { padding: 28px 0 24px; }
    .page-hero h1 { font-size: 1.9rem; }
    .nav-row { gap: 2px; }
    .nav-row a { padding: 6px 10px; font-size: 0.78rem; }
    .slider-arrow { display: none; }
    .other-channel-card { flex: 0 0 130px; }
    .stats-row { gap: 20px; }
}
@media (max-width: 480px) {
    .nav-row a { padding: 5px 8px; font-size: 0.74rem; gap: 4px; }
    .nav-row a svg { width: 14px; height: 14px; }
    .page-hero h1 { font-size: 1.5rem; }
    .table-actions { flex-direction: column; }
}
