/* ===================== DESIGN SYSTEM ===================== */
:root {
    --bg-0: #06060c;
    --bg-1: #0a0a14;
    --bg-2: #10101e;
    --bg-3: #181830;
    --bg-card: rgba(18, 18, 38, 0.6);
    --bg-card-solid: #12122a;
    --bg-card-hover: rgba(24, 24, 48, 0.8);
    --bg-glass: rgba(14, 14, 28, 0.75);
    --bg-input: rgba(12, 12, 24, 0.8);
    --text-0: #ffffff;
    --text-1: #e8e8f0;
    --text-2: #a8a8c0;
    --text-3: #6a6a88;
    --text-4: #45455a;
    --accent: #7c6bf5;
    --accent-light: #a89bff;
    --accent-dim: rgba(124, 107, 245, 0.12);
    --accent-glow: rgba(124, 107, 245, 0.25);
    --gradient: linear-gradient(135deg, #7c6bf5 0%, #b693f8 40%, #6eb6ff 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb, #f5576c);
    --green: #34d399;
    --green-dim: rgba(52, 211, 153, 0.12);
    --red: #f87171;
    --red-dim: rgba(248, 113, 113, 0.12);
    --yellow: #fbbf24;
    --yellow-dim: rgba(251, 191, 36, 0.12);
    --blue: #60a5fa;
    --border: rgba(255, 255, 255, 0.05);
    --border-2: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(124, 107, 245, 0.2);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(124, 107, 245, 0.1);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===================== RESET ===================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font); background: var(--bg-0); color: var(--text-1);
    line-height: 1.65; min-height: 100vh; overflow-x: hidden;
}
a { color: var(--accent-light); text-decoration: none; }
button { font-family: var(--font); }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.hidden { display: none !important; }

/* ===================== HEADER ===================== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: rgba(6, 6, 12, 0.8); backdrop-filter: blur(24px) saturate(1.6);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--ease);
}
.header.scrolled { background: rgba(6, 6, 12, 0.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-0); }
.logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--gradient); display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.1rem; color: white;
    box-shadow: 0 2px 12px rgba(124, 107, 245, 0.4);
}
.logo-text { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }

.nav { display: flex; gap: 4px; }
.nav-btn {
    display: flex; align-items: center; gap: 6px;
    background: transparent; border: none; color: var(--text-3);
    padding: 8px 14px; border-radius: var(--radius);
    font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.nav-btn:hover { color: var(--text-1); background: var(--accent-dim); }
.nav-btn.active { color: var(--accent-light); background: var(--accent-dim); }
.nav-btn svg { opacity: 0.7; }

.mobile-menu-btn {
    display: none; flex-direction: column; gap: 5px; background: none;
    border: none; cursor: pointer; padding: 8px;
}
.mobile-menu-btn span {
    width: 22px; height: 2px; background: var(--text-2);
    border-radius: 2px; transition: all 0.3s;
}
.mobile-nav {
    display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 199;
    background: rgba(6, 6, 12, 0.96); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border); padding: 12px 24px;
    flex-direction: column; gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav button {
    background: none; border: none; color: var(--text-1);
    padding: 14px 16px; border-radius: var(--radius);
    font-size: 1rem; text-align: left; cursor: pointer;
    transition: background 0.2s;
}
.mobile-nav button:hover { background: var(--accent-dim); }

@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-menu-btn { display: flex; }
}

/* ===================== HERO ===================== */
.hero {
    position: relative; min-height: 85vh; display: flex; align-items: center;
    padding-top: 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-orb {
    position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: rgba(124, 107, 245, 0.3); top: -10%; right: -5%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: rgba(110, 182, 255, 0.2); bottom: -10%; left: -5%; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: rgba(240, 147, 251, 0.15); top: 30%; left: 40%; animation-delay: -14s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 700px; margin: 0 auto; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: var(--radius-full);
    background: var(--accent-dim); border: 1px solid var(--border-accent);
    color: var(--accent-light); font-size: 0.8rem; font-weight: 600;
    margin-bottom: 24px; letter-spacing: 0.02em;
}
.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 900;
    line-height: 1.15; letter-spacing: -0.04em; margin-bottom: 16px;
}
.gradient-text {
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { color: var(--text-2); font-size: 1.1rem; max-width: 480px; margin: 0 auto 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 32px; justify-content: center; margin-top: 48px;
    padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-0); }
