@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&family=Sora:wght@400;600;700&display=swap');

:root {
    --ink: #06080f;
    --ink2: #0f1624;
    --surface: rgba(15, 22, 36, 0.94);
    --surface2: rgba(12, 18, 32, 0.88);
    --line: rgba(45, 212, 191, 0.22);
    --text: #e8eef8;
    --muted: #8b9bb8;
    --teal: #2dd4bf;
    --teal-dim: rgba(45, 212, 191, 0.35);
    --coral: #fb7185;
    --coral-dim: rgba(251, 113, 133, 0.4);
    --sky: #38bdf8;
    --warn-bg: #1a0f14;
    --warn-border: #fb7185;
    --warn-glow:
        0 0 0 1px rgba(251, 113, 133, 0.5),
        0 12px 40px rgba(251, 113, 133, 0.12);
    --radius-pill: 999px;
    --radius-card: 22px;
    --radius-panel: 16px;
    --font-body: 'Outfit', system-ui, sans-serif;
    --font-display: 'Sora', system-ui, sans-serif;
    --shadow-deep: 0 32px 100px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--ink);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse 80% 50% at 100% 0%,
            rgba(56, 189, 248, 0.08),
            transparent 55%
        ),
        radial-gradient(
            ellipse 60% 40% at 0% 100%,
            rgba(251, 113, 133, 0.06),
            transparent 50%
        );
    z-index: -1;
}

html:not(.captcha-done) body:has(#captcha-overlay) {
    overflow: hidden;
}

html.captcha-done #captcha-overlay {
    display: none !important;
}

a {
    color: var(--teal);
    text-decoration: none;
}
a:hover {
}

.shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 96px;
}

/* —— Captcha —— */
.captcha-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(4, 8, 14, 0.88);
    backdrop-filter: blur(10px);
}

.captcha-modal {
    width: min(100%, 380px);
    padding: 28px;
    border-radius: var(--radius-card);
    background: linear-gradient(165deg, var(--ink2), #0a121f);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-deep);
}

.captcha-modal h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.captcha-modal > p {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 18px;
}

.puzzle-gate {
    margin-bottom: 4px;
}

.puzzle-gate__board-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 14px;
    line-height: 0;
}

.puzzle-gate__board-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 140px;
}

.puzzle-gate__track-wrap {
    margin-bottom: 18px;
}

.puzzle-gate__track {
    position: relative;
    height: 52px;
    border-radius: var(--radius-pill);
    background: rgba(8, 12, 22, 0.95);
    border: 1px solid var(--line);
    cursor: pointer;
}

.puzzle-gate__rail {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(
        90deg,
        rgba(45, 212, 191, 0.22),
        rgba(251, 113, 133, 0.14)
    );
    pointer-events: none;
}

.puzzle-gate__knob {
    position: absolute;
    top: 4px;
    left: 0;
    width: auto;
    height: calc(100% - 8px);
    border-radius: 14px;
    border: 2px solid rgba(232, 238, 248, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    cursor: grab;
    touch-action: none;
}

.puzzle-gate__knob canvas {
    display: block;
    height: 100%;
    width: auto;
}

.puzzle-gate__knob.is-aligned {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px var(--teal-dim);
}

.puzzle-gate__knob:active {
    cursor: grabbing;
}

/* —— Top bar —— */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 0;
    background: linear-gradient(
        180deg,
        rgba(6, 8, 15, 0.96),
        rgba(6, 8, 15, 0.88)
    );
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    margin: 0 -22px;
    padding-left: 22px;
    padding-right: 22px;
}

.logo-mark {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-mark img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: center;
}
.main-nav a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
}
.main-nav a:hover {
    color: var(--text);
    background: rgba(45, 212, 191, 0.1);
}

.wallet {
    font-size: 0.82rem;
    color: var(--muted);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--surface2);
}
.wallet strong {
    color: var(--teal);
    font-family: var(--font-display);
    font-weight: 700;
}

