/* ============================================================
   Rapid Pulse Gaming — Theme Stylesheet
   Colors: Black / Red / White / Blue
   ============================================================ */

:root {
    --black: #050506;
    --black-2: #0b0b0d;
    --black-3: #101014;
    --panel: #121217;
    --panel-2: #18181e;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);

    --red: #e6192b;
    --red-bright: #ff2b3f;
    --red-dark: #8f0f1d;
    --red-deep: #5a0a13;

    --blue: #2f6bff;
    --blue-soft: #60a5fa;

    --white: #f5f6f8;
    --gray: #9aa0aa;
    --gray-dark: #62666e;

    --discord: #5865f2;

    --font-head: 'Chakra Petch', system-ui, sans-serif;
    --font-body: 'Rajdhani', system-ui, sans-serif;

    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --glow-red: 0 0 40px rgba(255, 43, 63, 0.35);
    --glow-blue: 0 0 40px rgba(47, 107, 255, 0.25);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: 0.01em;
}
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── Layout helpers ────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: 96px 0; }
.section--alt {
    background:
        radial-gradient(1000px 500px at 80% 0%, rgba(230, 25, 43, 0.08), transparent 60%),
        var(--black-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.grad-text {
    background: linear-gradient(135deg, var(--red-bright) 0%, #ff6b7a 50%, var(--red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

.btn--primary {
    background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
    color: #fff;
    box-shadow: var(--glow-red);
}
.btn--primary:hover { box-shadow: 0 0 55px rgba(255, 43, 63, 0.55); }

.btn--outline {
    background: transparent;
    color: var(--white);
    border-color: var(--line-strong);
}
.btn--outline:hover { border-color: var(--red-bright); color: var(--red-bright); }

.btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    border-color: var(--line);
}
.btn--ghost:hover { color: var(--white); border-color: var(--line-strong); }

.btn--discord {
    background: var(--discord);
    color: #fff;
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.35);
}
.btn--discord:hover { box-shadow: 0 0 45px rgba(88, 101, 242, 0.55); }

/* ── Navigation ────────────────────────────────────────── */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 14px 0;
    background: rgba(5, 5, 6, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; }
.nav.scrolled { background: rgba(5, 5, 6, 0.94); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.nav__logo { display: flex; align-items: center; gap: 10px; }
.nav__logo-img { width: 34px; height: 34px; object-fit: contain; }
.nav__brand {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.06em;
}
.nav__brand-accent { color: var(--red-bright); margin-left: 2px; }

.nav__links { display: flex; gap: 26px; margin-left: 16px; }
.nav__links a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray);
    transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--red-bright); }

