/* ============================================
   QwevoCraft — fresh build, dark purple theme
   ============================================ */

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

:root {
    --bg:           #0a0612;
    --bg-soft:      #120a22;
    --bg-card:      #1a1130;
    --bg-card-hi:   #221540;
    --border:       #2d1d4f;
    --border-hi:    #4a2d80;

    --text:         #f4ecff;
    --text-dim:     #a78bd0;
    --text-muted:   #6a5288;

    --accent:       #a855f7;
    --accent-hi:    #c084fc;
    --accent-soft:  rgba(168, 85, 247, 0.15);
    --accent-glow:  rgba(168, 85, 247, 0.45);

    --green:        #22c55e;
    --gold:         #fbbf24;
    --red:          #ef4444;

    --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px;
    --shadow: 0 10px 40px -10px rgba(168, 85, 247, 0.25);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: var(--text); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glow { color: var(--accent-hi); text-shadow: 0 0 24px var(--accent-glow); }

/* ============================================
   Navbar
   ============================================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(10, 6, 18, 0.7);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; gap: 24px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 18px;
    color: var(--text);
}
.nav-logo img { width: 34px; height: 34px; }
.nav-links {
    display: flex; gap: 4px; flex: 1;
}
.nav-link {
    padding: 8px 14px; border-radius: var(--r-sm);
    font-weight: 500; font-size: 14px;
    color: var(--text-dim);
    transition: 0.15s;
}
.nav-link:hover { background: var(--accent-soft); color: var(--text); }
.nav-link.active { color: var(--text); background: var(--accent-soft); }

.nav-server {
    display: flex; align-items: center; gap: 12px;
}
.status {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-dim);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.copy-ip {
    background: var(--accent-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 14px;
    border-radius: var(--r-sm);
    font-family: ui-monospace, monospace;
    font-size: 13px;
    cursor: pointer;
    transition: 0.15s;
}
.copy-ip:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.copy-ip.copied { background: var(--green); border-color: var(--green); }

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 520px;
    padding: 140px 24px 80px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10,6,18,0.5) 0%, rgba(10,6,18,0.85) 60%, var(--bg) 100%),
        url('banner.png') center / cover no-repeat;
    z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero img.logo {
    width: 110px; height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px var(--accent-glow));
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.hero h1 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.hero p.tagline {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto 28px;
}
.hero .badges {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.badge {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid var(--border-hi);
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

/* ============================================
   Sections
   ============================================ */
section { padding: 64px 0; }
.section-head {
    text-align: center; margin-bottom: 40px;
}
.section-head h2 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.section-head p {
    color: var(--text-dim);
    font-size: 16px;
    max-width: 600px; margin: 0 auto;
}

/* ============================================
   Product cards
   ============================================ */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.product {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    position: relative;
    display: flex; flex-direction: column;
    transition: 0.2s ease;
}
.product:hover {
    transform: translateY(-3px);
    border-color: var(--border-hi);
    box-shadow: var(--shadow);
}
.product.featured {
    border: 1px solid var(--accent);
    background: linear-gradient(180deg, var(--bg-card-hi), var(--bg-card));
    box-shadow: var(--shadow);
}
.product-badge {
    position: absolute; top: 14px; right: 14px;
    background: var(--accent);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-badge.sale  { background: var(--green); }
.product-badge.hot   { background: var(--red); }
.product-icon {
    font-size: 44px; margin-bottom: 12px;
    line-height: 1;
}
.product-icon.img {
    font-size: 0;
    margin-bottom: 14px;
}
.product-icon.img img {
    width: 84px; height: 84px;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(168, 85, 247, 0.35));
    transition: transform 0.25s ease;
}
.product:hover .product-icon.img img { transform: scale(1.06) rotate(-3deg); }
.product.featured .product-icon.img img {
    filter: drop-shadow(0 6px 24px rgba(168, 85, 247, 0.55));
}
.product h3 {
    font-size: 20px; margin-bottom: 6px; font-weight: 700;
}
.product .desc {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 42px;
}
.product .features {
    list-style: none;
    margin-bottom: 18px;
    flex: 1;
}
.product .features li {
    padding: 5px 0 5px 22px;
    position: relative;
    font-size: 14px;
    color: var(--text);
}
.product .features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--green);
    font-weight: 800;
    font-size: 14px;
}
.product .price {
    display: flex; align-items: baseline; gap: 10px;
    margin-bottom: 16px;
}
.price-now {
    font-size: 28px; font-weight: 800;
    color: var(--text);
}
.price-was {
    font-size: 16px; color: var(--text-muted);
    text-decoration: line-through;
}
.buy-btn {
    background: var(--accent);
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: 0.15s;
}
.buy-btn:hover { background: var(--accent-hi); transform: translateY(-1px); }

/* ============================================
   Comparison table
   ============================================ */
