:root {
    --primary: #2a1a3a;
    --primary-dark: #140a26;
    --secondary: #9d4edd;
    --accent: #e0aaff;
    --bg-dark: #1a0f26;
    --bg-darker: #120818;
    --bg-card: #241433;
    --bg-card-hover: #301a44;
    --text-primary: #f7f1ff;
    --text-secondary: #d4c4e4;
    --text-muted: #9a86ad;
    --text-link: #e0aaff;
    --secondary-rgb: 157, 78, 221;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --header-height: 72px;
    --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
    --font-heading: "Fredoka", "Segoe UI", sans-serif;
    --line: rgba(224, 170, 255, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
    margin: 0;
    min-height: 100vh;
    padding-top: var(--header-height);
    background:
        repeating-linear-gradient(90deg, rgba(157, 78, 221, 0.05) 0 1px, transparent 1px 72px),
        radial-gradient(1200px 500px at 50% -10%, rgba(157, 78, 221, 0.28), transparent 60%),
        var(--bg-darker);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; letter-spacing: 0.01em; line-height: 1.15; margin: 0 0 0.4em; }
p { margin: 0 0 0.8em; }

.hb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: #160c22;
    border-bottom: 1px solid var(--line);
}
.hb-header-inner {
    width: min(1120px, 100%);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}
.hb-logo { flex: 0 0 auto; display: flex; align-items: center; }
.hb-logo img { width: 168px; height: auto; }
.hb-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
.hb-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 15px;
}
.hb-nav-link.is-active { color: var(--bg-darker); background: var(--accent); }
.hb-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #120818;
}
.hb-tools .hb-btn { padding: 8px 14px; animation: none; box-shadow: none; }
.hb-auth { display: flex; gap: 8px; }
.hb-account { display: none; }
#authButtons[style*="display: none"] ~ .hb-account,
#authButtons[style*="display:none"] ~ .hb-account {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    text-decoration: none;
    color: var(--accent);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
}
.hb-drawer-account { display: none; }
.hb-drawer:has(#authButtons2[style*="display: none"]) .hb-drawer-account,
.hb-drawer:has(#authButtons2[style*="display:none"]) .hb-drawer-account { display: block; }
.hb-burger {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    padding: 10px;
}
.hb-burger span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--accent);
}

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--accent);
    color: #1a0f26;
    font-family: var(--font-heading);
    font-weight: 600;
    animation: hb-wave 2.6s ease-in-out infinite;
}
.hb-btn-primary { background: var(--accent); color: #1a0f26; }
.hb-btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    animation: none;
}
@keyframes hb-wave {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 170, 255, 0.15), 0 0 14px rgba(157, 78, 221, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(224, 170, 255, 0.08), 0 0 28px rgba(224, 170, 255, 0.55); }
}
@keyframes hb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(224, 170, 255, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(224, 170, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 170, 255, 0); }
}

.hb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 140;
}
.hb-overlay[hidden] { display: none; }
.hb-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 320px);
    z-index: 150;
    background: #1b1028;
    border-left: 1px solid var(--line);
    padding: 64px 18px 24px;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}
.hb-drawer:not([hidden]) { display: flex; }
.hb-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 32px;
    cursor: pointer;
}
.hb-drawer-link {
    display: block;
    padding: 14px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}