.nav__auth { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav__user { display: flex; align-items: center; gap: 9px; color: var(--white); }
.nav__user span {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav__avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--red-bright); }

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
    margin-left: auto;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.2s; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 140px 0 80px;
}
.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 75%);
    pointer-events: none;
}
.hero__glow {
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    pointer-events: none;
}
.hero__glow--red { background: rgba(230, 25, 43, 0.55); top: -180px; right: -120px; }
.hero__glow--blue { background: rgba(47, 107, 255, 0.4); bottom: -220px; left: -140px; }

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}
.hero__eyebrow {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.32em;
    color: var(--red-bright);
    text-transform: uppercase;
    margin-bottom: 18px;
}
.hero__title {
    font-size: clamp(44px, 7vw, 82px);
    font-weight: 700;
    margin-bottom: 22px;
}
.hero__desc { font-size: 19px; color: var(--gray); max-width: 560px; margin-bottom: 34px; }
.hero__desc strong { color: var(--white); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__actions .btn { flex: 1 1 0; justify-content: center; max-width: 320px; }

.hero__logo-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.hero__logo { width: clamp(240px, 30vw, 360px); filter: drop-shadow(0 0 60px rgba(230, 25, 43, 0.45)); animation: float 6s ease-in-out infinite; }
.hero__ring {
    position: absolute;
    border: 1px solid rgba(230, 25, 43, 0.4);
    border-radius: 50%;
    width: 110%;
    aspect-ratio: 1;
    animation: pulse-ring 4s ease-out infinite;
}
.hero__ring--2 { animation-delay: 2s; }

/* ── Stats ─────────────────────────────────────────────── */
.stats { background: var(--black-2); border-bottom: 1px solid var(--line); }
.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
}
.stats__item {
    background: var(--black-2);
    text-align: center;
    padding: 30px 16px;
}
.stats__item strong {
    display: block;
    font-family: var(--font-head);
    font-size: 28px;
    color: var(--red-bright);
    margin-bottom: 4px;
}
.stats__item span { color: var(--gray); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Section headers ───────────────────────────────────── */
.section__header { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__eyebrow {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--red-bright);
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section__title { font-size: clamp(30px, 4.5vw, 46px); }
.section__sub { color: var(--gray); font-size: 18px; }
.section__footer { text-align: center; margin-top: 48px; }

/* ── Featured games ────────────────────────────────────── */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.featured-card {
    position: relative;
    background: linear-gradient(180deg, var(--panel), var(--black-3));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.featured-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--accent);
}
.featured-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -80px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.16;
    border-radius: 50%;
}
.featured-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.featured-card__icon {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--accent);
    margin-bottom: 20px;
}
.featured-card__icon svg { width: 32px; height: 32px; }
.featured-card h3 { font-size: 28px; }
.featured-card p { color: var(--gray); margin-bottom: 18px; }
.featured-card__tag {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 5px 14px;
    opacity: 0.9;
}

/* ── Community perks ───────────────────────────────────── */
.perks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.perk-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.perk-card:hover { transform: translateY(-5px); border-color: rgba(230, 25, 43, 0.4); }
.perk-card__icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(230, 25, 43, 0.18), rgba(230, 25, 43, 0.05));
    color: var(--red-bright);
    margin-bottom: 18px;
}
.perk-card__icon svg { width: 28px; height: 28px; }
.perk-card h3 { font-size: 20px; }
.perk-card p { color: var(--gray); font-size: 16px; margin: 0; }

/* ── CTA ───────────────────────────────────────────────── */
.cta {
    padding: 96px 0;
    background:
        radial-gradient(900px 400px at 50% 120%, rgba(230, 25, 43, 0.22), transparent 65%),
        var(--black-3);
    border-top: 1px solid var(--line);
}
.cta__inner { text-align: center; max-width: 620px; }
.cta h2 { font-size: clamp(30px, 4.5vw, 46px); }
.cta p { color: var(--gray); font-size: 18px; margin-bottom: 28px; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ── Page hero ─────────────────────────────────────────── */
.page-hero {
    position: relative;
    padding: 170px 0 80px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.page-hero__inner { position: relative; text-align: center; }
.page-hero__title { font-size: clamp(36px, 6vw, 64px); }
.page-hero__desc { color: var(--gray); font-size: 19px; max-width: 560px; margin: 0 auto; }

/* ── Games grid ────────────────────────────────────────── */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.game-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 26px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.game-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--accent);
    opacity: 0.85;
}
.game-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.game-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.game-card__icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--accent);
}
.game-card__icon svg { width: 26px; height: 26px; }
.game-card__badge {
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red-bright);
    border: 1px solid var(--red-dark);
    background: rgba(230, 25, 43, 0.1);
    border-radius: 999px;
    padding: 4px 12px;
}
.game-card h3 { font-size: 22px; }
.game-card p { color: var(--gray); font-size: 16px; margin: 0; }

