:root {
    --bg-deep: #050510;
    --bg-card: rgba(15, 10, 40, 0.72);
    --border: rgba(129, 140, 248, 0.18);
    --border-strong: rgba(129, 140, 248, 0.4);
    --accent: #818cf8;
    --accent-2: #f472b6;
    --accent-3: #34d399;
    --gold: #fbbf24;
    --danger: #ef4444;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.04);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace; }
.small { font-size: 0.85rem; }
.muted { color: var(--text-muted); }

/* ═══ Background orbs ═══ */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(120px); opacity: 0.18;
}
.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -180px; left: -140px; animation: float1 22s ease-in-out infinite; }
.orb-2 { width: 460px; height: 460px; background: #f472b6; bottom: -160px; right: -120px; animation: float2 26s ease-in-out infinite; }
.orb-3 { width: 380px; height: 380px; background: #34d399; top: 55%; left: 55%; transform: translate(-50%,-50%); animation: float3 19s ease-in-out infinite; }

@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,50px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-50px,-70px)} }
@keyframes float3 { 0%,100%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-50%) scale(1.25)} }

/* ═══ Layout ═══ */
.top {
    position: relative; z-index: 1;
    max-width: 1100px; margin: 0 auto;
    padding: 24px 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(129,140,248,0.2), rgba(244,114,182,0.2));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.78rem; color: var(--text-muted); }

.wrap {
    position: relative; z-index: 1;
    max-width: 780px; margin: 0 auto;
    padding: 40px 24px 80px;
    display: grid; gap: 32px;
}

/* ═══ Hero ═══ */
.hero { text-align: center; padding: 20px 8px 0; }

.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 24px;
}
.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 12px var(--accent-3);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero h1 {
    font-size: clamp(2.2rem, 5vw + 1rem, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
}
.grad {
    background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--gold));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lede {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 32px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.stat-value {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.progress {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.4s ease;
    border-radius: 999px;
}

/* ═══ Mint Card ═══ */
.mint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 80px -30px rgba(99, 102, 241, 0.25);
}

.mint-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.mint-head h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }

.chain-badge {
    font-size: 0.78rem;
    padding: 5px 10px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
}
.chain-badge.ok {
    color: var(--accent-3);
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.08);
}
.chain-badge.warn {
    color: var(--gold);
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
}

/* Quantity selector */
.qty {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    gap: 10px;
    margin-bottom: 8px;
}
.qty-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 56px;
}
.qty-btn:hover { background: rgba(129,140,248,0.12); border-color: var(--border-strong); }
.qty-btn:active { transform: scale(0.96); }

#qtyInput {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    height: 56px;
    outline: none;
    transition: border-color 0.15s ease;
}
#qtyInput:focus { border-color: var(--accent); }
#qtyInput::-webkit-outer-spin-button,
#qtyInput::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
#qtyInput { -moz-appearance: textfield; }

.qty-hint { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }

/* Cost breakdown */
.cost {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.cost-row {
    display: flex; justify-content: space-between;
    padding: 6px 0;
    color: var(--text-dim);
    font-size: 0.95rem;
}
.cost-row.total {
    border-top: 1px solid var(--border);
    margin-top: 4px; padding-top: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-ghost {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: rgba(129,140,248,0.1); }

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 30px -10px rgba(129, 140, 248, 0.6);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(129,140,248,0.7); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.5; cursor: not-allowed; box-shadow: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-dim);
}

/* Status */
.status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: var(--glass);
    word-break: break-word;
}
.status.ok { border-color: rgba(52, 211, 153, 0.4); color: var(--accent-3); background: rgba(52,211,153,0.06); }
.status.err { border-color: rgba(239, 68, 68, 0.4); color: var(--danger); background: rgba(239,68,68,0.06); }
.status.info { border-color: rgba(129, 140, 248, 0.4); color: var(--accent); background: rgba(129,140,248,0.06); }
.status a { color: inherit; text-decoration: underline; }

/* ═══ Info block ═══ */
.info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.info-item { min-width: 0; }
.info-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.info-item a { color: var(--accent); text-decoration: none; word-break: break-all; }
.info-item a:hover { text-decoration: underline; }

/* ═══ Footer ═══ */
.foot {
    position: relative; z-index: 1;
    text-align: center;
    padding: 24px 24px 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
    .top { padding: 18px 16px; }
    .wrap { padding: 24px 16px 60px; gap: 24px; }
    .mint-card { padding: 22px 20px; }
    .stats { grid-template-columns: 1fr; }
    .info { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
    .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .orb, .dot, .progress-bar { animation: none !important; }
    * { transition: none !important; }
}
