/* ============================================================
   Rainbow Horse v2 — Design System
   Brand: #6366f1 · Manrope + Inter · Glass Nav · Card System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    --bg: #ffffff; --bg-soft: #f8f9fc; --bg-card: #ffffff;
    --text: #1a1d29; --text-soft: #5a6178; --text-muted: #8b91a7;
    --border: #e8eaf2; --border-strong: #d4d8e6; --border-hairline: #f0f1f6;
    --brand: #6366f1; --brand-600: #5558e3; --brand-700: #4f46e5;
    --brand-50: #eef0ff; --brand-100: #e0e3ff;
    --green: #10b981; --green-50: #ecfdf5;
    --orange: #f59e0b; --orange-50: #fffbeb;
    --red: #ef4444; --pink: #ec4899;
    --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgb(20 23 41 / 0.04);
    --shadow-sm: 0 1px 3px rgb(20 23 41 / 0.06), 0 1px 2px rgb(20 23 41 / 0.04);
    --shadow-md: 0 4px 12px rgb(20 23 41 / 0.07), 0 2px 4px rgb(20 23 41 / 0.04);
    --shadow-lg: 0 12px 32px rgb(20 23 41 / 0.10), 0 4px 8px rgb(20 23 41 / 0.05);
    --shadow-brand: 0 8px 24px rgb(99 102 241 / 0.22);
    --font-head: 'Manrope', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
    --bg: #0f1117; --bg-soft: #161922; --bg-card: #1a1d28;
    --text: #e8eaf2; --text-soft: #a8aec4; --text-muted: #6b7185;
    --border: #2a2e3d; --border-strong: #353a4d; --border-hairline: #222535;
    --brand: #818cf8; --brand-600: #6366f1; --brand-700: #5558e3;
    --brand-50: #1e2030; --brand-100: #252838;
    --green: #34d399; --green-50: #0f1f1a;
    --orange: #fbbf24; --orange-50: #1f1a0f;
    --red: #f87171; --pink: #f472b6;
    --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.5);
    --shadow-brand: 0 8px 24px rgb(129 140 248 / 0.25);
}

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

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body); background: var(--bg);
    color: var(--text); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
p { font-size: 14px; color: var(--text-soft); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 10px; font-size: 14px;
    font-weight: 600; cursor: pointer; border: none;
    transition: all .2s; font-family: var(--font-body);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: var(--shadow-brand); }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ===== HEADER ===== */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background .3s, border-color .3s;
}
[data-theme="dark"] .header { background: rgba(15,17,23,0.82); }
.header .container {
    display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.brand {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-head); font-weight: 700; font-size: 17px;
    letter-spacing: -0.02em;
}
.brand-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--brand) 0%, #8b5cf6 100%);
    display: grid; place-items: center; color: #fff; font-size: 17px;
    box-shadow: var(--shadow-brand);
}
.back-link { font-size: 14px; color: var(--text-muted); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--brand); }
.theme-toggle {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-card);
    cursor: pointer; display: grid; place-items: center;
    color: var(--text-soft); transition: all .2s; font-size: 16px;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* ===== NAV BAR ===== */
