/* ============================================================
   永连VPN 官网样式 - 白色简洁主题 + 科技粒子
   ============================================================ */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4ff;
    --border-color: #e8ecf1;
    --border-light: #f0f2f5;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --accent-blue: #4f8cff;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #4f8cff 0%, #8b5cf6 100%);
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --app-shell-width: 428px;  /* iPhone 15 Pro Max 逻辑点宽度 - 手机 1:1 基准 */
    --app-shell-pad-x: 0px;
}

/* ============================================================
   强制手机 1:1 比例外壳（PC/平板打开显示居中手机大小屏，手机满屏）
   ============================================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(79,140,255,0.08), transparent 60%),
        radial-gradient(900px 500px at 50% 110%, rgba(139,92,246,0.08), transparent 60%),
        #f4f6fb;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.mobile-app-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--app-shell-width);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg-primary);
    box-shadow: 0 0 0 1px rgba(20,30,60,.06), 0 24px 80px rgba(20,30,60,.12);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; font-family: inherit; }

/* 粒子背景 */
#particleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 容器：在 shell 内撑满宽度，左右留 18px padding */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 18px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   导航栏（sticky 跟随 mobile-app-shell，手机 1:1 绝不超宽）
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    left: 0; right: 0;
    height: 64px;
    background: rgba(255,255,255,0.94);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-icon {
    width: 36px; height: 36px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px; font-weight: 800;
}
.logo span { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
    display: flex; align-items: center; gap: 32px;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent-blue); }

.nav-actions {
    display: flex; align-items: center; gap: 12px;
}

/* 用户头像按钮（圆形、标准尺寸） */
.nav-avatar {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 10px 3px 3px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-avatar:hover {
    border-color: var(--accent-blue);
    background: var(--bg-card-hover);
}
.nav-avatar img {
    width: 30px; height: 30px;
    min-width: 30px; min-height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.nav-avatar .nav-avatar-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    transition: all 0.25s;
    cursor: pointer;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.btn-primary {
    background: var(--accent-gradient);
    color: white; border: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,140,255,0.3); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }

.menu-toggle { display: none; background: none; color: var(--text-primary); font-size: 24px; }

/* ============================================================
   Hero 首屏
   ============================================================ */
.hero {
    padding: 56px 0 72px;
    text-align: center;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50px; left: 50%;
    transform: translateX(-50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(79,140,255,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px;
    background: rgba(79,140,255,0.08);
    border: 1px solid rgba(79,140,255,0.2);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent-blue);
    margin-bottom: 24px;
}
.hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(1.3); } }
.hero h1 {
    font-size: 52px; font-weight: 800; line-height: 1.15;
    margin-bottom: 20px;
}
.hero h1 .gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
    font-size: 18px; color: var(--text-secondary);
    max-width: 640px; margin: 0 auto 40px;
}
.hero-actions {
    display: flex; justify-content: center; gap: 16px;
    margin-bottom: 60px; flex-wrap: wrap;
}
.hero-stats {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 32px;
    max-width: 900px; margin: 0 auto;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 36px; font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1; margin-bottom: 8px;
}
.stat-label { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   Section
   ============================================================ */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 16px; }