.hero-stat-label { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius); border: none;
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: all 0.25s var(--ease); white-space: nowrap;
}
.btn-lg { padding: 14px 32px; font-size: 0.95rem; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-primary {
    background: var(--gradient); color: white;
    box-shadow: 0 4px 20px rgba(124, 107, 245, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124, 107, 245, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
    background: transparent; color: var(--text-2);
    border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text-0); border-color: var(--accent); background: var(--accent-dim); }
.btn-success { background: linear-gradient(135deg, #34d399, #22d3ee); color: #06060c; font-weight: 700; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(52, 211, 153, 0.3); }
.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.btn-full { width: 100%; }

/* ===================== CARDS ===================== */
.glass-card {
    background: var(--bg-card); backdrop-filter: blur(16px);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 28px; box-shadow: var(--shadow);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 0; overflow: hidden;
    cursor: pointer; transition: all 0.35s var(--ease); position: relative;
}
.product-card:hover {
    border-color: var(--border-accent); transform: translateY(-6px);
    box-shadow: var(--shadow-glow), var(--shadow);
}
.product-card-banner {
    width: 100%; height: 160px; object-fit: cover;
    background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: var(--text-4);
}
.product-card-body { padding: 20px; }
.product-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-0); }
.product-card-desc {
    font-size: 0.82rem; color: var(--text-3); margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price {
    font-size: 1.15rem; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 0.72rem; font-weight: 600;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-blue { background: rgba(96,165,250,0.12); color: var(--blue); }

/* ===================== PRODUCT DETAIL ===================== */
.product-hero {
    border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 24px;
    background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
    min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.product-hero img { width: 100%; max-height: 300px; object-fit: cover; }
.product-hero-placeholder { font-size: 4rem; padding: 60px; color: var(--text-4); }

/* ===================== STEPS ===================== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px;
    text-align: center; position: relative; transition: all 0.3s var(--ease);
}
.step-card:hover { border-color: var(--border-accent); transform: translateY(-4px); }
.step-num {
    position: absolute; top: 12px; left: 16px;
    font-size: 0.7rem; font-weight: 700; color: var(--accent);
    background: var(--accent-dim); width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.step-icon { font-size: 2rem; margin-bottom: 12px; }
.step-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.82rem; color: var(--text-3); }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid var(--border-2);
    border-radius: var(--radius); color: var(--text-0);
    font-family: var(--font); font-size: 0.9rem;
    transition: all 0.2s; outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input::placeholder { color: var(--text-4); }

.search-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-input); border: 1px solid var(--border-2);
    border-radius: var(--radius); padding: 0 16px; flex: 1; max-width: 360px;
}
.search-box svg { color: var(--text-4); flex-shrink: 0; }
.search-box input {
    flex: 1; background: none; border: none; color: var(--text-0);
    font-family: var(--font); font-size: 0.9rem; padding: 12px 0; outline: none;
}
.search-box input::placeholder { color: var(--text-4); }
.search-box:focus-within { border-color: var(--accent); }

.catalog-toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.filter-chips { display: flex; gap: 6px; }
.chip {
    padding: 8px 14px; border-radius: var(--radius-full);
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text-3); font-size: 0.8rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--text-1); }
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-light); }

/* ===================== QTY PICKER ===================== */
.qty-picker { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 24px 0; }
.qty-btn {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-2); border: 1px solid var(--border-2);
    color: var(--text-0); font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-family: var(--font);
}
.qty-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.qty-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.qty-display { font-size: 2.5rem; font-weight: 900; min-width: 70px; text-align: center; }

/* ===================== QR ===================== */
.qr-container { text-align: center; margin: 24px 0; }
.qr-wrapper {
    display: inline-block; background: white; padding: 16px;
    border-radius: var(--radius-lg); box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.qr-wrapper img { display: block; border-radius: 8px; }
.countdown { font-size: 2.8rem; font-weight: 900; text-align: center; margin: 16px 0 4px; font-variant-numeric: tabular-nums; }
.countdown-live { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.countdown-expired { color: var(--red); }
.countdown-label { color: var(--text-4); font-size: 0.78rem; text-align: center; margin-bottom: 24px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ===================== ORDER DETAIL ===================== */
.detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-3); }
.detail-value { font-weight: 600; color: var(--text-0); }
.detail-total {
    font-size: 1.2rem; font-weight: 900;
    background: var(--gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}

.credential-box {
    background: var(--bg-1); border: 1px solid var(--border-2);
    border-radius: var(--radius); padding: 14px 16px; margin: 8px 0;
    font-family: 'Courier New', monospace; font-size: 0.88rem;
    word-break: break-all; cursor: pointer; position: relative;
    transition: all 0.2s; color: var(--green);
}
.credential-box:hover { border-color: var(--accent); background: var(--bg-2); }
.credential-copy {
    position: absolute; top: 8px; right: 10px;
    font-size: 0.65rem; color: var(--text-4); font-family: var(--font);
}

/* ===================== SECTION ===================== */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-header h2 { font-size: 1.3rem; font-weight: 800; }
.page-header { margin-bottom: 32px; padding-top: 80px; }
.page-header h1 { font-size: 1.8rem; font-weight: 900; margin-bottom: 8px; }
.page-header p { color: var(--text-3); font-size: 0.95rem; }
.back-link {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none; color: var(--text-3); cursor: pointer;
    font-family: var(--font); font-size: 0.88rem; padding: 8px 0;
    margin-bottom: 20px; transition: color 0.2s;
}
.back-link:hover { color: var(--accent-light); }

/* ===================== EMPTY STATE ===================== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-2); margin-bottom: 8px; }
.empty-state p { color: var(--text-4); font-size: 0.88rem; }

/* ===================== SKELETON ===================== */
.skeleton-card {
    background: var(--bg-card-solid); border: 1px solid var(--border);
    border-radius: var(--radius-lg); height: 240px; animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.spinner {
    width: 28px; height: 28px; border: 3px solid var(--border-2);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin 0.7s linear infinite; margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== TOAST ===================== */
#toast-container {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--bg-card-solid); color: var(--text-1);
    padding: 14px 20px; border-radius: var(--radius); border: 1px solid var(--border-2);
    font-size: 0.88rem; box-shadow: var(--shadow-lg);
    animation: slideIn 0.35s var(--ease);
    display: flex; align-items: center; gap: 10px; max-width: 360px;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error { border-left: 3px solid var(--red); }
.toast.toast-info { border-left: 3px solid var(--accent); }
.toast.hiding { animation: slideOut 0.3s var(--ease) forwards; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ===================== FOOTER ===================== */
.footer { border-top: 1px solid var(--border); margin-top: 60px; padding-top: 48px; padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-3); font-size: 0.85rem; margin-top: 12px; line-height: 1.6; }
.footer-links h4 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: 16px; }
.footer-links a { display: block; color: var(--text-3); font-size: 0.85rem; padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.78rem; color: var(--text-4); }
.footer-powered { color: var(--text-4); }

/* ===================== PAGES ===================== */
.page { display: none; }
.page.active { display: block; animation: fadeUp 0.4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .hero { min-height: 75vh; padding-top: 72px; }
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .products-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .catalog-toolbar { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
    .section { padding: 32px 0; }
    .page-header { padding-top: 72px; }
    .steps-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
}

.trust-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:18px;}
.trust-item{padding:14px 16px;border-radius:16px;border:1px solid var(--border);background:rgba(255,255,255,.03);}
.trust-item strong{display:block;font-size:.86rem;margin-bottom:4px;}
.trust-item span{display:block;font-size:.78rem;color:var(--text-3);line-height:1.5;}
.inline-actions{display:flex;gap:10px;flex-wrap:wrap;}
.helper-card{margin-top:16px;padding:14px 16px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.03);}
.helper-card p{color:var(--text-3);font-size:.82rem;}
.support-resume-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.notice-list{display:flex;flex-direction:column;gap:10px;margin-top:12px;}
.notice-item{padding:10px 12px;border-radius:14px;background:rgba(124,107,245,.08);border:1px solid var(--border);font-size:.8rem;color:var(--text-2);}
@media (max-width:768px){.support-resume-grid{grid-template-columns:1fr;}}