.nav-bar {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.nav-bar .container {
    display: flex; align-items: center; height: 44px; gap: 2px; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-btn {
    padding: 8px 14px; font-size: 13px; font-weight: 500;
    color: var(--text-soft); white-space: nowrap;
    border-radius: 8px 8px 0 0; transition: all .15s;
}
.nav-btn:hover { color: var(--text); background: rgba(0,0,0,0.03); }
[data-theme="dark"] .nav-btn:hover { background: rgba(255,255,255,0.04); }
.nav-btn.active { color: var(--brand); font-weight: 600; }
.nav-btn.hot { color: var(--red); }
@media (max-width: 768px) {
    .nav-btn { padding: 7px 10px; font-size: 12px; gap: 0; }
    .nav-bar .container { height: 40px; }
}
.nav-bar::-webkit-scrollbar { display: none; }

/* ===== HERO ===== */
.hero {
    padding: 60px 0 40px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
    width: 900px; height: 600px; border-radius: 50%;
    background: radial-gradient(ellipse at center, var(--brand-50) 0%, transparent 65%);
    z-index: -1; opacity: .8;
    transition: opacity .5s, background .5s;
}
[data-theme="dark"] .hero::before { opacity: .4; }
.hero h1, .hero h2 {
    font-family: var(--font-head); font-weight: 800;
    font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em;
    margin-bottom: 12px; line-height: 1.15;
    transition: color .3s;
}
.hero p { font-size: 16px; color: var(--text-soft); max-width: 500px; margin: 0 auto; transition: color .3s; }

/* ===== SECTIONS ===== */
.product-section { padding: 40px 0; }
.section-label {
    display: flex; align-items: center; margin-bottom: 20px;
}
.section-label span {
    font-family: var(--font-head); font-size: 22px; font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===== VPN CARDS ===== */
.vpn-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.vpn-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
    transition: all .25s; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.vpn-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.vpn-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), #8b5cf6);
    opacity: 0; transition: opacity .25s;
}
.vpn-card:hover::after { opacity: 1; }
.vpn-card-name { font-family: var(--font-head); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.vpn-card-price { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--brand); margin-bottom: 2px; letter-spacing: -0.02em; }
.vpn-card-desc { font-size: 13px; color: var(--text-soft); line-height: 1.5; margin: 8px 0 12px; flex: 1; }
.vpn-card-promo {
    display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
    padding: 8px 12px; background: var(--bg-soft); border: 1px dashed var(--border-strong);
    border-radius: 9px;
}
.vpn-card-promo::before { content: '🎫'; font-size: 14px; }
.vpn-card-promo span { font-family: var(--font-mono); font-weight: 600; font-size: 12px; }
.vpn-card-btn {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
    background: var(--brand); color: #fff; transition: all .2s; text-align: center;
}
.vpn-card-btn:hover { background: var(--brand-600); }
.vpn-share-btn {
    text-align: center; padding: 6px 0; margin-top: 6px;
    border-radius: var(--radius-sm); font-size: 12px; font-weight: 500;
    border: 1px dashed var(--border-strong); background: transparent;
    color: var(--text-muted); cursor: pointer; transition: all .15s;
    font-family: var(--font-body);
}
.vpn-share-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ===== PRODUCT CARDS (service cards) ===== */
.product-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    transition: all .25s; position: relative; overflow: hidden;
    display: flex; gap: 18px; align-items: flex-start;
}
.product-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-image {
    width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center;
    font-size: 28px; flex-shrink: 0;
    background: var(--brand-50); border: 1px solid var(--brand-100);
}
.product-info { flex: 1; }
.product-info h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.product-info .desc { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.product-info .features { list-style: none; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.product-info .features li { font-size: 13px; color: var(--text-soft); }
.badge {
    display: inline-block; padding: 3px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 6px;
}
.badge.green { background: var(--green-50); color: var(--green); }
.badge.hot { background: var(--orange-50); color: #c2780a; }
[data-theme="dark"] .badge.hot { color: var(--orange); }
.badge.rec { background: var(--brand-100); color: var(--brand-700); }
[data-theme="dark"] .badge.rec { color: var(--brand); }
.price-area { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.price { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--brand); }
.price-label { font-size: 12px; color: var(--text-muted); }
.warning-badge { font-size: 11px; color: var(--red); margin-bottom: 8px; }

/* ===== OTHER ELEMENTS ===== */
.warning-bar {
    background: var(--orange-50); border: 1px solid #fde68a;
    border-radius: var(--radius-sm); padding: 12px 16px;
    font-size: 13px; margin-bottom: 16px;
}
[data-theme="dark"] .warning-bar { border-color: #4a3a1a; color: var(--orange); }
.disclaimer-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.disclaimer-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.disclaimer-body { font-size: 12px; color: var(--text-soft); line-height: 1.7; }
.tips-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.tips-item { font-size: 13px; color: var(--text-soft); padding: 6px 0; }
.region-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.region-tab {
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
    background: transparent; cursor: pointer; font-size: 13px; font-weight: 500;
    color: var(--text-soft); transition: all .15s; font-family: var(--font-body);
}
.region-tab:hover { border-color: var(--brand); color: var(--brand); }
.region-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Accounts */
.accounts-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.account-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; transition: all .15s;
}
.account-card:hover { border-color: var(--brand); }
.account-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.region-badge { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.region-US { background: var(--brand-50); color: var(--brand); }
.region-HK { background: var(--red-50, #fef2f2); color: var(--red); }
.region-JP { background: var(--pink-50, #fdf2f8); color: var(--pink); }
.region-TW { background: var(--green-50); color: var(--green); }
.region-KR { background: var(--orange-50); color: var(--orange); }
.status-dot { font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.status-正常 { background: var(--green-50); color: var(--green); }
.status-锁定 { background: #fef2f2; color: var(--red); }
.account-body { margin-bottom: 8px; }
.account-field { margin-bottom: 8px; }
.account-field label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 2px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row code { font-family: var(--font-mono); font-size: 13px; background: var(--bg-soft); padding: 4px 10px; border-radius: 6px; flex: 1; word-break: break-all; }
.btn-copy-mini { padding: 4px 10px; border-radius: 6px; font-size: 11px; border: 1px solid var(--border); background: transparent; color: var(--text-soft); cursor: pointer; font-family: var(--font-body); }
.btn-copy-mini:hover { border-color: var(--brand); color: var(--brand); }
.account-footer { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-hairline); }
.vote-btns { display: flex; gap: 4px; }
.vote-btn { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; cursor: pointer; font-size: 12px; color: var(--text-soft); transition: all .15s; font-family: var(--font-body); }
.vote-btn:hover { border-color: var(--brand); }
.vote-btn.voted { border-color: var(--brand); background: var(--brand-50); }

/* Guide pages */
.guide-article { max-width: 800px; margin: 0 auto; padding: 20px 0; }
.guide-article h1 { font-family: var(--font-head); font-size: 28px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.guide-article h2 { font-family: var(--font-head); font-size: 20px; margin: 24px 0 12px; }
.guide-article .step { margin-bottom: 14px; }
.guide-article .step-title { font-size: 14px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.guide-article .step-body { font-size: 13px; color: var(--text-soft); line-height: 1.7; }
.guide-article .card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.guide-article .highlight { border: 2px solid var(--brand); background: linear-gradient(135deg, var(--brand-50), transparent); }
.guide-article table { width: 100%; border-collapse: collapse; font-size: 13px; }
.guide-article td { padding: 8px 0; border-bottom: 1px solid var(--border-hairline); }
.guide-article .promo-link { color: var(--brand); font-weight: 600; }

/* ===== PAYMENT ===== */
.payment-info { text-align: center; padding: 32px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.payment-info h3 { font-family: var(--font-head); font-size: 18px; margin-bottom: 8px; }
.payment-methods { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.payment-method { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); background: var(--bg-soft); padding: 8px 16px; border-radius: 10px; }
.pm-icon { font-size: 16px; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
    padding: 12px 24px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
    background: var(--text); color: var(--bg);
    z-index: 9999; opacity: 0; transition: all .3s; white-space: nowrap;
    box-shadow: var(--shadow-lg); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-question {
    width: 100%; text-align: left; padding: 14px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-card); cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--text); font-family: var(--font-body);
    display: flex; align-items: center; gap: 8px; transition: all .15s;
}
.faq-question:hover { border-color: var(--brand); }
.faq-icon { color: var(--brand); font-weight: 700; }
.faq-answer {
    display: none; padding: 14px 18px; background: var(--bg-soft);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 13px; color: var(--text-soft); line-height: 1.7;
}
.faq-answer.active { display: block; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; text-align: center; }
.footer p { font-size: 13px; color: var(--text-muted); }

/* ===== TUTORIAL PAGE ===== */
.tutorial-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.tutorial-card h3 { font-family: var(--font-head); font-size: 20px; margin-bottom: 8px; }
.step-block { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; margin: 12px 0; }
.step-title { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.step-block p, .step-block li { font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.step-block ul, .step-block ol { padding-left: 20px; margin: 8px 0; }
.tip-box { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius-sm); padding: 14px 18px; font-size: 13px; color: var(--text-soft); margin-top: 12px; }
.tip-box strong { color: var(--brand); }
.warn-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 13px; color: var(--text-soft); margin-top: 12px; }
.warn-box strong { color: var(--red); }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header .container { height: 52px; }
    .vpn-showcase { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .vpn-card { padding: 14px; }
    .accounts-grid { grid-template-columns: 1fr; }
    .product-card { flex-direction: column; gap: 12px; }
    .hero { padding: 40px 0 28px; }
}
