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

:root {
    --bg: #09090b;
    --surface: #111114;
    --surface-light: #1a1a1f;
    --border: #27272a;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --text-main: #fafafa;
    --text-muted: #71717a;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 8px;
}

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

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font);
    overflow-x: hidden;
    line-height: 1.6;
}

#snowCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.app-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { color: var(--accent); }
.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

.nav-right { display: flex; align-items: center; gap: 1rem; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 12px;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius);
    background: rgba(74, 222, 128, 0.05);
    color: var(--success);
}

.pulse {
    width: 6px; height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Hero ── */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8rem 20px 4rem;
}

.hero-badge {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    padding: 5px 14px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 100px;
    margin-bottom: 1.5rem;
    background: rgba(56, 189, 248, 0.05);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 480px;
    margin-bottom: 2rem;
}

/* ── Buttons ── */
.btn-container { display: flex; gap: 1rem; }

.btn {
    padding: 0.8rem 2rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--text-muted);
}

/* ── Products ── */
.products-section {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: #3f3f46;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.card-header {
    background: var(--surface-light);
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.card-status {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.status-undetected { background: rgba(74, 222, 128, 0.1); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.15); }
.status-updating { background: rgba(251, 191, 36, 0.1); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.15); }

.card-body { padding: 1.4rem; }

.feature-list { list-style: none; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.7rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.feature-list li i { color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; }

.card-footer {
    padding: 1.2rem 1.4rem;
    background: var(--surface-light);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price { font-size: 1.5rem; font-weight: 800; }
.price span { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

.btn-purchase {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--accent);
    padding: 0.6rem 1.2rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-purchase:hover {
    background: var(--accent);
    color: #000;
}
.btn-purchase.disabled {
    border-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}
.btn-purchase.disabled:hover { background: transparent; color: var(--text-muted); }

/* ── Support Section ── */
.support-section {
    padding: 4rem 5%;
    max-width: 600px;
    margin: 0 auto;
}
.support-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
}
.support-box i { color: var(--accent); width: 32px; height: 32px; margin-bottom: 1rem; }
.support-box h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.support-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Footer ── */
.site-footer {
    padding: 2rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ── Cart Button ── */
.cart-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    padding: 6px;
    transition: color 0.2s;
}
.cart-btn:hover { color: var(--accent); }
.cart-count {
    position: absolute;
    top: -4px; right: -8px;
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* ── Cart Drawer ── */
.cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.cart-overlay.active { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    top: 0; right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.cart-drawer.open { right: 0; }

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; }
.close-cart {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.close-cart:hover { color: var(--accent); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.empty-cart {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
    font-size: 0.9rem;
}

.cart-item {
    background: var(--surface-light);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-item-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.cart-item-info p { color: var(--accent); font-weight: 700; font-size: 0.9rem; }
.remove-item {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.remove-item:hover { opacity: 1; }

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* Steps */
.cart-step, .checkout-step, .invoice-step, .confirm-step {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.checkout-body, .invoice-body, .confirm-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.invoice-body, .confirm-body {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.invoice-body h3, .confirm-body h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.invoice-body p, .confirm-body p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.checkout-input {
    width: 100%;
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.checkout-input:focus { border-color: var(--accent); }

/* ── Payment Tabs ── */
.payment-tabs {
    display: flex;
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 3px;
    gap: 3px;
    margin-bottom: 1rem;
}
.payment-tab {
    flex: 1;
    padding: 0.6rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-tab.active {
    background: var(--surface);
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.payment-tab:hover:not(.active) { color: var(--text-main); }

.payment-content { display: none; margin-top: 1rem; }
.payment-content.active { display: block; }

.crypto-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}
.crypto-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.7rem 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.crypto-btn:hover { border-color: var(--text-muted); color: var(--text-main); }
.crypto-btn.selected {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
}

.paypal-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}

#paypal-button-container {
    min-height: 50px;
}

/* Invoice Box */
.invoice-box {
    background: var(--surface-light);
    border: 1px dashed var(--border);
    padding: 1.5rem;
    border-radius: var(--radius);
    width: 100%;
    text-align: center;
}
.invoice-amount {
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 0.8rem;
}
.invoice-address {
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--text-muted);
    background: var(--surface);
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
}
.copy-addr-btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.7rem !important;
    margin-top: 0.8rem;
}

/* License Keys */
.license-keys {
    width: 100%;
    text-align: left;
}
.license-key-item {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
}
.license-key-item h4 { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.license-key-item code {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    word-break: break-all;
}

/* ── Buy Modal ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.buy-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%);
    width: 90%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 24px 48px rgba(0,0,0,0.6);
}
.buy-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%);
}

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 2px; }
.modal-subtitle { font-size: 0.75rem; color: var(--text-muted); }
.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal:hover { color: var(--accent); }

.modal-body { padding: 1.5rem; }
.duration-grid { display: flex; flex-direction: column; gap: 0.8rem; }
.duration-btn {
    background: var(--surface-light);
    border: 1px solid var(--border);
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
    font-family: var(--font);
}
.duration-btn:hover { border-color: var(--text-muted); }
.duration-btn.selected {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
}
.duration-name { font-weight: 600; font-size: 0.95rem; }
.duration-price { font-weight: 800; color: var(--accent); }

.modal-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface-light);
    border-radius: 0 0 var(--radius) var(--radius);
}
.modal-price-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}
/* ── Debug Panel ── */
.debug-panel {
    position: fixed;
    top: 70px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 9999;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    display: none;
    overflow: hidden;
}
.debug-panel.visible { display: block; }

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--warning);
}
.debug-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}
.debug-close:hover { color: var(--text-main); }

.debug-default,
.debug-email-form,
.debug-sending {
    padding: 1rem;
}
.debug-send-btn {
    width: 100%;
    font-size: 0.75rem !important;
    padding: 0.6rem 1rem !important;
}
.debug-email-form .checkout-input {
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
}
.debug-sending {
    text-align: center;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Online Counter ── */
.online-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.online-counter .pulse {
    width: 6px; height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success);
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ── Auth Button ── */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-btn i { width: 14px; height: 14px; }
.auth-btn:hover {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.05);
}
.auth-btn.signed-in {
    gap: 8px;
    padding: 4px 12px 4px 4px;
}
.auth-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* ── Auth Modal ── */
.auth-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%);
    width: 90%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 24px 48px rgba(0,0,0,0.6);
}
.auth-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%);
}

.auth-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.discord-btn {
    background: #5865F2;
    color: #fff;
    border-color: #5865F2;
}
.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
}

.google-btn {
    background: var(--surface-light);
    color: var(--text-main);
}
.google-btn:hover {
    background: #1f1f2a;
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

/* ── Callback Page ── */
.callback-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.callback-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}
.callback-icon { margin-bottom: 1.5rem; }
.callback-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.callback-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.callback-continue {
    background: rgba(56, 189, 248, 0.15) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 10px !important;
    padding: 0.8rem 2.5rem !important;
    backdrop-filter: blur(8px);
}
.callback-continue:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .hero { padding-top: 5rem; }
    .btn-container { flex-direction: column; width: 80%; }
    .grid { grid-template-columns: 1fr; }
    .cart-drawer { width: 100%; right: -100%; }
    .debug-panel { right: 10px; left: 10px; min-width: auto; }
    .online-counter { display: none; }
    .auth-btn span { display: none; }
}
