:root {
    --bg: #0a0f18;
    --bg-elev: #131b28;
    --line: rgba(103, 232, 249, 0.2);
    --text: #e8eef8;
    --muted: #8b9bb4;
    --accent: #67e8f9;
    --accent-2: #34d399;
    --danger: #fb7185;
    --radius: 16px;
    --font-display: "Syne", "Syne", Impact, sans-serif;
    --font-body: "Figtree", "Figtree", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(1100px 520px at 85% -8%, rgba(103, 232, 249, 0.14), transparent 55%),
        radial-gradient(800px 480px at -5% 30%, rgba(52, 211, 153, 0.1), transparent 50%),
        linear-gradient(180deg, #0e1522 0%, var(--bg) 42%, #070b12 100%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

/* —— nav —— */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(7, 9, 8, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.brand-mark {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 0 22px rgba(103, 232, 249, 0.45);
    background: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a.active { color: var(--accent); }

.hot-nav { position: relative; }
.hot-badge {
    position: absolute;
    top: -0.55rem;
    right: -0.9rem;
    background: #e04848;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 0.1rem 0.32rem;
    border-radius: 5px;
    letter-spacing: 0.04em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--accent);
    color: #0a1220;
    box-shadow: 0 8px 28px rgba(103, 232, 249, 0.25);
}

.btn-primary:hover { box-shadow: 0 10px 36px rgba(103, 232, 249, 0.4); }

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

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-teal,
button.btn-teal {
    background: #67e8f9;
    color: #0a1220 !important;
    border: none;
    font-weight: 800;
}

.btn-teal:hover { filter: brightness(1.06); }

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-with-icon .btn-icon {
    flex-shrink: 0;
    display: block;
}

.btn-dark,
button.btn-dark {
    background: #1a2436 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-dark:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: #243044 !important;
}

.connect-wallet-btn.connected {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

/* —— wallet picker —— */
.wallet-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.wallet-picker-overlay.open { display: flex; }
.wallet-picker {
    width: min(420px, 100%);
    background: #131b28;
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: 18px 18px 14px 14px;
    padding: 1.25rem 1.15rem 1.1rem;
    position: relative;
    margin-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}
.wallet-picker h3 {
    margin: 0 0 0.35rem;
    font-family: "Syne", sans-serif;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}
.wallet-picker-sub {
    margin: 0 0 1rem;
    color: #8b9bb4;
    font-size: 0.88rem;
    line-height: 1.4;
}
.wallet-picker-close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    background: transparent;
    border: 0;
    color: #8b9bb4;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.wallet-pick-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    padding: 0.85rem 1rem;
    margin-bottom: 0.55rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0e1520;
    color: #f2f7f4;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.wallet-pick-status {
    margin-left: auto;
    font-size: 0.78rem;
    color: #7f91ab;
}

.wallet-pick-status.ok { color: #67e8f9; }

.wallet-btn-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
}

.connect-wallet-btn {
    gap: 0.45rem;
}

.wallet-account-menu {
    position: absolute;
    z-index: 10000;
    min-width: 180px;
    display: none;
    flex-direction: column;
    background: #151b19;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.wallet-account-menu.open { display: flex; }

.wallet-account-menu button {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #eef5ea;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.wallet-account-menu button:last-child { border-bottom: 0; }
.wallet-account-menu button:hover { background: rgba(45, 212, 191, 0.12); }
.wallet-pick-btn:hover,
.wallet-pick-btn:active {
    border-color: #67e8f9;
    background: #101a17;
}
.wallet-pick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    background: #0e1520;
}
.wallet-pick-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.wallet-pick-text strong { font-size: 1rem; }
.wallet-pick-text small { color: #7f91ab; font-size: 0.78rem; }
.wallet-picker-hint {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #67e8f9;
    text-align: center;
    min-height: 1.1em;
}

.pay-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.5rem 0;
}
.pay-mobile-links .btn {
    width: 100%;
    text-align: center;
}

@media (min-width: 701px) {
    .wallet-picker-overlay { align-items: center; }
    .wallet-picker { border-radius: 16px; }
}

/* —— hero —— */
.hero {
    position: relative;
    min-height: calc(100vh - 70px);
    display: grid;
    align-content: center;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 10% -20% auto;
    height: 55%;
    background:
        linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.07), transparent),
        repeating-linear-gradient(
            -12deg,
            transparent 0 18px,
            rgba(255, 255, 255, 0.015) 18px 19px
        );
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000, transparent);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
    width: fit-content;
    animation: fadeUp 0.7s ease both;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    max-width: 11ch;
    animation: fadeUp 0.8s 0.05s ease both;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    margin-top: 1.25rem;
    max-width: 34rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    animation: fadeUp 0.8s 0.12s ease both;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    animation: fadeUp 0.8s 0.18s ease both;
}

.hero-orbit {
    position: absolute;
    right: max(0px, calc((100% - 1120px) / 2 - 1rem));
    top: 18%;
    width: min(42vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(103, 232, 249, 0.15);
    background:
        radial-gradient(circle at 40% 35%, rgba(103, 232, 249, 0.35), transparent 45%),
        radial-gradient(circle at 70% 70%, rgba(52, 211, 153, 0.25), transparent 40%);
    filter: blur(2px);
    animation: pulseOrb 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseOrb {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.06); opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* —— sections —— */
.section {
    padding: 4.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.section p.lead {
    color: var(--muted);
    max-width: 36rem;
    margin-bottom: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.step {
    padding: 1.4rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius);
    background: rgba(16, 20, 18, 0.65);
}

.step-num {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.step h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.step p { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0 2rem;
    color: var(--muted);
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem 1.75rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.footer-brand {
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    order: 0;
}

.footer-link-left {
    order: -1;
}

.footer-link-right {
    order: 1;
}

.footer a {
    color: #6f857a;
    text-decoration: none;
    font-size: 0.94rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.footer a:hover { color: var(--accent-2); }

@media (max-width: 520px) {
    .footer {
        flex-direction: column;
        gap: 0.55rem;
        max-width: none;
        text-align: center;
    }
    .footer-brand { order: -1; }
    .footer-link-left,
    .footer-link-right { order: 0; }
}

/* —— legal pages —— */
.legal-page {
    padding: 2.5rem 0 4rem;
    max-width: 42rem;
}

.legal-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.legal-page h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.03em;
    margin: 0 0 0.5rem;
}

.legal-updated {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0 0 1.75rem;
}

.legal-page h2 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.45rem;
    font-weight: 700;
}

.legal-page p {
    color: #9aabc4;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 0.35rem;
}

/* —— create page —— */
.create-page { padding: 2.5rem 0 4rem; }

.create-head {
    margin-bottom: 1.75rem;
}

.create-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
}

.create-head p { color: var(--muted); margin-top: 0.4rem; }

.form-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 16, 14, 0.85);
    border-radius: 20px;
    padding: clamp(1.2rem, 3vw, 2rem);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field { margin-bottom: 1rem; }

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #c5d4c2;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    background: #0a0e0b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    outline: none;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; }

.upload {
    position: relative;
    border: 1px dashed rgba(103, 232, 249, 0.35);
    border-radius: 12px;
    width: 160px;
    height: 160px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
    overflow: hidden;
    background: #0a0e0b;
}

.upload input { display: none; }

.upload img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    display: none;
}

.upload.has-image img { display: block; }
.upload.has-image .upload-placeholder { display: none; }

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fee-row strong { color: var(--accent); font-size: 1.15rem; }

.launch-full { width: 100%; padding: 1rem; font-size: 1rem; }

/* modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
    width: min(440px, 100%);
    background: #0f1411;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.4rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.modal .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; text-align: center; }

/* Payment QR — centered in all modals */
.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0.75rem;
    padding: 0.85rem;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: fit-content;
    max-width: 100%;
}

.qr-box canvas,
.qr-box .pay-qr-img,
.qr-box img {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
    background: #000;
}

.qr-box .hint {
    color: #8b9bb4;
    font-size: 0.78rem;
    text-align: center;
}

.steps-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #222;
    color: #888;
}

