:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg: #050816;
    --surface: #0f172a;
    --surface-2: #111d36;
    --text: #f8fafc;
    --muted: #9fb1ce;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(148, 163, 184, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.12), transparent 35%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15), transparent 40%),
                linear-gradient(170deg, #050816 0%, #060d20 45%, #081227 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
}

.bg-orb {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.32;
}

.bg-orb-1 {
    left: -120px;
    top: -100px;
    background: linear-gradient(160deg, var(--primary), var(--accent));
}

.bg-orb-2 {
    right: -140px;
    bottom: 80px;
    background: linear-gradient(160deg, var(--secondary), var(--primary));
}

.glass-nav {
    background: rgba(4, 11, 29, 0.65);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-cta-group {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.65), rgba(17, 29, 54, 0.5));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 6px;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 8px;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
}

.nav-link {
    color: #c7d2fe;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.btn-glass {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.75);
    color: #dbeafe;
}

.btn-nav {
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-nav:hover {
    transform: translateY(-1px);
}

.btn-nav-ghost {
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.35);
}

.btn-nav-ghost:hover {
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow: 0 6px 18px rgba(30, 64, 175, 0.25);
}

.btn-nav-primary {
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.65);
    background: linear-gradient(130deg, var(--primary), #2563eb);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
}

.btn-nav-primary:hover {
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.45);
}

.btn-nav-glass {
    color: #c7d2fe;
    border-color: rgba(148, 163, 184, 0.28);
    background: linear-gradient(130deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.7));
}

.btn-nav-glass:hover {
    color: #e2e8f0;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.glass-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(17, 29, 54, 0.82));
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.38);
}

.section-title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.metric-value {
    font-size: 1.7rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.metric-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.table-dark-glass {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: rgba(148, 163, 184, 0.24);
}

.badge-soft-success { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
.badge-soft-warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge-soft-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.hero-gradient {
    background: linear-gradient(140deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.12), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 20px;
}

.buy-v1-intro {
    max-width: 920px;
}

.buy-v1-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    color: #7dd3fc;
    font-weight: 700;
}

.buy-v1-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    line-height: 1.05;
    margin: 0;
}

.buy-v1-shell {
    background:
        radial-gradient(circle at 8% 0%, rgba(56, 189, 248, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 90% 100%, rgba(59, 130, 246, 0.14) 0%, transparent 38%),
        linear-gradient(160deg, rgba(7, 14, 30, 0.9), rgba(10, 18, 36, 0.86));
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 30px;
    padding: clamp(1.1rem, 2.2vw, 2rem);
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.35);
}

.buy-v1-form {
    padding: clamp(0.25rem, 0.8vw, 0.5rem);
}

.buy-amount-block {
    display: grid;
    gap: 0.65rem;
    background: linear-gradient(150deg, rgba(6, 14, 30, 0.84), rgba(10, 20, 42, 0.64));
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    padding: 0.85rem;
}

.buy-amount-label {
    font-size: 0.88rem;
    color: #93c5fd;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.buy-amount-row {
    display: flex;
    align-items: center;
    min-height: 74px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(4, 10, 22, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.buy-amount-row:focus-within {
    border-color: rgba(125, 211, 252, 0.7);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.buy-inline-select {
    width: 164px;
    min-width: 164px;
    height: 74px;
    border: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(12, 20, 38, 0.9);
    color: #f8fafc;
    font-weight: 700;
    padding: 0 0.95rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: none !important;
}

.buy-inline-input {
    flex: 1;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: clamp(1.22rem, 2.5vw, 1.75rem);
    font-weight: 600;
    text-align: right;
    letter-spacing: 0.01em;
    height: 74px;
    padding: 0 1.1rem;
    outline: none;
    box-shadow: none !important;
}

.buy-v1-form .buy-inline-select,
.buy-v1-form .buy-inline-input {
    border: 0 !important;
    color: #f8fafc !important;
}

.buy-v1-form .buy-inline-select {
    background-color: rgba(12, 20, 38, 0.9) !important;
}

.buy-v1-form .buy-inline-input {
    background-color: transparent !important;
}

.buy-inline-input::placeholder {
    color: #64748b;
}

.buy-amount-separator {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 0.65rem auto;
    color: #7dd3fc;
    background: rgba(12, 24, 46, 0.9);
    border: 1px solid rgba(125, 211, 252, 0.3);
}

.buy-v1-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
}

.buy-v1-stat-item {
    display: grid;
    gap: 0.1rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(9, 15, 28, 0.7);
}

.buy-payment-row {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding-top: 1rem;
}

.buy-payment-head {
    margin-bottom: 0.75rem;
}

.payment-method-strip {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.payment-method-icon-btn {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(8, 14, 27, 0.6);
    border-radius: 14px;
    min-width: 88px;
    width: 88px;
    flex: 0 0 88px;
    padding: 0.55rem 0.35rem 0.5rem;
    display: grid;
    justify-items: center;
    gap: 0.42rem;
    color: #cbd5e1;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-method-icon-btn:hover,
.payment-method-icon-btn:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand-accent, #3b82f6) 72%, #dbeafe 18%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.4);
    outline: none;
}

.payment-method-icon-btn.is-active {
    border-color: color-mix(in srgb, var(--brand-accent, #3b82f6) 92%, #e2e8f0 6%);
    background: linear-gradient(155deg, rgba(11, 24, 46, 0.84), rgba(13, 20, 36, 0.8));
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--brand-accent, #3b82f6) 52%, transparent),
        0 16px 26px color-mix(in srgb, var(--brand-accent, #3b82f6) 28%, transparent);
}

.payment-method-icon-btn::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.payment-method-icon-btn.is-active::after {
    background: #22d3ee;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.75), 0 0 10px rgba(34, 211, 238, 0.6);
}

.payment-method-logo-wrap {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.15);
}

.payment-method-logo-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.buy-v1-side {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(160deg, rgba(8, 14, 29, 0.78), rgba(7, 14, 28, 0.62));
}

.buy-v1-note-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #cbd5e1;
    display: grid;
    gap: 0.45rem;
}

.buy-v1-route {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 1rem;
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
    font-weight: 700;
}

.footer {
    border-top: 1px solid var(--border);
    background: rgba(3, 8, 20, 0.7);
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
}

.footer-link:hover {
    color: #dbeafe;
}

.form-control,
.form-select {
    background-color: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.32);
    color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15, 23, 42, 0.9);
    border-color: rgba(96, 165, 250, 0.75);
    color: #f8fafc;
    box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.2);
}

.sparkline {
    width: 100%;
    height: 64px;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: revealUp 0.5s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .metric-value {
        font-size: 1.4rem;
    }

    .nav-cta-group {
        margin-top: 0.75rem;
        width: 100%;
        justify-content: space-between;
    }

    .buy-v1-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-method-icon-btn {
        min-width: 82px;
        width: 82px;
        flex-basis: 82px;
    }
}

@media (max-width: 575.98px) {
    .buy-inline-select {
        width: 128px;
        min-width: 128px;
    }

    .buy-inline-input {
        font-size: 1.18rem;
    }

    .buy-v1-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-method-icon-btn {
        min-width: 76px;
        width: 76px;
        flex-basis: 76px;
    }
}

/* Buy payment overlay fallback to guarantee full-screen centered rendering. */
.payment-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.25rem !important;
    background: rgba(2, 6, 23, 0.72) !important;
    backdrop-filter: blur(10px);
    z-index: 9999 !important;
}

.payment-overlay[hidden] {
    display: none !important;
}

.payment-overlay-card {
    width: min(92vw, 460px) !important;
    margin: 0 auto !important;
}
