/* ============================================================
   极速VPN 官网样式 —— 移动优先 · Android 适配
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #3D7CFF;
    --primary-dark: #1E5AE6;
    --cyan: #22D3EE;
    --violet: #8B5CF6;
    --green: #22C55E;
    --bg: #F5F7FB;
    --card: #FFFFFF;
    --ink: #0F172A;
    --ink-2: #475569;
    --ink-3: #94A3B8;
    --line: #E8EDF5;
    --danger: #EF4444;
    --grad: linear-gradient(135deg, #3D7CFF 0%, #22D3EE 100%);
    --grad-hero: radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,.28), transparent 60%),
                 radial-gradient(900px 500px at 0% 20%, rgba(139,92,246,.30), transparent 55%),
                 linear-gradient(160deg, #0B1026 0%, #14204A 55%, #0B1026 100%);
    --radius: 18px;
    --radius-lg: 24px;
    --shadow: 0 8px 30px rgba(15, 35, 80, .08);
    --shadow-hover: 0 14px 40px rgba(61, 124, 255, .18);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* ===================== 按钮 ===================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px; border-radius: 14px;
    font-size: 15px; font-weight: 600; white-space: nowrap;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), opacity .18s;
}
.btn:active { transform: scale(.96); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(61,124,255,.38); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(61,124,255,.5); transform: translateY(-2px); }
.btn-ghost { color: #fff; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.navbar .btn-ghost { color: var(--primary); background: var(--primary-soft, #EAF1FF); border-color: transparent; }
.btn-outline-light { color: #fff; border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); }

/* ===================== 导航 ===================== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11,16,38,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding-top: env(safe-area-inset-top);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 0 16px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { font-size: 22px; }
.brand-name { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .5px; }
.brand-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.user-chip {
    display: inline-flex; align-items: center; gap: 8px;
    color: #CBD5E1; font-size: 13px;
    background: rgba(255,255,255,.08); padding: 5px 8px 5px 12px; border-radius: 20px;
}
.chip-logout { color: #93C5FD; font-size: 12px; padding: 3px 8px; border-radius: 10px; }
.chip-logout:active { background: rgba(255,255,255,.12); }
.user-chip[hidden] { display: none; }
#loginBtn[hidden], #registerBtn[hidden] { display: none; }

/* ===================== Hero ===================== */
.hero { position: relative; background: var(--grad-hero); color: #fff; overflow: hidden; padding-bottom: 54px; }
.hero-glow {
    position: absolute; width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(61,124,255,.55), transparent 65%);
    top: -60px; right: -80px; filter: blur(10px); animation: drift 9s ease-in-out infinite;
}
@keyframes drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(24px); } }
.hero-inner { position: relative; text-align: center; padding-top: 56px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2);
    padding: 6px 14px; border-radius: 30px; font-size: 12.5px; color: #DCE8FF; margin-bottom: 20px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 4px rgba(52,211,153,.25); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: .45; } }