.compare {
    margin-top: 56px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
}
.compare h3 {
    font-size: 22px; margin-bottom: 22px;
    text-align: center;
}
.compare-table {
    width: 100%; border-collapse: collapse;
    overflow-x: auto;
    display: block;
}
.compare-table table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.compare-table thead th {
    font-size: 13px; text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    font-weight: 700;
}
.compare-table thead th.col-vip { color: var(--gold); }
.compare-table thead th.col-vipplus { color: var(--accent-hi); }
.compare-table tbody td:first-child {
    text-align: left;
    color: var(--text-dim);
    font-weight: 500;
}
.compare-table tbody td:not(:first-child) {
    font-weight: 600;
}
.compare-table .yes { color: var(--green); }
.compare-table .no  { color: var(--text-muted); }

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 80px;
    background: var(--bg-soft);
}
.footer-inner {
    display: flex; flex-wrap: wrap;
    gap: 24px; align-items: center; justify-content: space-between;
}
.footer-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700;
}
.footer-brand img { width: 28px; }
.footer-links {
    display: flex; gap: 18px; flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-dim);
    font-size: 14px;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
    width: 100%;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
    background: var(--bg-card);
    border: 1px solid var(--green);
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 200;
    transition: 0.3s;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================
   Rules page
   ============================================ */
.rules-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 130px 24px 60px;
}
.rules-page h1 {
    font-size: clamp(36px, 5vw, 56px);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.rules-page > .lede {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 16px;
}
.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 26px 28px;
    margin-bottom: 16px;
}
.rule-card h2 {
    font-size: 20px; margin-bottom: 14px;
    display: flex; gap: 10px; align-items: center;
}
.rule-card h2 .icon { font-size: 24px; }
.rule-card ul { list-style: none; }
.rule-card ul li {
    padding: 8px 0 8px 26px;
    position: relative;
    font-size: 15px;
    line-height: 1.55;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rule-card ul li:last-child { border-bottom: none; }
.rule-card ul li::before {
    content: '▸';
    position: absolute; left: 4px; top: 8px;
    color: var(--accent);
}
.rule-card.danger {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(239,68,68,0.07), var(--bg-card));
}
.rule-card.danger h2 { color: var(--red); }

/* ============================================
   Mobile
   ============================================ */
@media (max-width: 720px) {
    .nav-inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
    .nav-links { order: 3; width: 100%; justify-content: center; }
    .hero { padding-top: 180px; }
    section { padding: 40px 0; }
}

/* ============================================
   Cart
   ============================================ */
.cart-btn {
    background: var(--accent-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: 0.15s;
    position: relative;
}
.cart-btn:hover { background: var(--accent); border-color: var(--accent); }
.cart-count {
    background: var(--accent);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    min-width: 20px; height: 20px;
    border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 6px;
}
.cart-count.bump { animation: bump 0.3s ease; }
@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0; pointer-events: none;
    transition: 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(420px, 92vw);
    background: var(--bg-soft);
    border-left: 1px solid var(--border-hi);
    z-index: 210;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.cart-head h3 { font-size: 20px; }
.cart-close {
    background: none; border: none;
    color: var(--text-dim);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: 0.15s;
}
.cart-close:hover { color: var(--text); }

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.cart-empty svg { color: var(--text-muted); margin-bottom: 16px; }
.cart-empty p { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.cart-empty span { font-size: 13px; }

.cart-item {
    display: flex; gap: 12px; align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-icon {
    width: 50px; height: 50px;
    background: var(--bg-card);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-icon img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 14px; font-weight: 600;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price { font-size: 13px; color: var(--text-dim); }
.cart-item-remove {
    background: none; border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: 0.15s;
}
.cart-item-remove:hover { color: var(--red); }

.cart-foot {
    padding: 18px 24px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.cart-total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 14px;
}
.cart-total-row > span:first-child {
    color: var(--text-dim); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em;
}
.cart-total {
    font-size: 24px; font-weight: 800;
}
.checkout-btn {
    width: 100%;
    background: var(--accent);
    border: none;
    color: var(--text);
    font-size: 16px; font-weight: 700;
    padding: 14px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: 0.15s;
}
.checkout-btn:hover:not(:disabled) {
    background: var(--accent-hi); transform: translateY(-1px);
}
.checkout-btn:disabled {
    background: var(--bg-card); color: var(--text-muted);
    cursor: not-allowed;
}
.cart-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 10px;
}

/* ============================================
   Quantity controls in cart
   ============================================ */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.qty-btn {
    width: 26px; height: 26px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r-sm);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: 0.15s;
}
.qty-btn:hover { background: var(--accent); border-color: var(--accent); }
.qty-input {
    width: 48px; height: 26px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r-sm);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    appearance: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; border-color: var(--accent); }

/* ============================================
   Gift section
   ============================================ */
.gift-toggle-row {
    margin-bottom: 12px;
}
.gift-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}
.gift-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.gift-toggle-track {
    width: 36px; height: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    position: relative;
    flex-shrink: 0;
    transition: 0.2s;
}
.gift-toggle-knob {
    position: absolute;
    top: 1px; left: 1px;
    width: 16px; height: 16px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: 0.2s ease;
}
.gift-toggle-label input:checked ~ .gift-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}
.gift-toggle-label input:checked ~ .gift-toggle-track .gift-toggle-knob {
    transform: translateX(16px);
    background: white;
}
.gift-toggle-label:hover { color: var(--text); }

.gift-box {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s, margin 0.2s;
}
.gift-box.open {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 14px;
}
.gift-label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.gift-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-size: 14px;
    font-family: ui-monospace, monospace;
}
.gift-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card-hi);
}
.gift-help {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Checkout slow-warning notice */
.checkout-warn {
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--gold);
    line-height: 1.45;
    margin-bottom: 14px;
    text-align: center;
}
.checkout-warn strong { color: var(--text); display: inline-block; margin-top: 4px; }