/* ── Auth pages ────────────────────────────────────────── */
.auth {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}
.auth__inner { position: relative; display: flex; justify-content: center; }
.auth__card {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}
.auth__logo { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 22px; filter: drop-shadow(0 0 26px rgba(230, 25, 43, 0.45)); }
.auth__card h1 { font-size: 30px; }
.auth__lead { color: var(--gray); font-size: 17px; margin-bottom: 26px; }
.auth__error {
    background: rgba(230, 25, 43, 0.12);
    border: 1px solid rgba(230, 25, 43, 0.4);
    color: #ffb3bb;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    margin-bottom: 22px;
}
.auth__note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    margin-top: 26px;
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}
.auth__note p { margin: 0; color: var(--gray); font-size: 14.5px; }
.auth__note strong { color: var(--white); }
.auth__lock { font-size: 20px; line-height: 1; }
.auth__join { margin: 22px 0 0; font-size: 15px; color: var(--gray); }
.auth__join a { color: var(--red-bright); font-weight: 600; }
.auth__join a:hover { text-decoration: underline; }

.auth__card--denied .auth__denied-icon { font-size: 46px; margin-bottom: 10px; }
.auth__denied-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}
.auth__denied-detail { color: var(--gray); font-size: 16px; }

/* ── Members dashboard ─────────────────────────────────── */
.page-hero--members { padding-bottom: 56px; }
.member-head { display: flex; align-items: center; gap: 24px; }
.member-head__avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    border: 3px solid var(--red-bright);
    box-shadow: var(--glow-red);
}
.member-head__title { font-size: clamp(30px, 4.5vw, 44px); margin-bottom: 6px; }
.member-head__sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
.member-head__tag { color: var(--gray); font-size: 16px; }
.member-head__badge {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7be29a;
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.4);
    padding: 5px 14px;
    border-radius: 999px;
}
.member-head__badge--owner { color: #ffb86b; background: rgba(255, 184, 107, 0.12); border-color: rgba(255, 184, 107, 0.4); }
.member-head__badge--admin { color: #ff8a94; background: rgba(230, 25, 43, 0.12); border-color: rgba(230, 25, 43, 0.45); }
.member-head__badge--mod { color: #8ab8ff; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.4); }

.member-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.member-card--wide { grid-column: 1 / -1; }
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}
.panel h3 { font-size: 20px; margin-bottom: 18px; }

.member-card__list { list-style: none; margin: 0 0 22px; padding: 0; }
.member-card__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}
.member-card__list li:last-child { border-bottom: 0; }
.member-card__list span { color: var(--gray); }
.member-card__list code { color: var(--blue-soft); font-size: 14px; }
.member-card__list .ok { color: #7be29a; font-weight: 600; }

.member-links { list-style: none; margin: 0; padding: 0; }
.member-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 12px;
    font-family: var(--font-head);
    font-weight: 600;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.member-links li:last-child a { margin-bottom: 0; }
.member-links a:hover { border-color: var(--red-bright); transform: translateX(4px); }
.member-links svg { width: 20px; height: 20px; color: var(--red-bright); }

.member-games { display: flex; flex-wrap: wrap; gap: 12px; }
.member-games__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--white);
    transition: border-color 0.18s ease;
}
.member-games__chip:hover { border-color: var(--accent); }
.member-games__chip svg { width: 18px; height: 18px; color: var(--accent); }

/* ── Footer ────────────────────────────────────────────── */
.footer {
    background: var(--black-2);
    border-top: 1px solid var(--line);
    padding: 72px 0 0;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 48px;
}
.footer__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; letter-spacing: 0.05em; }
.footer__logo-img { width: 32px; height: 32px; object-fit: contain; }
.footer__tag { color: var(--gray); margin-top: 16px; max-width: 260px; }
.footer__col h4 {
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gray-dark);
    margin-bottom: 18px;
}
.footer__col a:not(.btn) { display: block; color: var(--gray); padding: 5px 0; transition: color 0.15s ease; }
.footer__col a:not(.btn):hover { color: var(--red-bright); }
.footer__col p { color: var(--gray); font-size: 15px; }
.footer__bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 22px 0;
    color: var(--gray-dark);
    font-size: 14px;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}