.pill.on { background: var(--accent); color: #111; }

.addr {
    word-break: break-all;
    font-size: 0.8rem;
    background: #0a0e0b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem;
    margin: 0.5rem 0 0.75rem;
}

.status-line { font-size: 0.85rem; color: var(--accent-2); margin: 0.5rem 0; }

.loader {
    display: none;
    gap: 0.35rem;
    justify-content: center;
    margin: 1rem 0;
}

.loader.on { display: flex; }

.loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: bounce 1s infinite ease-in-out;
}

.loader span:nth-child(2) { animation-delay: 0.15s; }
.loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

@media (max-width: 860px) {
    .nav-links { display: none; }
    .hero-orbit { opacity: 0.35; width: 55vw; top: 8%; }
    .steps { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .topbar-inner {
        gap: 0.65rem;
        padding: 0.65rem 0;
    }
    .brand { font-size: 1.05rem; }
    .connect-wallet-btn {
        font-size: 0.82rem;
        padding: 0.55rem 0.75rem;
        white-space: nowrap;
    }
    .hero {
        min-height: auto;
        padding: 2.25rem 0 3rem;
    }
    .hero h1 { font-size: clamp(1.85rem, 8vw, 2.6rem); }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-cta .btn { width: 100%; text-align: center; justify-content: center; }
    .modal {
        width: calc(100% - 1rem);
        max-height: min(92vh, 900px);
        overflow-y: auto;
        margin: 0.5rem;
        padding: 1.1rem 1rem 1.25rem;
        border-radius: 16px;
    }
    .pay-actions {
        flex-direction: column;
    }
    .pay-actions .btn { width: 100%; }
}