.section-title h2 { font-size: 38px; font-weight: 700; margin-bottom: 12px; }
.section-title p { font-size: 16px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.section-header { margin-bottom: 56px; }

/* ============================================================
   优势区
   ============================================================ */
.features-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.feature-card:hover {
    border-color: rgba(79,140,255,0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79,140,255,0.1) 0%, rgba(139,92,246,0.1) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   套餐价格
   ============================================================ */
.pricing-section { background: var(--bg-secondary); }
.cycle-tabs {
    display: flex; justify-content: center; gap: 8px;
    margin-bottom: 48px;
    background: var(--bg-card);
    padding: 6px; border-radius: 100px;
    width: fit-content;
    margin-left: auto; margin-right: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.cycle-tab {
    padding: 9px 24px;
    border-radius: 100px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px; font-weight: 500;
    transition: all 0.25s;
}
.cycle-tab.active { background: var(--accent-gradient); color: white; }
.plans-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; }
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 24px;
    display: flex; flex-direction: column;
    transition: all 0.3s;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.plan-card:hover { border-color: rgba(79,140,255,0.3); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.recommended {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--accent-blue), 0 10px 40px rgba(79,140,255,0.12);
}
.plan-card.recommended::before {
    content: '推荐';
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient); color: white;
    padding: 4px 16px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.plan-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.plan-price { margin-bottom: 24px; }
.plan-price .amount {
    font-size: 38px; font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1;
}
.plan-price .currency { font-size: 18px; font-weight: 700; }
.plan-price .cycle { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.plan-original { font-size: 13px; color: var(--text-muted); text-decoration: line-through; margin-top: 4px; }
.plan-features { flex: 1; margin-bottom: 24px; }
.plan-feature {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; font-size: 13.5px; color: var(--text-secondary);
    border-bottom: 1px dashed var(--border-light);
}
.plan-feature:last-child { border-bottom: none; }
.plan-feature .check { color: var(--accent-green); font-weight: 700; margin-top: 1px; flex-shrink: 0; }
.plan-btn {
    width: 100%; padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.25s;
}
.plan-card.recommended .plan-btn, .plan-btn.primary {
    background: var(--accent-gradient); border: none; color: white;
}
.plan-btn:hover { transform: translateY(-1px); border-color: var(--accent-blue); }

/* ============================================================
   下载区
   ============================================================ */
.clients-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.client-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px; text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.client-card:hover { border-color: rgba(79,140,255,0.3); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.client-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(79,140,255,0.08) 0%, rgba(139,92,246,0.08) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; margin: 0 auto 16px;
}
.client-card h3 { font-size: 18px; margin-bottom: 8px; }
.client-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.client-download { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-blue); font-size: 14px; font-weight: 500; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { background: var(--bg-secondary); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
    box-shadow: var(--shadow-sm);
}
.faq-item.active { border-color: rgba(79,140,255,0.3); }
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; cursor: pointer;
    font-size: 16px; font-weight: 500;
}
.faq-question .arrow { font-size: 18px; color: var(--text-muted); transition: transform 0.3s; }
.faq-item.active .faq-question .arrow { transform: rotate(180deg); color: var(--accent-blue); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
    font-size: 14.5px; color: var(--text-secondary); line-height: 1.7;
}
.faq-item.active .faq-answer { max-height: 500px; padding: 0 24px 20px; }

/* ============================================================
   联系我们（简化版）
   ============================================================ */
.contact-section { text-align: center; }
.contact-section .contact-card {
    max-width: 560px; margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 48px 36px;
    box-shadow: var(--shadow);
}
.contact-section .contact-card h3 { font-size: 24px; margin-bottom: 12px; }
.contact-section .contact-card > p { color: var(--text-secondary); margin-bottom: 28px; }
.contact-btn-large {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 36px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 100px;
    font-size: 16px; font-weight: 600;
    transition: all 0.25s;
    cursor: pointer;
}
.contact-btn-large:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(79,140,255,0.3); }
.contact-btn-large .icon { font-size: 22px; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.footer-col h4 { font-size: 15px; margin-bottom: 18px; font-weight: 600; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent-blue); }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--text-muted);
    flex-wrap: wrap; gap: 12px;
}

/* ============================================================
   客服悬浮球（简约白色主题）
   ============================================================ */
/* 聊天悬浮：永远锚定到 mobile-app-shell 的右内边距，绝不超出手机 1:1 边界
 * 技巧：right = calc(50% - var(--app-shell-width) / 2 + 18px)
 *       这样 PC 上 shell 居中时，fab 永远在 shell 右下角内侧，
 *       视口 < 428px 时，降级为 18px（就是手机贴边）
 */