@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.8; }
    70% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}
.fade-up { animation: fadeUp 0.7s ease both; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__desc { margin-left: auto; margin-right: auto; }
    .hero__actions { justify-content: center; }
    .hero__logo-wrap { order: -1; }
    .hero__logo { width: 240px; }
    .featured-grid { grid-template-columns: 1fr; }
    .perks-grid { grid-template-columns: repeat(2, 1fr); }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .member-grid { grid-template-columns: 1fr; }
    .member-card--wide { grid-column: auto; }
}

@media (max-width: 640px) {
    .nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(5, 5, 6, 0.98);
        border-bottom: 1px solid var(--line);
        padding: 10px 24px 18px;
    }
    .nav__links.open { display: flex; }
    .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav__auth .nav__user span { display: none; }
    .nav__toggle { display: flex; }
    .nav__auth { margin-left: 8px; }
    .hero__actions { flex-direction: column; }
    .hero__actions .btn { flex: none; width: 100%; max-width: none; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .perks-grid { grid-template-columns: 1fr; }
    .games-grid { grid-template-columns: 1fr; }
    .section { padding: 64px 0; }
    .member-head { flex-direction: column; text-align: center; }
    .member-head__sub { justify-content: center; }
    .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Admin panel ────────────────────────────────────────── */
.page-hero--admin { padding-bottom: 40px; }
.page-hero--admin .page-hero__desc { margin-bottom: 28px; }

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.admin-nav a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--gray);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.admin-nav a.is-active { color: #fff; border-color: var(--red-bright); background: rgba(230, 25, 43, 0.12); }
.admin-nav a:hover { color: var(--red-bright); border-color: var(--red-bright); }
.admin-nav__back { color: var(--blue-soft) !important; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.admin-stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
}
.admin-stat strong { display: block; font-family: var(--font-head); font-size: 26px; color: var(--red-bright); margin-bottom: 4px; overflow-wrap: anywhere; }
.admin-stat span { color: var(--gray); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.admin-panel { margin-bottom: 24px; }
.admin-panel h3 { margin-bottom: 18px; }

.admin-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select {
    background: var(--black-3);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    min-width: 180px;
}
.admin-form input:focus, .admin-form select:focus { outline: none; border-color: var(--red-bright); }
.admin-form--inline { display: inline-flex; }
.admin-form__label { color: var(--gray); font-size: 15px; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; align-items: flex-end; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-dark); }
.admin-table code { color: var(--blue-soft); font-size: 13px; }
.admin-table td:last-child, .admin-table th:last-child { text-align: right; white-space: nowrap; }

.member-cell { display: flex; align-items: center; gap: 12px; }
.member-cell img { width: 34px; height: 34px; border-radius: 50%; background: var(--black-3); }
.member-cell__sub { color: var(--gray); font-size: 13px; }
.badge {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--gray);
    margin-left: 6px;
    vertical-align: middle;
}
.badge--owner { color: #ffb86b; border-color: rgba(255, 184, 107, 0.4); background: rgba(255, 184, 107, 0.1); }
.badge--bot { color: var(--blue-soft); border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.1); }

.btn--danger {
    background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--glow-red);
}
.btn--danger:hover { box-shadow: 0 0 45px rgba(255, 43, 63, 0.55); }

.flash { border-radius: 10px; padding: 13px 16px; margin-bottom: 22px; font-size: 15px; }
.flash--success { background: rgba(52, 199, 89, 0.12); border: 1px solid rgba(52, 199, 89, 0.4); color: #9fe8b4; }
.flash--error { background: rgba(230, 25, 43, 0.12); border: 1px solid rgba(230, 25, 43, 0.4); color: #ffb3bb; }

.muted { color: var(--gray); }

@media (max-width: 640px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-form input[type="text"],
    .admin-form input[type="number"],
    .admin-form select { min-width: 100%; flex: 1 1 100%; }
}

/* Role management */
.role-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: inline-block;
    flex: none;
}
.role-list { display: flex; flex-wrap: wrap; gap: 10px; }
.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
}
.role-chip form { display: inline-flex; }
.role-chip .btn { padding: 2px 9px; font-size: 13px; line-height: 1.4; }
.admin-form input[type="color"] {
    width: 52px;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--black-3);
    cursor: pointer;
}