.hb-drawer-link.hb-drawer-account { display: none; }
.hb-drawer:has(#authButtons2[style*="display: none"]) .hb-drawer-account,
.hb-drawer:has(#authButtons2[style*="display:none"]) .hb-drawer-account { display: block; }
.hb-drawer-auth { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
@media (min-width: 961px) {
    .hb-drawer, .hb-drawer:not([hidden]) { display: none !important; }
    .hb-overlay { display: none !important; }
}
@media (max-width: 960px) {
    .hb-nav { display: none; }
    .hb-auth { display: none !important; }
    .hb-account,
    #authButtons[style*="display: none"] ~ .hb-account,
    #authButtons[style*="display:none"] ~ .hb-account { display: none !important; }
    .hb-header-inner { justify-content: space-between; }
    .hb-tools { margin-left: auto; border: 0; background: transparent; padding: 0; }
    .hb-burger { display: block; margin-left: 0; }
    .hb-logo img { width: 92px; }
    .hb-header { padding: 0 12px; }
}

.hb-main { min-height: calc(100vh - var(--header-height)); }
.hb-wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hb-wrap-tight { width: min(760px, calc(100% - 32px)); margin: 0 auto; }
.hb-band { padding: 22px 0; }
.hb-band h2 { font-size: 1.45rem; }

.hb-hero { text-align: center; padding: 28px 0 8px; }
.hb-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.hb-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hb-lead { max-width: 46rem; margin: 0 auto 16px; color: var(--text-secondary); }
.hb-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.hb-strip a,
.hb-strip button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    text-align: center;
    animation: none;
    box-shadow: none;
}
.hb-strip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid rgba(224, 170, 255, 0.35);
    animation: hb-pulse 2.8s ease-out infinite;
}
.hb-strip span { display: block; margin-top: 6px; font-size: 12px; color: var(--text-secondary); }
@media (max-width: 900px) {
    .hb-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .hb-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.hb-table-wrap { overflow-x: auto; max-width: 100%; }
.hb-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.hb-table th, .hb-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.hb-table th { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }

.hb-dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hb-dist li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 48px; gap: 12px; align-items: center; }
.hb-dist-bar { height: 10px; background: rgba(255,255,255,0.12); border-radius: 5px; overflow: hidden; }
.hb-dist-bar i { display: block; height: 100%; background: var(--accent); }

.hb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hb-stat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}
.hb-stat strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; }
.hb-stat span { color: var(--text-muted); font-size: 13px; }
@media (max-width: 640px) { .hb-stats { grid-template-columns: 1fr; } }

.hb-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hb-share p { margin: 0; color: var(--text-secondary); }

.hb-disclaimer {
    margin-top: 10px;
    padding: 18px 0 28px;
    color: var(--text-muted);
    font-size: 14px;
}
.hb-disclaimer p {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}

.hb-pagehead { padding: 26px 0 8px; }
.hb-pagehead h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hb-note { color: var(--text-secondary); }

