:root {
    --bg: #000;
    --bg-soft: #111118;
    --surface: rgba(20, 20, 31, 0.84);
    --surface-strong: rgba(24, 24, 38, 0.96);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f5f7ff;
    --muted: #a4abc3;
    --primary: #8b5cf6;
    --primary-2: #22d3ee;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Inter, Arial, sans-serif;
    background: #000;
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: -2;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 25%, rgba(0,0,0,1) 70%),
        linear-gradient(180deg, #070707 0%, #000 100%);
}

.bg-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.03), transparent 40%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 120px);
    mix-blend-mode: screen;
    opacity: 0.45;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.page { padding: 34px 0 64px; }


.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(20px);
    background: rgba(6, 6, 12, 0.6);
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 16px;
}
.brand {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.03em;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.ghost-link { color: var(--muted); }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.35);
    font-size: .8rem;
    padding: 0 7px;
    margin-left: 4px;
}

.glass {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 26px;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: #dfd3ff;
    font-size: .84rem;
}

.section { margin-top: 30px; }
.section-no-gap { margin-top: 0; }
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.section-head-tight { margin-bottom: 16px; }
.section-head h1, .section-head h2 { margin: 8px 0 0; }
.text-link { color: var(--primary-2); }

.section-head-centered {
    justify-content: center;
    text-align: center;
    align-items: center;
    margin-bottom: 24px;
}
.section-head-centered h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.04em;
}
.typing-title {
    display: inline-block;
    min-height: 1.2em;
    position: relative;
    padding-right: 0.12em;
}
.typing-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0.08em;
    width: 2px;
    height: 0.9em;
    background: rgba(255,255,255,0.9);
    animation: blink 0.9s steps(1) infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.product-card, .auth-card, .cart-list, .order-box, .empty-box, .product-summary, .profile-orders, .order-detail {
    padding: 28px;
}
.product-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
}
.product-card-clean {
    justify-content: space-between;
}
.product-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.product-top-single h3 {
    font-size: 1.85rem;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.03em;
}
.product-card h3, .variant-card h3 { margin: 0; }
.product-card p, .variant-card p, .muted { color: var(--muted); margin: 0; }

.variant-list { display: grid; gap: 12px; }
.variant-list.compact { margin-top: 0; }
.variant-row, .summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    padding: 13px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 12px 30px rgba(109, 40, 217, 0.35);
}
.btn:hover { transform: translateY(-1px); }
.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ffd0d0;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: none;
}
.btn-small { padding: 10px 14px; border-radius: 14px; }
.btn-block { width: 100%; }

.auth-wrap {
    min-height: 70vh;
    display: grid;
    place-items: center;
}
.auth-card {
    width: min(520px, 100%);
    display: grid;
    gap: 14px;
}
.auth-card label {
    display: grid;
    gap: 8px;
    color: var(--muted);
}
.auth-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    outline: none;
}

.product-layout, .cart-grid {
    display: grid;
    gap: 22px;
}
.product-layout-balanced {
    align-items: stretch;
    grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
}
.cart-grid {
    grid-template-columns: 1.45fr .85fr;
    align-items: start;
}
.product-summary-compact {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}
.product-summary-head {
    display: grid;
    gap: 14px;
}
.product-summary-compact h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}
.product-variants-box {
    padding: 28px;
}
.product-variants-head h2 {
    margin: 0;
}
.variant-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.variant-card-aligned {
    min-height: 92px;
}
.variant-info {
    display: grid;
    gap: 8px;
}
.variant-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stepper {
    display: inline-grid;
    grid-template-columns: 44px 64px 44px;
    align-items: center;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
}
.stepper input {
    width: 64px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: center;
    outline: none;
    font-weight: 700;
}
.stepper-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(255,255,255,0.02);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
}
.stepper-btn:hover {
    background: rgba(255,255,255,0.08);
}

.support-box {
    margin-top: auto;
    padding: 18px;
    border-radius: 18px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.18);
    display: grid;
    gap: 6px;
}
.support-box a { color: var(--primary-2); }

.cart-list { display: grid; gap: 16px; }
.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.cart-item-info {
    display: grid;
    gap: 8px;
}
.cart-item h3 { margin: 0; }
.cart-item p { color: var(--muted); }
.cart-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.cart-actions-wide {
    justify-content: flex-end;
    min-width: 330px;
}
.cart-line-total {
    min-width: 110px;
    text-align: right;
    font-size: 1.05rem;
}
.order-box { height: fit-content; }
.order-box-spaced {
    padding-top: 30px;
}
.summary-row-total {
    margin-top: 18px;
}
.order-submit {
    margin-top: 28px;
}
.empty-box, .order-detail { text-align: left; }

.profile-orders { margin-top: 16px; }
.order-list { display: grid; gap: 12px; }
.order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: .85rem;
}
.status-failed {
    background: rgba(239, 68, 68, 0.12);
    color: #ffd3d3;
    border: 1px solid rgba(239, 68, 68, 0.24);
}
.payment-alert {
    margin: 22px 0;
    padding: 18px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 18px;
    color: #ffd5d5;
}
.checkout-items { display: grid; gap: 12px; margin: 22px 0 0; }

.flash-stack { display: grid; gap: 12px; margin-bottom: 18px; }
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.flash-success { background: rgba(34, 197, 94, 0.12); color: #d8ffdf; }
.flash-danger { background: rgba(239, 68, 68, 0.12); color: #ffd5d5; }
.flash-warning { background: rgba(245, 158, 11, 0.12); color: #ffe7ba; }
.flash-info { background: rgba(59, 130, 246, 0.12); color: #d9ebff; }

@media (max-width: 900px) {
    .product-grid,
    .product-layout-balanced,
    .cart-grid {
        grid-template-columns: 1fr;
    }

    .variant-card,
    .cart-item,
    .section-head,
    .nav-wrap,
    .cart-actions-wide {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }

    .variant-actions,
    .cart-actions {
        width: 100%;
        justify-content: stretch;
    }

    .stepper,
    .variant-actions .btn,
    .cart-actions .btn {
        width: 100%;
    }

    .stepper {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .cart-line-total {
        text-align: left;
    }
}

.site-header, .page, .glass, .flash-stack { position: relative; z-index: 1; }