.admin-rename { display: flex; gap: 8px; align-items: center; }
.admin-rename input[type="text"] {
    background: var(--black-3);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 7px 10px;
    min-width: 150px;
    width: 100%;
    max-width: 240px;
}
.admin-rename input[type="text"]:focus { outline: none; border-color: var(--red-bright); }

.admin-search {
    width: 100%;
    max-width: 380px;
    margin-bottom: 14px;
    background: var(--black-3);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 11px 14px;
    display: block;
}
.admin-search:focus { outline: none; border-color: var(--red-bright); }

.member-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.member-toolbar .admin-search { margin-bottom: 0; }
.admin-select {
    background: var(--black-3);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 12px;
    cursor: pointer;
}
.admin-select:focus { outline: none; border-color: var(--red-bright); }

.col-check { width: 34px; text-align: center; }
.member-select { width: 16px; height: 16px; cursor: pointer; accent-color: var(--red-bright); }
.bulk-actions {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(24px);
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 32px);
    background: var(--panel-2);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.bulk-actions.is-visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.bulk-actions__count { color: var(--white); font-family: var(--font-head); font-weight: 600; font-size: 14px; white-space: nowrap; }

@media (max-width: 640px) {
    .bulk-actions { left: 12px; right: 12px; transform: translateY(24px); border-radius: var(--radius); justify-content: space-between; }
    .bulk-actions.is-visible { transform: translateY(0); }
}
.hint { color: var(--gray); font-size: 14px; margin-top: -6px; }

/* Responsive admin tables → stacked cards (no horizontal scroll) */
@media (max-width: 640px) {
    .table-wrap { overflow: visible; }
    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td { display: block; width: 100%; box-sizing: border-box; }
    .admin-table thead { display: none; }
    .admin-table tr {
        margin-bottom: 16px;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.02);
    }
    .admin-table td {
        padding: 9px 0;
        border-bottom: 1px solid var(--line);
        text-align: left;
    }
    .admin-table tbody td:last-child { border-bottom: 0; padding-bottom: 0; text-align: left; white-space: normal; }
    .admin-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-family: var(--font-head);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--gray-dark);
        margin-bottom: 4px;
    }
    .admin-table td.col-check { display: flex; align-items: center; justify-content: space-between; }
    .admin-table td.col-check::before { margin-bottom: 0; }
    .admin-table code { word-break: break-all; }
    .member-cell { flex-wrap: wrap; }
}

.pagination { display: none; align-items: center; gap: 14px; margin-top: 18px; justify-content: center; }
.pagination__info { color: var(--gray); font-size: 14px; font-family: var(--font-head); font-weight: 600; letter-spacing: 0.04em; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { transform: none; }

/* ── Community pages (events, directory, wallet, shop) ──── */
.events-list { display: flex; flex-direction: column; gap: 16px; }
.event-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.event-card__date { text-align: center; min-width: 84px; }
.event-card__day { display: block; font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--red-bright); }
.event-card__time { color: var(--gray); font-size: 13px; }
.event-card__body { flex: 1; }
.event-card__body h3 { font-size: 20px; margin-bottom: 4px; }
.event-card__body p { color: var(--gray); margin: 0; font-size: 15px; }
.event-card__meta { color: var(--blue-soft); }

.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.directory-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.directory-card:hover { border-color: var(--red-bright); transform: translateY(-3px); }
.directory-card__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--black-3); }
.directory-card__name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.directory-card__user { color: var(--gray); font-size: 14px; margin-bottom: 6px; }
.directory-card__info .member-head__badge { font-size: 10px; padding: 3px 10px; }