.hb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.hb-chip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    animation: none;
}
.hb-chip.is-active { background: var(--accent); color: #1a0f26; border-color: var(--accent); }

.hb-series { margin: 22px 0 8px; }
.hb-series h2 { font-size: 1.3rem; }
.hb-series p { color: var(--text-muted); margin-top: -4px; }
.hb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 900px) {
    .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hb-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 6px 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: center;
    position: relative;
}
.hb-tile-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid rgba(224, 170, 255, 0.28);
}
.hb-tile-art img { width: 100%; height: 100%; object-fit: contain; }
.hb-tile-name { font-size: 13px; color: var(--text-secondary); }
.hb-tile-lock {
    display: none;
    position: absolute;
    inset: 8px 6px auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(12, 6, 18, 0.72);
    color: var(--accent);
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 13px;
    font-family: var(--font-heading);
}
.hb-tile-locked .hb-tile-lock { display: flex; }
.hb-tag {
    position: absolute;
    top: 14px;
    left: 18%;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
}
.hb-tag + .hb-tag { left: auto; right: 18%; background: #6d28d9; }

.hb-banner {
    background: #2a1840;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    margin: 8px 0 16px;
    color: var(--text-secondary);
}

.hb-gamebox, .hb-gameback { display: none; }
.hb-gameback.is-open { display: block; }
.hb-gamebox.is-open { display: flex; flex-direction: column; }
.hb-gameback {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
}
.hb-gamebox {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1000px, 90vw);
    height: 90vh;
    background: #0e0716;
    border-radius: 16px;
    z-index: 1002;
    border: 1px solid var(--line);
}
.hb-gamebox iframe { flex: 1; min-height: 0; width: 100%; height: auto; border: 0; }
.hb-gamebox-x {
    position: relative;
    align-self: flex-end;
    flex: 0 0 auto;
    margin: 8px 8px 0 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #e0aaff;
    color: #1a0f26;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
body.game-modal-open { overflow: hidden; }
@media (max-width: 768px) {
    .hb-gamebox { width: 95vw; height: 95vh; }
}

.hb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .hb-cards { grid-template-columns: 1fr; } }
.hb-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.hb-card-band {
    height: 72px;
    background: linear-gradient(120deg, #3a1860, #9d4edd 70%, #e0aaff);
}
.hb-card-band-b { background: linear-gradient(120deg, #1a1030, #6d28d9, #f0abfc); }
.hb-card-band-c { background: linear-gradient(120deg, #2a1038, #c026d3, #e9d5ff); }
.hb-card-body { padding: 14px; }
.hb-card h3 { font-size: 1.05rem; }
.hb-card p { color: var(--text-secondary); font-size: 14px; }

.hb-prose h2 { margin-top: 1.3em; font-size: 1.35rem; }
.hb-prose ul { padding-left: 1.2em; }
.hb-prose li { margin: 0.3em 0; }
.hb-crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.hb-crumbs a { color: var(--accent); }

.hb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .hb-split { grid-template-columns: 1fr; } }
.hb-panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}
.hb-acct-form, .hb-authform { display: flex; flex-direction: column; gap: 6px; }
.hb-acct-form input, .hb-authform input, .hb-field {
    width: 100%;
    background: #120818;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}
.hb-meter { height: 12px; background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; }
.hb-meter span { display: block; height: 100%; width: 0; background: var(--accent); }

.hb-faq details {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}
.hb-faq summary { cursor: pointer; font-family: var(--font-heading); }
.hb-group { margin-top: 22px; }

.hb-board-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.hb-you { color: var(--accent); }

.hb-news { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hb-news article {
    border-left: 3px solid var(--secondary);
    padding: 4px 0 4px 14px;
}
.hb-news time { color: var(--text-muted); font-size: 13px; }

.hb-footer {
    border-top: 1px solid var(--line);
    padding: 22px 16px 28px;
    background: #120818;
    display: flex;
    justify-content: center;
}
.hb-footer-inner {
    width: min(1120px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.hb-footer-mark { font-family: var(--font-heading); color: var(--accent); text-decoration: none; font-size: 1.2rem; }
.hb-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
.hb-footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.hb-badges { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hb-badge { background: #f4f2ea; padding: 6px 9px; border-radius: 8px; display: inline-flex; }
.hb-badge img { height: 26px; width: auto; }
.hb-age {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}
.hb-address, .hb-copy { margin: 0; color: var(--text-muted); font-size: 13px; }

.hb-agegate {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 4, 14, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hb-agegate[hidden] { display: none; }
.hb-agegate-card {
    width: min(440px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
}
.hb-agegate-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hb-cookie {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1600;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: #241433;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    max-width: 720px;
    margin: 0 auto;
}
.hb-cookie[hidden] { display: none; }
.hb-cookie p { margin: 0; font-size: 14px; color: var(--text-secondary); }

.hb-authmodal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1800;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hb-authmodal.is-open { display: flex; }
.hb-authmodal-back {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}
.hb-authmodal-card {
    position: relative;
    z-index: 1;
    width: min(460px, 95vw);
    max-height: 90vh;
    overflow: auto;
    background: #1c1028;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 18px 18px;
}
.hb-authmodal-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 30px;
    cursor: pointer;
}
.hb-authmodal-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.hb-authmodal-tabs button {
    flex: 1;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px;
    cursor: pointer;
    animation: none;
}
.hb-authmodal-tabs button.is-active { background: var(--accent); color: #1a0f26; }
#registerForm { display: none; }
#loginForm { display: flex; }

.hb-bonus {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(0,0,0,0.65);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.hb-bonus.is-open { display: flex; }
.hb-bonus-card {
    width: min(400px, 95vw);
    background: var(--bg-card);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--line);
}

.m-notification {
    position: fixed;
    top: 84px;
    right: 12px;
    z-index: 2100;
    background: #2a1840;
    color: var(--text-primary);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    max-width: min(360px, calc(100vw - 24px));
    opacity: 0;
}
.m-notification.show { opacity: 1; }

body.nav-open { overflow: hidden; }
body.modal-open { overflow: hidden; }