/* —— Warning strip (high visibility) —— */
.alert-strip {
    margin: 16px 0 0;
    padding: 14px 18px;
    border-radius: var(--radius-panel);
    background: var(--warn-bg);
    border: 2px solid var(--warn-border);
    box-shadow: var(--warn-glow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}
.alert-strip .badge-18 {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--coral), #f43f5e);
    color: #0a0610;
    letter-spacing: 0.06em;
}
.alert-strip p {
    flex: 1;
    min-width: 220px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fce7f3;
    line-height: 1.45;
}
.alert-strip .sub-note {
    width: 100%;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    margin-top: 2px;
}

/* —— Hero & editorial —— */
.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: start;
    padding: 48px 0 56px;
}
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero-copy .kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--coral);
}

.hero-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 18px;
}

.hero-copy .lead {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 36ch;
    margin-bottom: 26px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}
.btn:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}
.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    color: #041018;
    background: linear-gradient(120deg, var(--teal), var(--sky));
    box-shadow: 0 12px 32px rgba(45, 212, 191, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 14px 40px rgba(56, 189, 248, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
.btn-ghost:hover {
    border-color: var(--teal);
    background: rgba(45, 212, 191, 0.08);
}

.hero-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-board {
    padding: 22px;
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-deep);
}
.stat-board h3 {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}
.stat-rows {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}
.stat-rows .num {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
}
.stat-rows .lbl {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-rows > div + div {
    border-left: 1px solid var(--line);
}

/* Diagonal ribbon */
.ribbon {
    margin: 8px -22px 48px;
    padding: 16px 22px;
    background: linear-gradient(105deg, #134e4a 0%, #1e3a5f 45%, #4c1d3d 100%);
    transform: skewY(-1.2deg);
    transform-origin: 100% 0;
}
.ribbon p {
    transform: skewY(1.2deg);
    text-align: center;
    font-weight: 600;
    font-size: 0.98rem;
}

/* Section pattern */
.section {
    margin-bottom: 56px;
}
.section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}
.accent-bar {
    width: 4px;
    min-height: 2.2em;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--teal), var(--coral));
    flex-shrink: 0;
    margin-top: 4px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}
.section-intro {
    color: var(--muted);
    max-width: 62ch;
    margin-bottom: 20px;
}

.bullet-list {
    list-style: none;
    max-width: 52ch;
}
.bullet-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    color: var(--muted);
}
.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 12px var(--coral-dim);
}

/* Game grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
@media (max-width: 800px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}

.game-card {
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s ease,
        border-color 0.2s;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--teal-dim);
}
.game-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--ink2);
}
.game-card .body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}
.game-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
}
.game-card p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
}
.game-card .btn-primary {
    align-self: flex-start;
}

/* Two columns editorial */
.dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
@media (max-width: 800px) {
    .dual {
        grid-template-columns: 1fr;
    }
}
.dual-col h3 {
    font-family: var(--font-display);
    margin-bottom: 14px;
    font-size: 1.15rem;
}
.dual-col p {
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 0.96rem;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 700px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}
.faq-item {
    padding: 18px 18px 18px 20px;
    border-radius: var(--radius-panel);
    background: var(--surface2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--coral);
}
.faq-item strong {
    display: block;
    font-family: var(--font-display);
    margin-bottom: 8px;
    font-size: 0.98rem;
}
.faq-item p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* CTA end */
.end-cta {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-card);
    border: 1px dashed var(--line);
    background: rgba(15, 22, 36, 0.5);
}
.end-cta p {
    color: var(--muted);
    margin-bottom: 16px;
    max-width: 48ch;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.site-footer {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}
.footer-brand p {
    color: var(--muted);
    font-size: 0.9rem;
}
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: rgba(45, 212, 191, 0.12);
    color: var(--teal);
    border: 1px solid var(--line);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 700px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}
.footer-col a {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
    padding: 4px 0;
    opacity: 0.85;
}
.footer-col a:hover {
    opacity: 1;
    color: var(--teal);
}