.wallet-hero { text-align: center; margin-bottom: 24px; }
.wallet-hero h2 { margin-bottom: 6px; }
.wallet-hero__balance { font-family: var(--font-head); font-size: clamp(40px, 6vw, 56px); font-weight: 700; color: var(--red-bright); }
.wallet-hero__balance span { font-size: 0.5em; color: var(--gray); }
.member-card__list .neg { color: #ff8a94; font-weight: 600; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.shop-card:hover { border-color: var(--red-bright); transform: translateY(-3px); }
.shop-card h3 { font-size: 20px; }
.shop-card p { color: var(--gray); font-size: 15px; flex: 1; }
.shop-card__price { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--red-bright); margin: 10px 0 4px; }
.shop-card form { margin-top: 12px; }
.shop-card .btn { width: 100%; justify-content: center; }

.admin-form--stacked { flex-direction: column; align-items: stretch; }
.admin-form--stacked input[type="text"],
.admin-form--stacked textarea { width: 100%; min-width: 0; }
.admin-form input[type="datetime-local"],
.admin-form textarea {
    background: var(--black-3);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    min-width: 180px;
}
.admin-form textarea { resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: none; border-color: var(--red-bright); }

@media (max-width: 640px) {
    .event-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .event-card__date { text-align: left; }
}

/* ── Leaderboard ─────────────────────────────────────────── */
.lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lb-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 12px 16px;
}
.lb-rank { font-family: var(--font-head); font-weight: 700; width: 40px; color: var(--gray); }
.lb-rank--top { color: var(--red-bright); }
.lb-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(230, 25, 43, 0.3), rgba(230, 25, 43, 0.08));
    color: var(--red-bright); font-family: var(--font-head); font-weight: 700; font-size: 16px;
}
.lb-name { flex: 1; color: inherit; text-decoration: none; font-weight: 600; }
.lb-name:hover { color: var(--red-bright); }
.lb-points { font-family: var(--font-head); font-weight: 700; color: #ffd76a; }

/* ── Profile head ────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-head__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-strong); }
.profile-head__avatar--letter {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(230, 25, 43, 0.3), rgba(230, 25, 43, 0.08));
    color: var(--red-bright); font-family: var(--font-head); font-weight: 700; font-size: 30px;
}

/* ── Achievements ────────────────────────────────────────── */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ach-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 18px; text-align: center; transition: transform 0.2s ease, border-color 0.2s ease;
}
.ach-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.ach-card__emoji { font-size: 34px; display: block; margin-bottom: 8px; }
.ach-card__name { font-family: var(--font-head); font-weight: 700; font-size: 17px; display: block; }
.ach-card__desc { color: var(--gray); font-size: 14px; display: block; margin-top: 4px; }
.ach-card--locked { opacity: 0.45; filter: grayscale(1); }

/* ── Directory cards as links ────────────────────────────── */
a.directory-card { text-decoration: none; color: inherit; display: block; }

/* ── Casino rules page ───────────────────────────────────── */
.casino-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.casino-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; transition: transform 0.2s ease, border-color 0.2s ease;
}
.casino-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.casino-card h3 { font-size: 22px; margin: 0 0 6px; }
.casino-card ul { margin: 12px 0 16px; padding-left: 20px; color: var(--gray); }
.casino-card ul li { margin-bottom: 6px; }
.payout-row {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 15px;
}
.payout-row:last-child { border-bottom: 0; }
.payout-row span:last-child { font-family: var(--font-head); font-weight: 700; color: #ffd76a; }

@media (max-width: 768px) {
    .ach-grid { grid-template-columns: 1fr 1fr; }
    .casino-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .ach-grid { grid-template-columns: 1fr; }
    .profile-head { flex-direction: column; text-align: center; }
}