.chat-widget {
    position: fixed;
    right: max(18px, calc(50% - (var(--app-shell-width) / 2) + 18px));
    bottom: 18px;
    z-index: 999;
}
.chat-fab {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(79,140,255,0.28);
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
    position: relative;
    border: 2px solid #ffffff;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(79,140,255,0.35); }
.chat-fab .badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--accent-red); color: white;
    font-size: 11px; font-weight: 600;
    padding: 2px 6px; border-radius: 100px;
    min-width: 18px; text-align: center; display: none;
    border: 2px solid #ffffff;
}
.chat-fab .badge.show { display: block; }
.chat-panel {
    position: absolute;
    right: 0; bottom: 64px;
    /* 聊天窗口 = app-shell 内部可用宽度 - 左 18 - 右 0 ≈ 392px，永远不撑破 */
    width: min(392px, calc(var(--app-shell-width) - 36px), calc(100vw - 36px));
    max-width: calc(var(--app-shell-width) - 36px);
    height: min(520px, 72vh);
    max-height: 72vh;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 14px 48px rgba(15,23,42,0.12);
    display: none; flex-direction: column; overflow: hidden;
}
/* 窄屏时（真实手机）聊天窗脱离 widget 容器，直接铺满手机视口宽度 */
@media (max-width: 440px) {
    .chat-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 80px;
        width: auto;
        max-width: none;
    }
}
.chat-panel.show { display: flex; }
.chat-header {
    padding: 14px 18px;
    background: #ffffff;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(79,140,255,0.25);
}
.chat-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.chat-info p { font-size: 12px; color: var(--text-secondary); }
.chat-close { background: none; color: var(--text-muted); font-size: 22px; padding: 2px 8px; border-radius: 8px; line-height: 1; border: none; cursor: pointer; }
.chat-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.chat-messages {
    flex: 1; padding: 14px 16px; overflow-y: auto;
    min-height: 280px;
    display: flex; flex-direction: column; gap: 12px;
    background: #fafbfc;
}
.chat-msg { display: flex; gap: 8px; max-width: 82%; align-items: flex-start; }
.chat-msg.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg .msg-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: #eef2ff;
    color: var(--accent-blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0; overflow: hidden;
    font-weight: 600;
}
.chat-msg .msg-avatar img {
    width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%;
}
.chat-msg.msg-user .msg-avatar { background: #e6f0ff; color: var(--accent-blue); }
.msg-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px; line-height: 1.55;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(15,23,42,0.03);
    border-top-left-radius: 4px;
}
.chat-msg.msg-user .msg-bubble {
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    color: #ffffff;
    border-top-left-radius: 12px;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(79,140,255,0.18);
}
.msg-bubble img { max-width: 200px; max-height: 200px; border-radius: 8px; cursor: pointer; display: block; }
.msg-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input-area { padding: 12px 14px; border-top: 1px solid var(--border-light); background: #ffffff; }
.chat-login-tip {
    padding: 10px 12px;
    background: #f0f5ff;
    border: 1px solid #dbe5ff;
    border-radius: 8px;
    font-size: 13px; color: var(--text-secondary); margin-bottom: 10px;
}
.chat-login-tip a { color: var(--accent-blue); font-weight: 500; }
.chat-input-wrap { display: flex; gap: 8px; align-items: flex-end; }
.chat-image-btn {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.chat-image-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: #f0f5ff; }
.chat-input {
    flex: 1; padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px; color: var(--text-primary);
    font-size: 14px; resize: none; outline: none;
    min-height: 38px; max-height: 80px; font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.chat-input:focus { border-color: var(--accent-blue); background: #ffffff; }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--accent-blue); color: white; border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; transition: all 0.2s;
}
.chat-send:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(79,140,255,0.25); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px; width: 100%; max-width: 420px;
    overflow: hidden; box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(-20px) scale(0.96); } to { opacity:1; transform:translateY(0) scale(1); } }
.modal-header { padding: 22px 24px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 20px; font-weight: 700; }
.modal-close { background: none; color: var(--text-muted); font-size: 22px; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-control {
    width: 100%; padding: 11px 14px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 14px; outline: none; transition: border-color 0.2s; font-family: inherit;
}
.form-control:focus { border-color: var(--accent-blue); }
.form-control::placeholder { color: var(--text-muted); }
.form-error { color: var(--accent-red); font-size: 12px; margin-top: 6px; display: none; }
.form-error.show { display: block; }
.form-switch { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.form-switch a { color: var(--accent-blue); font-weight: 500; }

/* ============================================================
   Toast
   ============================================================ */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    padding: 12px 20px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 14px;
    box-shadow: var(--shadow); min-width: 240px;
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
.toast.toast-success { border-color: rgba(16,185,129,0.4); }
.toast.toast-error { border-color: rgba(239,68,68,0.4); }
.toast.toast-info { border-color: rgba(79,140,255,0.4); }

/* ============================================================
   用户主页 profile.php
   ============================================================ */
.profile-page { padding: 100px 0 60px; }
.profile-card {
    max-width: 680px; margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.profile-header {
    padding: 40px 36px;
    background: var(--accent-gradient);
    color: white;
    display: flex; align-items: center; gap: 24px;
}
.profile-header .avatar-large {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
    background: rgba(255,255,255,0.1);
}
.profile-header .info h2 { font-size: 24px; margin-bottom: 6px; }
.profile-header .info p { font-size: 14px; opacity: 0.9; }
.profile-body { padding: 28px 36px; }
.profile-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}
.profile-row:last-of-type { border-bottom: none; }
.profile-row .label { color: var(--text-secondary); font-size: 14px; }
.profile-row .value { font-weight: 600; font-size: 15px; }
.profile-row .value .tag { display: inline-block; padding: 3px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.profile-actions { padding: 0 36px 28px; display: flex; gap: 12px; }
.btn-logout { background: var(--accent-red); color: white; border: none; }

/* ============================================================
   下单确认页
   ============================================================ */
.user-page { padding: 100px 0 60px; }
.order-confirm-card {
    max-width: 640px; margin: 0 auto;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow);
}
.order-confirm-card h2 { font-size: 24px; margin-bottom: 24px; text-align: center; }
.order-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed var(--border-color); font-size: 15px; }
.order-row:last-child { border-bottom: none; }
.order-row .label { color: var(--text-secondary); }
.order-row .value { font-weight: 600; }
.order-row.total { padding: 20px 0; border-bottom: none; border-top: 1px solid var(--border-color); margin-top: 8px; }
.order-row.total .amount { font-size: 28px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 800; }
.pay-methods { margin: 24px 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.pay-method { padding: 16px; background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: var(--radius-sm); text-align: center; cursor: pointer; transition: all 0.2s; }
.pay-method.active { border-color: var(--accent-blue); background: rgba(79,140,255,0.06); }
.pay-method .icon { font-size: 28px; margin-bottom: 6px; }
.pay-method .name { font-size: 13px; color: var(--text-secondary); }
.pay-method.active .name { color: var(--accent-blue); font-weight: 600; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 960px) {
    .hero h1 { font-size: 36px; }
    .hero-stats { grid-template-columns: repeat(2,1fr); gap: 24px; }
    .features-grid { grid-template-columns: repeat(2,1fr); }
    .plans-grid { grid-template-columns: repeat(2,1fr); }
    .clients-grid { grid-template-columns: repeat(2,1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }
}
@media (max-width: 640px) {
    html, body { -webkit-tap-highlight-color: transparent; }
    .container { padding-left: 14px; padding-right: 14px; }
    .hero h1 { font-size: 26px; line-height: 1.25; }
    .hero-subtitle { font-size: 15px; }
    .hero .btn-lg { padding: 12px 22px; font-size: 15px; }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stat-card { padding: 18px 12px; }
    .stat-num { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .section { padding: 48px 0; }
    .section-title h2 { font-size: 22px; }
    .section-title p { font-size: 13px; }

    /* Navbar */
    .navbar { padding: 10px 0; }
    .navbar .logo-icon { width: 30px; height: 30px; font-size: 16px; }
    .navbar .logo span { font-size: 15px; }
    .nav-actions .btn { padding: 6px 10px; font-size: 12px; }
    .nav-actions .btn-outline { display: none; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }

    /* Feature cards */
    .features-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 20px 18px; }

    /* Plans (核心：手机版一行一个) */
    .cycle-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding: 4px;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        margin-left: 0;
        margin-right: 0;
    }
    .cycle-tabs::-webkit-scrollbar { display: none; }
    .cycle-tab { padding: 8px 16px; font-size: 13px; flex: 0 0 auto; }
    .plans-grid { grid-template-columns: 1fr; gap: 14px; }
    .plan-card { padding: 22px 18px; }
    .plan-name { font-size: 18px; }
    .plan-price .amount { font-size: 30px; }
    .plan-price .cycle { font-size: 13px; }
    .plan-feature { font-size: 13px; }
    .plan-btn { padding: 12px 18px; font-size: 15px; }

    /* Clients & footer */
    .clients-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer .bottom { flex-direction: column; gap: 8px; text-align: center; }

    /* 手机端聊天：保持和 shell 对齐，right/bottom 用基础规则即可（不允许用旧的 100vw 32px） */
    .chat-fab .badge { width: 20px; height: 20px; line-height: 20px; padding: 0; }
    .chat-input-wrap { gap: 6px; }
    .chat-input { font-size: 14px; padding: 10px 40px 10px 36px; }
    .chat-send { right: 4px; width: 34px; height: 34px; font-size: 15px; }

    /* 支付方式 */
    .pay-methods { grid-template-columns: 1fr 1fr; gap: 10px; }
    .pay-method { padding: 14px 10px; }
    .pay-method .icon img { width: 42px; height: 42px; }

    /* 个人中心 */
    .profile-page { padding: 30px 0 100px; }
    .profile-card { padding: 20px 16px; }
    .profile-header { flex-direction: column; text-align: center; gap: 14px; }
    .avatar-large { width: 80px; height: 80px; font-size: 28px; }
    .profile-info .info h2 { font-size: 18px; }
    .profile-info .info p { font-size: 13px; }
    .profile-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
    .profile-row .label { font-size: 12px; min-width: auto; }
    .profile-row .value { font-size: 14px; }
    .profile-actions { flex-direction: column; gap: 10px; }
    .profile-actions .btn { width: 100%; }

    /* Tabs (手机版：紧凑横向滑动) */
    .profile-tabs {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }
    .profile-tabs::-webkit-scrollbar { display: none; }
    .profile-tab {
        flex: 0 0 auto;
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 0;
        border: none !important;
        margin-bottom: 0;
        background: transparent !important;
        font-weight: 500;
        position: relative;
    }
    .profile-tab.active {
        color: var(--accent);
        font-weight: 700;
    }
    .profile-tab.active::after {
        content: '';
        position: absolute;
        left: 14px; right: 14px; bottom: -1px;
        height: 2px; background: var(--accent-blue); border-radius: 2px;
    }

    /* 订单表格 (手机卡片化) */
    .orders-table-wrap { overflow-x: auto; border-radius: 10px; }
    table.orders-table { min-width: 640px; font-size: 12.5px; }
    table.orders-table th, table.orders-table td { padding: 10px 8px; }
    .actions { flex-wrap: wrap; }
    .actions .btn-sm { padding: 6px 10px; font-size: 12px; }

    /* 订单确认页 */
    .order-hero { padding: 20px; }
    .order-card { padding: 20px 16px; }
    .order-row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .order-row .label { min-width: auto; font-size: 12px; }
    .order-row .value { font-size: 14px; }
    .order-amount-box { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
    .order-amount-box .amount { font-size: 24px; }
}