.support-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 28px;
    padding: 22px;
    margin-bottom: 24px;
    border-radius: var(--radius-panel);
    background: var(--surface2);
    border: 1px solid var(--line);
}
.support-strip > span {
    font-size: 0.82rem;
    color: var(--muted);
    width: 100%;
    text-align: center;
    font-weight: 600;
}
.support-strip a {
    display: flex;
    align-items: center;
    opacity: 0.9;
}
.support-strip a:hover {
    opacity: 1;
}
.support-strip img {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.disclaimer {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    max-width: 56ch;
    margin: 0 auto 16px;
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--muted);
}

/* Legal / inner pages */
.page-main {
    padding: 32px 0 48px;
    max-width: 720px;
}
.page-main h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 12px;
}
.page-main .meta {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 28px;
}
.page-main h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin: 28px 0 12px;
}
.page-main p,
.page-main li {
    color: var(--muted);
    margin-bottom: 12px;
}
.page-main ul {
    padding-left: 1.2em;
    margin-bottom: 16px;
}

/* —— Game pages —— */
body.game-page {
    padding-bottom: 48px;
}

.game-top {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 22px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(6, 8, 15, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.game-top h1 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.game-top .back {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}
.game-top .back:hover {
    color: var(--teal);
}

.game-layout {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 22px 0;
}

.game-stage {
    border-radius: var(--radius-card);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-deep);
}

.game-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.digital {
    font-family: var(--font-display);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--teal);
    letter-spacing: 0.04em;
}

.big-num {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    text-align: center;
    color: var(--teal);
    text-shadow: 0 0 40px var(--teal-dim);
    margin: 8px 0 20px;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.choice-row .btn {
    min-width: 120px;
}
.choice-row .btn.picked {
    box-shadow:
        0 0 0 3px var(--teal),
        0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-hi {
    background: linear-gradient(120deg, #34d399, #10b981);
    color: #041018;
}
.btn-lo {
    background: linear-gradient(120deg, #f472b6, #e879f9);
    color: #0a0610;
}
.btn-mid {
    background: linear-gradient(120deg, var(--coral), #f97316);
    color: #0a0610;
}

.controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-panel);
    background: var(--surface2);
    border: 1px solid var(--line);
    margin-bottom: 16px;
}
.controls-bar label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}
.round-input {
    width: 100px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
}
.quick-btns {
    display: flex;
    gap: 8px;
}
.quick-btns button {
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--ink2);
    color: var(--muted);
    cursor: pointer;
}
.quick-btns button:hover {
    color: var(--teal);
    border-color: var(--teal-dim);
}

.rules-foot {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 14px 16px 14px 20px;
    border-left: 3px solid var(--coral);
    background: rgba(12, 18, 32, 0.65);
    border-radius: 0 var(--radius-panel) var(--radius-panel) 0;
}

/* Dice */
.dice-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 20px 0;
}
.die {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(145deg, #1a2332, #0d121c);
    border: 2px solid var(--line);
    color: var(--text);
}
.die.hidden {
    background: linear-gradient(145deg, #fb7185, #a855f7);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
}

/* Cards */
.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 88px;
    margin: 12px 0;
}
.playing-card {
    width: 56px;
    height: 80px;
    border-radius: 8px;
    background: #f8fafc;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.playing-card.red {
    color: #e11d48;
}
.playing-card.dark {
    color: #0f172a;
}
.playing-card.back {
    background: linear-gradient(135deg, #fb7185, #7c3aed);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    border: none;
}

.hand-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-align: center;
    margin-bottom: 6px;
}
.hand-total {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--sky);
    margin-top: 8px;
    min-height: 1.3em;
}

/* Reels */
.reels {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 20px 0;
}
.reel-cell {
    width: 76px;
    height: 88px;
    border-radius: 14px;
    border: 2px solid rgba(251, 113, 133, 0.45);
    background: var(--ink);
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    overflow: hidden;
}
.reel-cell.spinning {
    animation: reelblur 0.12s linear infinite;
}
@keyframes reelblur {
    0% {
        opacity: 0.7;
        transform: scaleY(0.92);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.02);
    }
    100% {
        opacity: 0.7;
        transform: scaleY(0.92);
    }
}

.status-msg {
    text-align: center;
    min-height: 1.4em;
    font-weight: 600;
    color: var(--sky);
    margin-top: 8px;
}

.btn-stand {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--line);
}