.hero-title { font-size: 30px; line-height: 1.32; font-weight: 800; letter-spacing: .5px; }
.price-big {
    font-size: 1.25em; background: linear-gradient(135deg, #FFE680, #FFB020);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { margin: 16px auto 26px; color: #B7C6E8; font-size: 14.5px; max-width: 460px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    margin-top: 38px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius); padding: 18px 8px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 18px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 12px; color: #93A8D6; }

/* ===================== 通用 Section ===================== */
.section { padding: 52px 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: 24px; font-weight: 800; }
.section-head p { color: var(--ink-2); font-size: 14px; margin-top: 8px; }

/* ===================== 特性网格 ===================== */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feature-card {
    background: var(--card); border-radius: var(--radius); padding: 20px 16px;
    border: 1px solid var(--line); box-shadow: var(--shadow);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-ic {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 23px; margin-bottom: 12px;
    background: linear-gradient(135deg, #EAF1FF, #E0FAFF);
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.feature-card p { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* ===================== 步骤 ===================== */
.steps { display: flex; flex-direction: column; gap: 14px; }
.step {
    position: relative; background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px 18px; text-align: center; flex: 1;
}
.step-num {
    width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
    display: grid; place-items: center; font-size: 19px; font-weight: 800; color: #fff;
    background: var(--grad); box-shadow: 0 6px 16px rgba(61,124,255,.35);
}
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { font-size: 13px; color: var(--ink-2); }
.step-arrow { text-align: center; color: var(--primary); font-size: 20px; font-weight: 700; }

/* ===================== 套餐 ===================== */
.plan-grid { display: flex; flex-direction: column; gap: 16px; }
.plan-card {
    position: relative; background: var(--card); border: 2px solid var(--line);
    border-radius: var(--radius-lg); padding: 26px 22px;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.plan-card.highlight {
    border-color: var(--primary);
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F8FF 100%);
    box-shadow: 0 16px 44px rgba(61,124,255,.16);
}
.plan-tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 16px; border-radius: 20px; white-space: nowrap;
    box-shadow: 0 6px 14px rgba(61,124,255,.4);
}
.plan-name { font-size: 17px; font-weight: 700; text-align: center; }
.plan-price { text-align: center; margin: 10px 0 18px; }
.plan-price .num { font-size: 40px; font-weight: 900; color: var(--primary); line-height: 1; }
.plan-price .unit { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li {
    position: relative; padding: 7px 0 7px 28px; font-size: 14px; color: var(--ink-2);
    border-bottom: 1px dashed var(--line);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before {
    content: "✓"; position: absolute; left: 0; top: 7px;
    width: 19px; height: 19px; border-radius: 50%;
    background: #E5F8EE; color: var(--green); font-size: 12px; font-weight: 800;
    display: grid; place-items: center;
}
.pricing-note { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 18px; }

/* ===================== 客户端下载 ===================== */
.dl-grid {
    display: grid; gap: 14px;
    grid-template-columns: 1fr;
}
.dl-card {
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px 18px;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.dl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dl-ic {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
    background: linear-gradient(135deg, #EEF4FF, #E4EDFF);
    display: grid; place-items: center; font-size: 24px;
}
.dl-meta { min-width: 0; }
.dl-platform {
    display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary);
    background: #EAF1FF; padding: 2px 9px; border-radius: 10px; margin-bottom: 4px;
}
.dl-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.dl-desc { font-size: 13px; color: var(--ink-3); line-height: 1.55; margin-bottom: 10px; }
.dl-info {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--ink-3); margin-bottom: 14px;
}
.dl-card .btn { margin-top: auto; text-decoration: none; text-align: center; }

/* ===================== FAQ ===================== */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s; }
.faq-item.open { border-color: var(--primary); }
.faq-q {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 17px 18px; text-align: left; font-size: 15px; font-weight: 600; color: var(--ink);
    min-height: 52px;
}
.faq-q .arrow { flex-shrink: 0; color: var(--primary); transition: transform .25s var(--ease); font-size: 13px; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease);
    color: var(--ink-2); font-size: 14px;
}
.faq-a p { padding: 0 18px 17px; }

/* ===================== 页脚 ===================== */
.footer { background: #0B1026; color: #8CA0CC; padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.brand-name.dark { color: #fff; }
.footer-notice { font-size: 12px; line-height: 1.8; color: #6B7FA8; margin-bottom: 12px; }
.footer-copy { font-size: 12px; color: #55688F; }

/* ===================== 弹窗 ===================== */
.modal-mask {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(8, 12, 30, .58); backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    animation: maskIn .2s var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
}
/* display:flex 会覆盖 hidden 的默认隐藏，必须显式声明 */
.modal-mask[hidden] { display: none; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    position: relative; background: #fff; width: 100%; max-width: 440px;
    border-radius: 24px 24px 0 0; padding: 26px 22px calc(24px + env(safe-area-inset-bottom));
    animation: sheetUp .28s var(--ease);
    max-height: 92vh; overflow-y: auto;
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
    position: absolute; top: 14px; right: 16px;
    width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: var(--ink-2);
    background: var(--bg);
}
.modal-close:active { background: var(--line); }

/* 登录/注册 */
.auth-tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; height: 42px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: 0 3px 10px rgba(15,35,80,.08); }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field input {
    width: 100%; height: 50px; padding: 0 15px; font-size: 16px;
    border: 1.5px solid var(--line); border-radius: 13px; background: #FAFBFE;
    transition: border-color .18s, box-shadow .18s;
}
.field input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(61,124,255,.12); }
.form-msg { font-size: 13px; color: var(--danger); min-height: 20px; margin-bottom: 6px; }
.form-msg.ok { color: var(--green); }
.auth-tip { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 14px; }

/* 支付 */
.pay-title { text-align: center; font-size: 19px; margin-bottom: 18px; }
.pay-box { background: var(--bg); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; }
.pay-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--ink-2); }
.pay-row b { color: var(--ink); }
.pay-amount { color: var(--primary); font-size: 20px !important; font-weight: 900; }
.pay-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.pay-method {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 6px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.pay-method input { display: none; }
.pay-method:has(input:checked) { border-color: var(--primary); background: #F3F8FF; }
.pay-ic { font-size: 19px; }

/* 成功 */
.success-modal { text-align: center; border-radius: 24px; margin: auto; }
.modal-mask:has(.success-modal) { align-items: center; padding: 20px; }
.success-modal .modal { border-radius: 24px; }
.success-ic {
    width: 66px; height: 66px; margin: 4px auto 16px; border-radius: 50%;
    background: var(--grad); color: #fff; font-size: 34px; font-weight: 800;
    display: grid; place-items: center;
    box-shadow: 0 12px 28px rgba(61,124,255,.4);
    animation: pop .4s var(--ease);
}
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.success-modal h3 { font-size: 20px; margin-bottom: 10px; }
.success-modal p { color: var(--ink-2); font-size: 14px; }
.order-id { margin: 12px 0 20px !important; font-size: 13px; color: var(--ink-3) !important; }

/* ===================== Toast ===================== */
.toast {
    position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 80px);
    background: rgba(15,23,42,.92); color: #fff; font-size: 14px;
    padding: 13px 22px; border-radius: 14px; z-index: 2000;
    opacity: 0; transition: all .28s var(--ease); max-width: 86%; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: linear-gradient(135deg, #16A34A, #059669); }
.toast.err { background: linear-gradient(135deg, #DC2626, #B91C1C); }

/* ===================== 响应式 ===================== */
@media (min-width: 600px) {
    body { font-size: 16px; }
    .hero-inner { padding-top: 76px; }
    .hero-title { font-size: 40px; }
    .hero-desc { font-size: 16px; }
    .stat b { font-size: 22px; }
    .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .steps { flex-direction: row; align-items: stretch; }
    .step-arrow { display: flex; align-items: center; }
    .plan-grid { flex-direction: row; gap: 18px; }
    .plan-card { flex: 1; }
    .dl-grid { grid-template-columns: repeat(2, 1fr); }
    .modal { border-radius: 24px; padding-bottom: 28px; }
    .modal-mask { align-items: center; padding-bottom: 0; }
    .section-head h2 { font-size: 28px; }
    .hide-pc { display: none; }
}

@media (min-width: 900px) {
    .hero-title { font-size: 46px; }
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
    .dl-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 超小屏适配（320px 安卓小屏） */
@media (max-width: 360px) {
    .hero-title { font-size: 26px; }
    .stat b { font-size: 15px; }
    .stat span { font-size: 11px; }
    .btn-lg { padding: 0 20px; font-size: 15px; }
    .nav-inner { padding: 0 12px; }
    .nav-actions .btn-sm { padding: 0 10px; }
}
