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

:root {
    --bg: #060606;
    --surface: rgba(14, 14, 12, 0.9);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --surface-border: rgba(255, 224, 130, 0.12);
    --text: #fffdf5;
    --muted: #d4c9a6;
    --gold: #f4c95d;
    --gold-deep: #a97408;
    --ivory: #fff8de;
    --ivory-deep: #d8cfb1;
    --green: #b8ffcf;
    --amber: #f4c95d;
    --danger: #ffb388;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 12%, rgba(244, 201, 93, 0.14), transparent 24%),
        radial-gradient(circle at 88% 16%, rgba(255, 248, 222, 0.1), transparent 24%),
        linear-gradient(180deg, #0a0904 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Sora", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 120%);
}

.page-glow {
    position: fixed;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.12;
    pointer-events: none;
}

.page-glow-red {
    top: -8rem;
    left: -10rem;
    background: var(--gold);
}

.page-glow-blue {
    right: -10rem;
    top: 10rem;
    background: var(--ivory);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 32px));
    margin: 24px auto 48px;
    display: grid;
    gap: 22px;
}

.site-header,
.hero-card,
.pool-card,
.control-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.site-header {
    border-radius: 36px;
    padding: 30px 32px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.site-kicker,
.meta-label,
.pool-note,
.helper-copy,
#wallet-note,
#contract-note {
    color: var(--muted);
}

.site-kicker,
.meta-label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
}

.site-header h1 {
    margin: 10px 0 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
    max-width: 11ch;
}

.site-copy {
    margin: 0;
    max-width: 48ch;
    color: var(--muted);
    line-height: 1.65;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 10px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--surface-border);
    background: linear-gradient(180deg, rgba(255, 248, 222, 0.08), rgba(255, 248, 222, 0.03));
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge::before,
.status-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
    box-shadow: 0 0 16px currentColor;
}

.connect-button,
.pool-button,
.secondary-button {
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.connect-button:hover:not(:disabled),
.pool-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.connect-button:disabled,
.pool-button:disabled,
.secondary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.connect-button {
    padding: 0 20px;
    background: linear-gradient(135deg, #fff3bf, #f4c95d);
    color: #1a1202;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 22px;
}

.hero-card {
    border-radius: var(--radius-xl);
    padding: 26px 28px;
}

.hero-main {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: center;
}

.hero-stat {
    display: grid;
    gap: 8px;
}

.hero-stat strong {
    font-size: clamp(1.4rem, 2.4vw, 2.8rem);
}

.hero-timer {
    justify-items: center;
}

.hero-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.hero-rules h2 {
    margin: 0 0 16px;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.rules-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 12px;
    color: var(--muted);
    line-height: 1.55;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 360px) 1fr;
    gap: 22px;
}

.pool-card,
.control-card {
    border-radius: var(--radius-xl);
    padding: 26px;
}

.pool-card {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 20px;
}

.orb-stage {
    width: 100%;
    min-height: clamp(248px, 30vw, 340px);
    display: grid;
    place-items: center;
}

.orb {
    --orb-scale: 1;
    width: clamp(172px, 22vw, 270px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    transform: scale(var(--orb-scale));
    transform-origin: center center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    max-width: 100%;
}

.orb::before,
.orb::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.orb::before {
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.orb::after {
    inset: 12%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 40%, rgba(255, 255, 255, 0.04));
}

.orb span {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.orb-red {
    background: radial-gradient(circle at 28% 26%, #fff4c5 0%, #ffe08a 24%, var(--gold) 54%, var(--gold-deep) 100%);
    box-shadow: 0 0 60px rgba(244, 201, 93, 0.24), inset -24px -30px 50px rgba(0, 0, 0, 0.34);
}

.orb-blue {
    background: radial-gradient(circle at 28% 26%, #ffffff 0%, #fff9eb 24%, var(--ivory) 54%, var(--ivory-deep) 100%);
    box-shadow: 0 0 60px rgba(255, 248, 222, 0.18), inset -24px -30px 50px rgba(0, 0, 0, 0.28);
    color: #111111;
}

.pool-block {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
}

.pool-block strong {
    font-size: clamp(1.5rem, 2.3vw, 2.5rem);
}

.pool-note {
    font-size: 0.96rem;
}

.pool-signal {
    min-height: 26px;
}

.pool-button {
    width: 100%;
}

.pool-button-red {
    background: linear-gradient(135deg, #ffe28d, #f4c95d);
    color: #1f1604;
}

.pool-button-blue {
    background: linear-gradient(135deg, #ffffff, #efe4bd);
    color: #111111;
}

.control-card {
    display: grid;
    align-content: start;
    gap: 18px;
}

.control-group {
    display: grid;
    gap: 10px;
}

.input-shell {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    border: 1px solid var(--surface-border);
}

.input-shell-compact {
    min-width: 0;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.15rem;
}

.input-shell span {
    color: var(--muted);
}

.claim-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.secondary-button {
    padding: 0 18px;
    background: rgba(255, 248, 222, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 224, 130, 0.1);
}

.secondary-button-wide {
    width: 100%;
}

.helper-copy {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.message-card {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    line-height: 1.55;
    min-height: 82px;
}

.status-stack {
    display: grid;
    gap: 8px;
}

.status-stack p {
    margin: 0;
    line-height: 1.55;
}

.ok {
    color: var(--green);
}

.warn {
    color: var(--amber);
}

.danger {
    color: var(--danger);
}

.badge.ok,
.status-chip.ok,
.message-card.ok {
    color: var(--green);
    border-color: rgba(121, 227, 182, 0.18);
    background: rgba(121, 227, 182, 0.08);
}

.badge.warn,
.status-chip.warn,
.message-card.warn {
    color: var(--amber);
    border-color: rgba(255, 207, 116, 0.18);
    background: rgba(255, 207, 116, 0.08);
}

.badge.danger,
.status-chip.danger,
.message-card.danger {
    color: var(--danger);
    border-color: rgba(255, 155, 130, 0.18);
    background: rgba(255, 155, 130, 0.08);
}

@media (max-width: 1080px) {
    .hero-grid,
    .game-grid {
        grid-template-columns: 1fr;
    }

    .hero-main {
        grid-template-columns: 1fr;
    }

    .hero-timer {
        justify-items: flex-start;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100vw - 20px, 1180px);
        margin: 10px auto 28px;
    }

    .site-header,
    .hero-card,
    .pool-card,
    .control-card {
        padding: 20px;
        border-radius: 24px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .orb-stage {
        min-height: 228px;
    }

    .claim-row {
        grid-template-columns: 1fr;
    }
}
