:root {
    --bg: #0b0a0a;
    --surface: #141212;
    --card: #1b1818;
    --card-light: #1d1919;
    --gold: #d4af37;
    --gold-light: #f0d68a;
    --gold-dim: #a8862b;
    --text: #e8d5b0;
    --text-secondary: #bcb09b;
    --text-muted: #8f846f;
    --text-dim: #6a5e4a;
    --border: rgba(212,175,55,0.12);
    --border-light: rgba(212,175,55,0.06);
    --green: #4caf50;
    --red: #ef5350;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    font-size: 15px;
}
/* ===== 全局水晶3D背景层 ===== */
.bg-crystal {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    overflow: hidden;
}
.bg-crystal .orb {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(212,175,55,0.18), rgba(212,175,55,0.02) 70%);
    filter: blur(50px); animation: orb-float 10s ease-in-out infinite alternate;
}
.bg-crystal .orb:nth-child(1) { width: 260px; height: 260px; top: -60px; left: -40px; animation-duration: 9s; animation-delay: 0s; }
.bg-crystal .orb:nth-child(2) { width: 200px; height: 200px; bottom: 20%; right: -50px; animation-duration: 11s; animation-delay: -3s; background: radial-gradient(circle at 40% 35%, rgba(160,120,220,0.12), transparent 70%); }
.bg-crystal .orb:nth-child(3) { width: 180px; height: 180px; top: 40%; left: 30%; animation-duration: 13s; animation-delay: -6s; background: radial-gradient(circle at 30% 30%, rgba(212,175,55,0.1), transparent 70%); }
.bg-crystal .crystal {
    position: absolute; opacity: 0.07;
    animation: crystal-spin 18s linear infinite;
}
.bg-crystal .crystal:nth-child(4) { width: 80px; height: 80px; top: 15%; right: 18%; animation-duration: 20s; border: 2px solid rgba(212,175,55,0.5); transform: rotate(45deg); border-radius: 8px; }
.bg-crystal .crystal:nth-child(5) { width: 50px; height: 50px; bottom: 30%; left: 12%; animation-duration: 14s; animation-delay: -5s; border: 1.5px solid rgba(180,140,240,0.3); transform: rotate(30deg); border-radius: 4px; }
.bg-crystal .crystal:nth-child(6) { width: 60px; height: 60px; top: 55%; right: 8%; animation-duration: 24s; animation-delay: -10s; border: 2px solid rgba(100,180,220,0.25); transform: rotate(20deg); border-radius: 6px; }
.bg-crystal .line { position: absolute; opacity: 0.04; }
.bg-crystal .line:nth-child(7) { top: 25%; left: 5%; width: 40%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: line-sweep 6s ease-in-out infinite; }
.bg-crystal .line:nth-child(8) { bottom: 22%; right: 8%; width: 30%; height: 1px; background: linear-gradient(270deg, transparent, rgba(160,120,220,0.6), transparent); animation: line-sweep 8s ease-in-out infinite; animation-delay: -3s; }
.bg-crystal .particle {
    position: absolute; width: 2px; height: 2px; border-radius: 50%;
    background: var(--gold); opacity: 0;
    animation: particle-rise 5s ease-in infinite;
}
.bg-crystal .particle:nth-child(9)  { left: 18%; animation-delay: 0s; }
.bg-crystal .particle:nth-child(10) { left: 35%; animation-delay: 1.2s; width: 3px; height: 3px; }
.bg-crystal .particle:nth-child(11) { left: 52%; animation-delay: 2.5s; }
.bg-crystal .particle:nth-child(12) { left: 68%; animation-delay: 3.8s; width: 1.5px; height: 1.5px; }
.bg-crystal .particle:nth-child(13) { left: 80%; animation-delay: 4.5s; width: 3px; height: 3px; }
.bg-crystal .particle:nth-child(14) { left: 90%; animation-delay: 1.8s; }

@keyframes orb-float {
    0% { transform: translate(0,0) scale(1); opacity: 0.6; }
    50% { transform: translate(20px,-15px) scale(1.15); opacity: 0.9; }
    100% { transform: translate(-10px,10px) scale(1.05); opacity: 0.7; }
}
@keyframes crystal-spin {
    0% { transform: rotate(0deg); opacity: 0.04; }
    50% { transform: rotate(180deg); opacity: 0.1; }
    100% { transform: rotate(360deg); opacity: 0.04; }
}
@keyframes line-sweep {
    0%,100% { opacity: 0.02; transform: translateX(-20px); }
    50% { opacity: 0.08; transform: translateX(20px); }
}
@keyframes particle-rise {
    0% { bottom: -10px; opacity: 0; transform: translateX(0); }
    20% { opacity: 0.8; }
    80% { opacity: 0.2; }
    100% { bottom: 110%; opacity: 0; transform: translateX(30px); }
}
/* AI 脉冲光环 */
@keyframes ai-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(212,175,55,0.3); }
    100% { box-shadow: 0 0 0 18px rgba(212,175,55,0); }
}
@keyframes ai-glow-slow {
    0%,100% { box-shadow: 0 0 8px rgba(212,175,55,0.1), 0 0 20px rgba(212,175,55,0.05); }
    50% { box-shadow: 0 0 16px rgba(212,175,55,0.25), 0 0 40px rgba(212,175,55,0.1); }
}
#app {
    height: 100%;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: transparent;
}
.app-header {
    flex-shrink: 0;
    padding: calc(12px + var(--safe-top)) 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20,18,18,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-back {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(212,175,55,0.08);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-size: 16px;
}
.header-back:hover { background: rgba(255,255,255,0.08); }
.header-back:active { transform: scale(0.92); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 68%; }
.brand-divider {
    width: 1px; height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(212,175,55,0.35), transparent);
    flex-shrink: 0; margin: 0 2px;
}
.header-page-title {
    font-size: 15px; font-weight: 600; letter-spacing: 0.2px;
    color: var(--gold-light);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-logo {
    width: 34px; height: 34px; border-radius: 10px;
    background-color: rgba(212,175,55,0.12);
    background-size: cover; background-position: center; background-repeat: no-repeat;
    background-image: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.02)), url("../resource/icon-512.png");
    border: 1px solid rgba(212,175,55,0.15);
    box-shadow: 0 0 16px rgba(212,175,55,0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.brand-logo:before {
    content: "A";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.02));
    z-index: 1;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.header-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(27,24,24,0.6); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--gold); display: flex; align-items: center; justify-content: center;
    font-size: 14px; position: relative; cursor: pointer;
}
#langToggleBtn {
    width: auto; border-radius: 20px; padding: 0 10px; gap: 3px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px calc(80px + var(--safe-bottom));
}
.main-content::-webkit-scrollbar { display: none; }
.view { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.card {
    background: rgba(27,24,24,0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212,175,55,0.08);
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.2), transparent);
}
.card::after {
    content: ''; position: absolute; inset: 0; border-radius: 24px;
    background: radial-gradient(ellipse at 40% 10%, rgba(212,175,55,0.04), transparent 70%);
    pointer-events: none;
}
.card-title {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.card-title h2 {
    font-size: 18px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.card-title h2 i { color: var(--gold); font-size: 16px; }
.ai-chip {
    background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold); font-size: 12px; padding: 4px 12px; border-radius: 30px;
    display: flex; align-items: center; gap: 4px;
}
.ai-chip.animate-glow { animation: ai-glow-slow 3s ease-in-out infinite; }

/* === 首页 AI 元素 === */
.ai-pulse-ring {
    width: 52px; height: 52px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.2), transparent 70%);
    display: flex; align-items: center; justify-content: center;
    animation: ai-pulse-ring 2.5s ease-out infinite;
    position: relative;
}
.ai-pulse-ring i { font-size: 22px; color: var(--gold); animation: pulse-glow 2s infinite; }

.ai-status-bar {
    display: flex; gap: 12px; align-items: center; margin-bottom: 16px;
    padding: 10px 14px; border-radius: 30px;
    background: rgba(27,24,24,0.5); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212,175,55,0.08);
}
.ai-status-item {
    font-size: 14px; color: var(--text-dim); display: flex; align-items: center; gap: 5px;
}
.ai-status-item .s-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim);
}
.ai-status-item .s-dot.online {
    background: var(--green); box-shadow: 0 0 6px rgba(76,175,80,0.5);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.home-login-card {
    display: flex; align-items: center; gap: 12px;
    margin: 2px 0 8px; padding: 14px 16px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.15);
    animation: fadeInUp 0.5s ease;
}
.hlc-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
    background: rgba(212,175,55,0.12); display: flex; align-items: center; justify-content: center;
}
.hlc-icon i { color: var(--gold); font-size: 18px; }
.hlc-content { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hlc-title { font-size: 15px; font-weight: 600; color: var(--text); }
.hlc-sub { font-size: 13px; color: var(--text-muted); }
.hlc-btn {
    flex-shrink: 0; padding: 9px 18px; border-radius: 20px; border: 1px solid var(--gold);
    background: rgba(212,175,55,0.1); color: var(--gold); font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.hlc-btn:hover { background: rgba(212,175,55,0.2); }
.hlc-btn:active { transform: scale(0.96); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-insight-bar {
    display: flex; align-items: center; gap: 10px; margin-top: 6px;
    padding: 12px 14px; border-radius: 18px;
    background: rgba(212,175,55,0.04); border: 1px solid rgba(212,175,55,0.1);
}
.ai-insight-bar i { font-size: 18px; color: var(--gold); animation: pulse-glow 2.5s infinite; }
.ai-insight-bar span { font-size: 15px; color: var(--text-muted); line-height: 1.5; }

.formula-card { border-color: rgba(212,175,55,0.15); }
.ai-main-card { border-color: rgba(212,175,55,0.2); background: rgba(212,175,55,0.03); }

.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.welcome-text h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: 0.2px; line-height: 1.3; }
.welcome-text p { font-size: 15px; color: var(--text-muted); }
.market-pill {
    background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.2);
    color: var(--green); font-size: 14px; padding: 6px 14px; border-radius: 30px;
    display: flex; align-items: center; gap: 5px;
}
.formula-display {
    background: rgba(0,0,0,0.25); border-radius: 18px; padding: 16px;
    border: 1px solid rgba(212,175,55,0.06); font-family: 'SF Mono', monospace;
    margin-bottom: 14px; position: relative; overflow: hidden;
}
.formula-line {
    color: var(--text-secondary); font-size: 16px; line-height: 1.7;
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.formula-line .kw { color: var(--gold); font-weight: 600; }
.formula-line .fn { color: var(--gold-light); }
.formula-line .param { color: var(--text); background: rgba(212,175,55,0.08); padding: 1px 8px; border-radius: 4px; }
.formula-line .num { color: var(--gold); }
.formula-status {
    display: flex; align-items: center; gap: 6px; margin-top: 10px;
    color: var(--text-dim); font-size: 12px;
}
.formula-status .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--green);
    animation: pulse-dot 1.5s ease-in-out infinite;
}
/* 扫描光束 */
.formula-display::after {
    content: ''; position: absolute; top: 0; left: -100px;
    width: 60px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.18), transparent);
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.formula-display.demo-scanning::after {
    opacity: 1; animation: formulaScan 2s ease-in-out infinite;
}
@keyframes formulaScan {
    0% { left: -10%; }
    100% { left: 110%; }
}
/* 参数脉冲高亮 — 增强版 */
.num.demo-glow, .param.demo-glow {
    animation: demoGlow 1.2s ease-in-out infinite;
    border-radius: 6px; padding: 1px 10px; position: relative; z-index: 1;
}
@keyframes demoGlow {
    0%,100% { box-shadow: 0 0 8px rgba(212,175,55,0.35), 0 0 2px rgba(255,215,0,0.4), inset 0 0 6px rgba(212,175,55,0.12); }
    50% { box-shadow: 0 0 24px rgba(212,175,55,0.75), 0 0 8px rgba(255,215,0,0.5), inset 0 0 14px rgba(212,175,55,0.25); transform: scale(1.07); }
}
@keyframes pulse-dot { 0%,100%{opacity:.3;transform:scale(1)} 50%{opacity:1;transform:scale(1.3)} }

/* === 三步流程 Step Flow === */
.step-flow { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.step-block {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 0; position: relative;
}
.step-block + .step-block {
    border-top: 1px solid rgba(212,175,55,0.06);
}
.step-num-badge {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.05));
    border: 1.5px solid rgba(212,175,55,0.25);
    color: var(--gold); font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px rgba(212,175,55,0.08);
    transition: all 0.5s ease;
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.step-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.step-params-row {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.sp-item {
    background: rgba(0,0,0,0.25); border-radius: 14px; padding: 10px 14px;
    border: 1px solid rgba(212,175,55,0.08);
    display: flex; flex-direction: column; gap: 3px; min-width: 90px;
}
.sp-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.sp-val { font-size: 16px; font-weight: 700; color: var(--gold); font-family: 'SF Mono', monospace; }
.step-actions-row { display: flex; gap: 8px; }
.step-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
    border-radius: 24px; padding: 9px 18px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.step-btn:active { transform: scale(0.96); background: rgba(212,175,55,0.04); }
.step-btn.primary {
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; border-color: transparent; font-weight: 700;
}
/* 首页演示动效 */
.step-num-badge.demo-active {
    background: linear-gradient(135deg, rgba(212,175,55,0.55), rgba(212,175,55,0.18));
    border-color: var(--gold); box-shadow: 0 0 28px rgba(212,175,55,0.4);
    animation: demoActivePulse 1.2s ease-in-out infinite;
}
@keyframes demoActivePulse {
    0%,100% { box-shadow: 0 0 14px rgba(212,175,55,0.25); }
    50% { box-shadow: 0 0 32px rgba(212,175,55,0.55); }
}
.step-btn.demo-btn-pulse {
    animation: ripplePulse 1.8s ease-out infinite;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}
@keyframes valuePop {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); color: #ffe082; }
    100% { transform: scale(1); }
}
@keyframes ripplePulse {
    0% { box-shadow: 0 0 0 0 rgba(212,175,55,0.6); }
    100% { box-shadow: 0 0 0 20px rgba(212,175,55,0); }
}

/* 手指引导指针 */
.demo-finger {
    position: absolute; z-index: 30; pointer-events: none;
    font-size: 34px; color: var(--gold);
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.7));
    transition: left 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), top 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
    opacity: 0; transform: translate(-50%, -50%);
    will-change: left, top, opacity;
}
.demo-finger.visible { opacity: 1; }
.demo-finger i {
    display: block; transition: transform 0.3s;
}
.demo-finger.tapping i {
    animation: fingerTap 0.65s ease-in-out infinite;
}
.demo-finger-ring {
    position: absolute; top: 50%; left: 50%;
    width: 50px; height: 50px; border-radius: 50%;
    border: 2px solid rgba(212,175,55,0.5);
    transform: translate(-50%, -50%);
    animation: fingerRingPulse 1s ease-out infinite;
}
.demo-finger-label {
    position: absolute; top: -36px; left: 50%; transform: translateX(-50%);
    background: rgba(15,13,13,0.92); border: 1px solid rgba(212,175,55,0.35);
    color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap;
    padding: 6px 16px; border-radius: 30px;
    opacity: 0; transition: opacity 0.35s, top 0.35s;
    pointer-events: none;
}
.demo-finger-label.show {
    opacity: 1; top: -42px;
    animation: labelFloat 1.8s ease-in-out infinite;
}
@keyframes labelFloat {
    0%,100% { top: -42px; }
    50% { top: -50px; }
}
@keyframes fingerTap {
    0%,100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.12); }
}
@keyframes fingerRingPulse {
    0% { width: 30px; height: 30px; opacity: 0.7; border-width: 2.5px; }
    100% { width: 60px; height: 60px; opacity: 0; border-width: 0.5px; }
}
.action-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-btn {
    flex: 1; min-width: 70px; background: transparent;
    border: 1px solid var(--border); color: var(--text-secondary);
    border-radius: 30px; padding: 10px 0; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.pill-btn:active { transform: scale(0.96); }
.pill-btn.primary {
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; border-color: transparent; font-weight: 700;
}
.ai-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.15);
}
.suggestion-list { display: flex; flex-direction: column; gap: 10px; }
.suggestion-item {
    background: rgba(0,0,0,0.2); border-radius: 16px; padding: 12px 14px;
    border: 1px solid rgba(212,175,55,0.05);
}
.suggestion-item .sug-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.suggestion-item .sug-head i { color: var(--gold); font-size: 14px; }
.suggestion-item .sug-head span { color: var(--text); font-size: 14px; font-weight: 600; }
.suggestion-item p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.ai-apply-btn {
    width: 100%; margin-top: 12px;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    border: none; border-radius: 30px; padding: 14px;
    color: #0f0d0d; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
}
.ai-apply-btn:active { transform: scale(0.98); }
.ai-apply-btn.pulse-glow {
    animation: btnPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 16px rgba(212,175,55,0.4), 0 0 32px rgba(212,175,55,0.15);
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.3), 0 0 16px rgba(212,175,55,0.1); }
    50% { box-shadow: 0 0 20px rgba(212,175,55,0.6), 0 0 40px rgba(212,175,55,0.25); }
}
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
    background: var(--card); border: 1px solid var(--border-light);
    border-radius: 18px; padding: 14px 4px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    cursor: pointer; transition: 0.2s; text-decoration: none;
}
.quick-item:active { transform: scale(0.95); background: rgba(212,175,55,0.04); }
.quick-item i { font-size: 22px; color: var(--gold); }
.quick-item span { font-size: 14px; color: var(--text-secondary); }
.market-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.market-item {
    background: rgba(0,0,0,0.2); border-radius: 16px; padding: 12px;
    border: 1px solid rgba(212,175,55,0.04);
}
.market-item .label { color: var(--text-dim); font-size: 12px; margin-bottom: 6px; }
.market-item .value { font-size: 20px; font-weight: 700; color: var(--text); }
.market-item .change { font-size: 14px; margin-top: 3px; }
.market-item .change.up { color: var(--green); }
.market-item .change.down { color: var(--red); }

.page-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 16px; letter-spacing: 0.2px; line-height: 1.3; }
.section-title {
    font-size: 17px; font-weight: 700; color: var(--text); margin: 8px 0 14px;
    display: flex; align-items: center; gap: 8px;
}
.section-title i { color: var(--gold); font-size: 16px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty-state i { font-size: 44px; margin-bottom: 12px; color: var(--text-dim); }
.empty-state p { font-size: 15px; }

.filter-bar {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0; padding: 8px 16px; border-radius: 30px;
    background: rgba(27,24,24,0.5); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212,175,55,0.06);
    color: var(--text-muted); font-size: 14px; cursor: pointer;
}
.filter-chip.active { background: rgba(212,175,55,0.12); color: var(--gold); border-color: rgba(212,175,55,0.25); }
.strategy-list { display: flex; flex-direction: column; gap: 14px; }
.strategy-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.06);
    border-radius: 20px; padding: 16px 14px; cursor: pointer; transition: 0.25s;
    position: relative; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.strategy-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,175,55,0.18);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.strategy-card:active { transform: scale(0.98); box-shadow: none; }
.strategy-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--gold), transparent); opacity: 0.6;
}
.strategy-card .str-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.strategy-card .str-name { font-size: 17px; font-weight: 700; color: var(--text); white-space: normal; word-break: break-word; line-height: 1.35; overflow: visible; }
.strategy-card .str-code {
    font-size: 13px; color: var(--text-dim); background: rgba(212,175,55,0.05);
    padding: 3px 10px; border-radius: 30px; margin-top: 4px; display: inline-block;
}
.strategy-card .str-tag {
    font-size: 12px; padding: 4px 12px; border-radius: 30px;
    background: transparent; color: var(--text-dim); border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0; margin-left: 8px;
}
.strategy-card .str-desc {
    color: var(--text-muted); font-size: 15px; line-height: 1.5; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.strategy-card .str-foot { display: flex; justify-content: flex-end; align-items: center; }
.strategy-card .str-metrics { display: flex; gap: 16px; }
.strategy-card .str-metrics .m { display: flex; flex-direction: column; align-items: flex-start; }
.strategy-card .str-metrics .m .m-value { color: var(--text); font-size: 16px; font-weight: 700; }
.strategy-card .str-metrics .m .m-unit { color: var(--text-dim); font-size: 11px; margin-top: 2px; font-weight: 500; }
.strategy-card .str-metrics .m .m-value.pos { color: var(--green); }
.strategy-card .str-metrics .m .m-value.neg { color: var(--red); }
.sub-btn {
    background: linear-gradient(135deg, #f0c928, #c9a227);
    color: #1c1812; border: none; border-radius: 30px; padding: 9px 22px;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s;
    white-space: nowrap; box-shadow: 0 4px 14px rgba(212,175,55,0.25);
}
.sub-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(212,175,55,0.35); }
.sub-btn:active { transform: scale(0.95); filter: brightness(0.96); }
.sub-btn.subbed { background: rgba(76,175,80,0.12); border: 1px solid rgba(76,175,80,0.35); color: var(--green); box-shadow: none; }

.back-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.back-bar i { color: var(--gold); font-size: 20px; cursor: pointer; }
.back-bar span { color: var(--text); font-size: 18px; font-weight: 600; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.detail-header .info h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.detail-header .info .sub { color: var(--text-muted); font-size: 14px; }
.detail-actions { display: flex; gap: 10px; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--card); color: var(--text-muted); display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 15px;
}
.icon-btn.active { color: var(--red); border-color: rgba(239,83,80,0.3); background: rgba(239,83,80,0.08); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.metric-box {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212,175,55,0.06); border-radius: 18px;
    padding: 14px 8px; text-align: center;
}
.metric-box .m-label { color: var(--text-dim); font-size: 12px; margin-bottom: 6px; }
.metric-box .m-value { font-size: 20px; font-weight: 700; color: var(--text); }
.metric-box .m-value.gold { color: var(--gold); }
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.param-field {
    background: rgba(0,0,0,0.2); border-radius: 16px; padding: 12px;
    border: 1px solid rgba(212,175,55,0.04);
}
.param-field .p-label { color: var(--text-dim); font-size: 12px; margin-bottom: 6px; }
.param-field .p-value { color: var(--gold); font-size: 16px; font-weight: 600; }
.param-field .p-desc { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.param-field.editable .p-control { margin: 6px 0 4px; }
.param-field input.param-number,
.param-field input.param-text {
    width: 100%; box-sizing: border-box;
    background: rgba(0,0,0,0.35); border: 1px solid rgba(212,175,55,0.18);
    border-radius: 10px; padding: 9px 11px; color: var(--text);
    font-size: 14px; font-weight: 600; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.param-field input.param-number:focus,
.param-field input.param-text:focus {
    border-color: rgba(212,175,55,0.55);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
    background: rgba(212,175,55,0.04);
}
.param-field .param-switch {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
}
.param-field .param-switch input { display: none; }
.param-field .param-switch .ps-slider {
    position: relative; display: inline-block; width: 46px; height: 24px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px; transition: background 0.15s, border-color 0.15s;
}
.param-field .param-switch .ps-slider::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #6a5e4a; transition: transform 0.15s, background 0.15s;
}
.param-field .param-switch input:checked + .ps-slider {
    background: rgba(212,175,55,0.16); border-color: rgba(212,175,55,0.45);
}
.param-field .param-switch input:checked + .ps-slider::after {
    transform: translateX(22px); background: var(--gold);
}
.param-field .param-switch .ps-text {
    font-size: 13px; font-weight: 700; color: var(--text-dim); letter-spacing: 0.5px;
}
.param-field .param-switch input:checked ~ .ps-text { color: var(--gold-light); }
.param-field.report-metric { background: rgba(212,175,55,0.04); border-color: rgba(212,175,55,0.08); }
.param-field.report-metric .p-value.num.gold { color: var(--gold); }
.slider-group { margin-bottom: 12px; }
.slider-group .s-label { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }
.slider-group .s-label span:last-child { color: var(--gold); font-weight: 600; }
input[type="range"] {
    width: 100%; height: 4px; background: #2f2929; border-radius: 10px;
    -webkit-appearance: none; appearance: none; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px;
    background: radial-gradient(circle at 30% 30%, var(--gold), var(--gold-dim)); border-radius: 50%;
    border: 1px solid var(--gold-light); box-shadow: 0 0 16px rgba(212,175,55,0.25); cursor: pointer;
}
.detail-btns { display: flex; gap: 10px; margin-top: 16px; }

/* AI 洞察 */
.ai-analysis {
    background: rgba(212,175,55,0.06); border: 1px solid rgba(212,175,55,0.15);
    border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
    color: var(--text-secondary); font-size: 13px; line-height: 1.7;
}
.ai-sug-list { display: flex; flex-direction: column; gap: 10px; }
.ai-sug-item {
    background: rgba(0,0,0,0.22); border: 1px solid var(--border);
    border-radius: 16px; padding: 13px 14px; cursor: pointer; transition: 0.2s;
}
.ai-sug-item:hover { border-color: rgba(212,175,55,0.35); }
.ai-sug-item.selected {
    border-color: var(--gold); background: rgba(212,175,55,0.08);
    box-shadow: 0 0 18px rgba(212,175,55,0.18);
}
.ai-sug-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ai-sug-name { font-size: 14px; font-weight: 700; color: var(--gold-light); }
.ai-sug-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-tag {
    font-size: 10px; color: var(--gold); background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.25); padding: 2px 8px; border-radius: 20px;
}
.ai-sug-desc { color: var(--text-secondary); font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.ai-sug-params { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai-sug-params .ai-p {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(212,175,55,0.12);
    border-radius: 8px; padding: 4px 9px; font-size: 12px; color: var(--text);
}
.ai-sug-params .ai-p b { color: var(--text-dim); font-weight: 600; margin-right: 3px; }
.ai-sug-reason { color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.ai-pulse { animation: aiPulse 1.2s ease 3; }
@keyframes aiPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.5); }
    50% { box-shadow: 0 0 24px 6px rgba(212,175,55,0.45); }
}
.btn {
    flex: 1; border-radius: 30px; padding: 15px; font-size: 16px; font-weight: 700;
    cursor: pointer; border: none; transition: 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(145deg, var(--gold), var(--gold-dim)); color: #0f0d0d; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--gold); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; color: var(--text-muted); border-color: rgba(106,94,74,0.3); }
.btn-secondary:disabled:hover { background: transparent; }
.chart-wrap {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.06); border-radius: 20px;
    padding: 14px; margin-bottom: 14px;
}
.chart-wrap .c-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.chart-wrap .c-head span { color: var(--text-muted); font-size: 14px; }
.chart-wrap canvas { width: 100% !important; height: 160px !important; }

.sub-plan {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212,175,55,0.15); border-radius: 24px;
    padding: 20px 18px; margin-bottom: 16px; text-align: center;
}
.sub-plan h3 { font-size: 20px; color: var(--gold-light); margin-bottom: 6px; }
.sub-plan .price { font-size: 36px; font-weight: 800; color: var(--text); margin: 10px 0; }
.sub-plan .price span { font-size: 16px; color: var(--text-muted); font-weight: 400; }
.sub-plan ul { text-align: left; list-style: none; margin: 16px 0; }
.sub-plan ul li { color: var(--text-secondary); font-size: 14px; padding: 7px 0; display: flex; align-items: center; gap: 8px; }
.sub-plan ul li i { color: var(--green); font-size: 14px; }

.fav-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.06); border-radius: 18px;
    padding: 14px; margin-bottom: 10px; position: relative;
}
.fav-card .fav-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.fav-card .fav-name { font-size: 17px; font-weight: 600; color: var(--text); }
.fav-card .fav-time { font-size: 13px; color: var(--text-dim); margin-top: 3px; }
.fav-card .fav-params { display: flex; flex-wrap: wrap; gap: 6px; }
.fav-card .fav-params .tag {
    background: rgba(212,175,55,0.06); border: 1px solid rgba(212,175,55,0.1);
    color: var(--text-secondary); font-size: 15px; padding: 5px 13px; border-radius: 30px;
}
.fav-card .fav-note {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(212,175,55,0.04);
    color: var(--text-muted); font-size: 15px;
}
.fav-card .fav-actions { display: flex; gap: 10px; margin-top: 14px; }
.fav-card .fav-actions button {
    flex: 1; background: transparent; border: 1px solid var(--border-light);
    color: var(--text-secondary); border-radius: 30px; padding: 11px; font-size: 15px; cursor: pointer;
}

.profile-main { padding-top: 18px; }

.profile-header-card {
    background: rgba(27,24,24,0.65); backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(212,175,55,0.12); border-radius: 26px;
    padding: 22px 20px; display: flex; align-items: center; gap: 18px; margin-bottom: 18px;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #0f0d0d; font-weight: 700;
    border: 3px solid rgba(212,175,55,0.22);
    flex-shrink: 0;
}
.profile-meta { flex: 1; min-width: 0; }
.profile-meta h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.profile-meta p { font-size: 15px; color: var(--text-muted); margin-bottom: 10px; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge-pro {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(212,175,55,0.12); color: var(--gold);
    font-size: 13px; padding: 5px 12px; border-radius: 30px;
    border: 1px solid rgba(212,175,55,0.2);
}
.badge-expiry {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--gold);
    background: rgba(212,175,55,0.08); padding: 5px 12px; border-radius: 30px;
    border: 1px solid rgba(212,175,55,0.12); white-space: nowrap;
}
.badge-expiry i { font-size: 12px; }
.badge-expiry #expiryDate { white-space: nowrap; }

.profile-menu-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 22px;
    overflow: hidden; margin-bottom: 16px;
}
.p-section-title {
    padding: 16px 18px 8px; font-size: 13px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px;
}
.p-menu-item, .p-support-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 17px 18px; border-bottom: 1px solid rgba(212,175,55,0.05);
    cursor: pointer; text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.p-menu-item:last-child, .p-support-row:last-child { border-bottom: none; }
.p-menu-item:hover, .p-support-row:hover { background: rgba(255,255,255,0.03); }
.p-menu-item:active, .p-support-row:active { background: rgba(212,175,55,0.04); }
.p-menu-left, .p-support-left { display: flex; align-items: center; gap: 14px; }
.p-menu-left i, .p-support-left i { color: var(--gold); font-size: 20px; width: 24px; text-align: center; }
.p-menu-left span, .p-support-left span { color: var(--text); font-size: 16px; font-weight: 500; }
.p-menu-right { color: var(--text-dim); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.p-menu-right #menuFavCount {
    background: var(--red); color: #fff; font-size: 12px; min-width: 22px; height: 22px;
    border-radius: 11px; display: flex; align-items: center; justify-content: center; padding: 0 7px;
    font-weight: 600;
}
.p-menu-right .fa-chevron-right { font-size: 13px; }
.p-support-action {
    background: transparent; border: 1px solid rgba(212,175,55,0.18);
    color: var(--gold); width: 36px; height: 36px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 15px;
}
.p-support-action:hover { background: rgba(212,175,55,0.1); }
.p-support-action:active { transform: scale(0.92); }

/* Redesigned Profile */
.profile-hero {
    display: flex; flex-direction: column; align-items: center;
    padding: 24px 20px 28px; text-align: center;
}
.profile-avatar-large {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    display: flex; align-items: center; justify-content: center;
    font-size: 42px; color: #0f0d0d; font-weight: 700;
    border: 4px solid rgba(212,175,55,0.2);
    box-shadow: 0 12px 36px rgba(212,175,55,0.14);
    margin-bottom: 18px;
}
.profile-hero h1 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.profile-hero #profileEmail { font-size: 15px; color: var(--text-muted); margin-bottom: 16px; }
.profile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.profile-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; padding: 7px 14px; border-radius: 30px;
    border: 1px solid rgba(212,175,55,0.18);
}
.profile-tag i { font-size: 13px; }
.tag-pro { background: rgba(212,175,55,0.14); color: var(--gold); }
.tag-expiry { background: rgba(212,175,55,0.08); color: var(--gold); }

.profile-section { padding: 0 16px 18px; }
.section-label {
    font-size: 14px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    margin: 0 0 10px 6px;
}
.profile-menu {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 22px;
    overflow: hidden;
}
.profile-menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 18px; border-bottom: 1px solid rgba(212,175,55,0.05);
    cursor: pointer; text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { background: rgba(255,255,255,0.03); }
.profile-menu-item:active { background: rgba(212,175,55,0.04); }
.pmi-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(212,175,55,0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 18px; flex-shrink: 0;
}
.pmi-text { flex: 1; font-size: 17px; font-weight: 500; color: var(--text); }
.pmi-arrow { color: var(--text-dim); font-size: 14px; }
.pmi-badge {
    background: var(--red); color: #fff; font-size: 12px; min-width: 22px; height: 22px;
    border-radius: 11px; display: flex; align-items: center; justify-content: center; padding: 0 7px;
    font-weight: 600;
}

/* 旧的 menu-list / menu-item 若仍被使用则保持兼容 */
.menu-list { display: none; }

.toast {
    position: fixed; bottom: calc(90px + var(--safe-bottom)); left: 50%; transform: translateX(-50%) translateY(100px);
    background: rgba(29,25,25,0.98); border: 1px solid rgba(212,175,55,0.2); color: var(--text);
    padding: 14px 24px; border-radius: 30px; font-size: 14px; z-index: 9999;
    opacity: 0; transition: all 0.3s ease; pointer-events: none;
    display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--gold); }

.bottom-nav {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(20,18,18,0.8); backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(212,175,55,0.06);
    padding: 8px 0 calc(8px + var(--safe-bottom));
    display: flex; justify-content: space-around; align-items: center;
    z-index: 200;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 0; color: var(--text-dim); font-size: 13px; cursor: pointer; transition: 0.2s;
    text-decoration: none;
}
.nav-item i { font-size: 24px; transition: 0.2s; }
.nav-item.active { color: var(--gold); }
.nav-item.active i { transform: translateY(-2px); filter: drop-shadow(0 0 6px rgba(212,175,55,0.3)); }

/* 脉冲发光动画（用于AI提示图标） */
@keyframes pulse-glow { 0%,100%{opacity:.6} 50%{opacity:1} }

@media (max-width: 380px) {
    .metric-row { grid-template-columns: repeat(3, 1fr); }
    .strategy-card .str-metrics { gap: 10px; }
}

/* ===== 通用弹窗 ===== */
.dialog-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    animation: fadeIn .25s ease;
}
.dialog-overlay.hidden { display: none; }
.dialog-box {
    max-width: 340px; width: 86%;
    background: rgba(20,16,16,0.92); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212,175,55,0.18); border-radius: 24px;
    padding: 28px 24px 20px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dialog-box .d-icon { font-size: 42px; color: var(--gold); margin-bottom: 12px; }
.dialog-box h3 { color: var(--gold-light); font-size: 18px; margin-bottom: 8px; }
.dialog-box p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.dialog-box .d-actions { display: flex; flex-direction: column; gap: 8px; }
.dialog-box .d-btn {
    padding: 14px 20px; border-radius: 14px; font-size: 16px; font-weight: 600;
    border: none; cursor: pointer; transition: all .2s;
}
.dialog-box .d-btn.primary {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #0b0a0a;
}
.dialog-box .d-btn.secondary {
    background: transparent; color: var(--text-secondary);
    border: 1px solid rgba(212,175,55,0.25);
}
.dialog-box .d-btn:hover { transform: translateY(-1px); }

/* ===== 关于我们 ===== */
.about-section { padding: 0 16px calc(100px + var(--safe-bottom)); }
.about-card {
    background: linear-gradient(145deg, rgba(26,21,21,0.8), rgba(18,14,14,0.9));
    border: 1px solid rgba(212,175,55,0.1); border-radius: 20px;
    padding: 24px; margin-bottom: 16px;
}
.about-card .a-title {
    color: var(--gold-light); font-size: 16px; font-weight: 600;
    margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.about-card .a-title i { color: var(--gold-dim); font-size: 18px; }
.about-card .a-text {
    color: var(--text-secondary); font-size: 14px; line-height: 1.8;
}
.about-card .a-text p { margin-bottom: 8px; }
.about-card .a-text .highlight { color: var(--gold); }
.about-divider {
    height: 1px; background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
    margin: 20px 0;
}
.about-contact {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 14px;
    background: rgba(212,175,55,0.05); border: 1px solid rgba(212,175,55,0.12);
    text-decoration: none; color: var(--text-muted);
    font-size: 12px; transition: all 0.25s;
}
.about-contact i { color: var(--gold); font-size: 14px; }
.about-contact-url { color: var(--gold-light); font-weight: 500; }
.about-contact:hover {
    background: rgba(212,175,55,0.1);
    border-color: rgba(212,175,55,0.25);
    color: var(--text);
}
/* Support Card */
.support-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 20px;
    padding: 16px; margin-top: 16px; margin-bottom: 24px;
}
.support-title {
    font-size: 14px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 12px; padding-left: 4px;
}
.support-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(255,255,255,0.02); margin-bottom: 10px;
    text-decoration: none; color: inherit; cursor: pointer;
    border: 1px solid rgba(212,175,55,0.04);
    transition: background 0.2s;
}
.support-row:last-child { margin-bottom: 0; }
.support-row:hover { background: rgba(255,255,255,0.05); }
.support-row:active { background: rgba(212,175,55,0.05); }
.support-left { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 14px; }
.support-left i { color: var(--gold); font-size: 16px; width: 20px; text-align: center; }
.copy-btn {
    background: transparent; border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold); width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.copy-btn:hover { background: rgba(212,175,55,0.12); }
.copy-btn:active { transform: scale(0.92); }

/* About Modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-box {
    width: 100%; max-width: 360px;
    background: linear-gradient(145deg, #1a1515, #121010);
    border: 1px solid rgba(212,175,55,0.15); border-radius: 24px;
    overflow: hidden; animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(212,175,55,0.06);
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
    background: transparent; border: none; color: var(--text-muted);
    font-size: 18px; cursor: pointer; padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
    padding: 28px 24px; text-align: center;
}
.modal-logo {
    width: 64px; height: 64px; border-radius: 18px;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; font-size: 28px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; box-shadow: 0 8px 24px rgba(212,175,55,0.18);
}
.modal-text {
    font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.modal-footer {
    padding: 12px 20px 20px; display: flex; justify-content: center;
}
.modal-btn {
    background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.25);
    color: var(--gold); padding: 12px 32px; border-radius: 30px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.modal-btn:hover { background: rgba(212,175,55,0.2); }
.modal-btn:active { transform: scale(0.96); }

/* ===== My Page (reference my.html style) ===== */
.top-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px calc(8px + var(--safe-top)); position: sticky; top: 0;
    z-index: 20; background: rgba(11,10,10,0.6); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.nav-back {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: none;
    color: var(--text); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.nav-back:active { transform: scale(0.9); background: rgba(212,175,55,0.12); }
.nav-title {
    font-size: 20px; font-weight: 700; color: var(--text);
    letter-spacing: 0.3px;
}
.nav-right { display: flex; align-items: center; gap: 8px; }

.profile-main { padding-top: 8px; }
.profile-header {
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 20px 18px; text-align: center;
}
.profile-avatar-wrap { position: relative; margin-bottom: 14px; }
.profile-avatar {
    width: 92px; height: 92px; border-radius: 50%;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; font-size: 38px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid rgba(212,175,55,0.25);
    box-shadow: 0 12px 32px rgba(212,175,55,0.15);
}
.vip-badge {
    position: absolute; right: -4px; bottom: -2px;
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(145deg, #f0d88a, #b98a2e);
    color: #0f0d0d; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #121010; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.profile-name { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.3; }
.profile-level { font-size: 15px; color: var(--gold); margin-bottom: 6px; }
.profile-level i { margin-right: 4px; }
.profile-expiry { font-size: 14px; color: var(--text-muted); }

.stats-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    padding: 4px 16px 18px;
}
.stat-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 18px;
    padding: 18px 12px; text-align: center; cursor: pointer;
    transition: all 0.2s;
}
.stat-card:active { transform: scale(0.97); background: rgba(212,175,55,0.04); }
.stat-num { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.tab-nav {
    display: flex; gap: 6px; padding: 0 16px 14px;
}
.tab-btn {
    flex: 1; padding: 11px 0; border-radius: 12px;
    background: transparent; border: 1px solid rgba(212,175,55,0.12);
    color: var(--text-muted); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.tab-btn.active {
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; border-color: transparent; font-weight: 700;
}
.tab-content { display: none; animation: fadeIn 0.2s ease; }
.tab-content.active { display: block; }
.tab-content { padding: 0 16px 20px; }

/* Subscription cards */
.sub-card {
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 20px;
    padding: 18px; margin-bottom: 12px; cursor: pointer;
    transition: all 0.2s;
}
.sub-card:active { transform: scale(0.99); }
.sub-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub-card-name { font-size: 17px; font-weight: 700; color: var(--text); }
.sub-card-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--green); flex-shrink: 0;
}
.sub-card-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sub-card-desc {
    font-size: 14px; color: var(--text-secondary); line-height: 1.6;
    margin: 10px 0 12px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.sub-card-metrics {
    display: flex; gap: 14px; padding: 10px 12px;
    background: rgba(255,255,255,0.03); border-radius: 12px;
}
.sub-card-metric { font-size: 13px; color: var(--text-muted); }
.sub-card-metric .val { font-weight: 700; color: var(--text); margin-left: 4px; }
.sub-card-metric .val.up { color: var(--green); }
.sub-card-metric .val.down { color: var(--red); }
.sub-card-actions { display: flex; gap: 10px; margin-top: 12px; }
.sub-card-btn {
    flex: 1; padding: 11px 0; border-radius: 12px;
    background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.sub-card-btn i { margin-right: 5px; }
.sub-card-btn:active { transform: scale(0.96); }
.sub-card-btn.danger {
    background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.15);
    color: #f87171;
}

/* Favorites grid */
.fav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fav-grid .empty-state { grid-column: 1 / -1; }
.fav-card {
    position: relative; background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 18px;
    padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.fav-star {
    position: absolute; top: 10px; right: 10px;
    color: var(--gold); font-size: 14px; text-shadow: 0 0 10px rgba(212,175,55,0.5);
    cursor: pointer; padding: 4px; z-index: 2;
    transition: transform 0.2s;
}
.fav-star:active { transform: scale(0.8); }
.fav-card-name {
    font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.35;
    padding-right: 20px;
}
.fav-card-cat { font-size: 12px; color: var(--text-muted); }
.fav-card-ret { font-size: 20px; font-weight: 800; color: var(--green); margin-top: 2px; }
.fav-card-ret-label { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.fav-note {
    font-size: 12px; color: var(--text-secondary); background: rgba(255,255,255,0.03);
    border-radius: 8px; padding: 6px 8px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}

/* Settings */
.settings-group { margin-bottom: 22px; }
.settings-group-title {
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.8px; margin: 0 6px 10px;
}
.setting-item {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(27,24,24,0.6); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.08); border-radius: 16px;
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
    transition: all 0.2s;
}
.setting-item:active { background: rgba(212,175,55,0.04); }
.setting-item.logout .s-label { color: #f87171; }
.s-left { display: flex; align-items: center; gap: 12px; }
.s-icon {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 16px; flex-shrink: 0;
}
.s-label { font-size: 16px; font-weight: 600; color: var(--text); }
.s-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.s-arrow { color: var(--text-dim); font-size: 13px; }

/* About / Contact modals */
.about-modal {
    position: relative; width: 100%; max-width: 360px;
    background: linear-gradient(145deg, #1a1515, #121010);
    border: 1px solid rgba(212,175,55,0.15); border-radius: 24px;
    padding: 26px 22px 22px; animation: modalSlideUp 0.3s ease;
}
.about-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: none;
    color: var(--text-muted); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.about-modal-title {
    font-size: 20px; font-weight: 800; color: var(--text);
    margin-bottom: 16px; padding-right: 30px;
}
.about-modal h3 {
    font-size: 15px; font-weight: 700; color: var(--gold);
    margin: 14px 0 6px;
}
.about-modal p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.about-contact {
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid rgba(212,175,55,0.1);
    font-size: 13px; color: var(--text-muted); line-height: 1.9;
}
.about-contact span { color: var(--gold); }

.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(212,175,55,0.08);
    border-radius: 16px; padding: 14px; cursor: pointer;
    transition: all 0.2s;
}
.contact-row:active { background: rgba(212,175,55,0.05); }
.contact-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(212,175,55,0.1); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.contact-body { flex: 1; min-width: 0; }
.contact-label { font-size: 13px; color: var(--text-muted); }
.contact-value { font-size: 14px; color: var(--text); word-break: break-all; }
.contact-btn {
    padding: 8px 14px; border-radius: 10px;
    background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold); font-size: 13px; font-weight: 600; cursor: pointer;
    flex-shrink: 0;
}
.contact-arrow { color: var(--text-dim); font-size: 14px; }

.confirm-modal { text-align: center; padding: 28px 22px 22px; }
.confirm-msg { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin: 8px 0 22px; }
.confirm-btns { display: flex; gap: 12px; }
.confirm-btns button {
    flex: 1; padding: 12px 0; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; border: none;
}
.confirm-cancel { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.confirm-ok { background: linear-gradient(145deg, var(--gold), var(--gold-dim)); color: #0f0d0d; }
.confirm-btns button:active { transform: scale(0.96); }

.empty-sub { font-size: 13px; margin-top: 6px; }

/* 订阅卡片过期时间 */
.sub-card-expiry { font-size: 11px; color: var(--text-muted); margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.sub-card-expiry.exp { color: var(--red); }
.sub-card-status.expired { color: var(--red); }
.sub-card-status.expired .dot { background: var(--red); }

/* ==================== Membership / Subscription ==================== */
.membership-modal { max-width: 420px; padding: 28px 22px 22px; }
.membership-modal-title {
    text-align: center; font-size: 18px; font-weight: 700;
    color: var(--gold); margin-bottom: 16px;
}
.membership-modal-title i { margin-right: 6px; }
.mem-loading { text-align: center; padding: 14px 0; color: var(--text-muted); font-size: 13px; }
.mem-status {
    background: rgba(212,175,55,0.06); border: 1px solid rgba(212,175,55,0.15);
    border-radius: 14px; padding: 14px; margin-bottom: 14px;
}
.mem-status.active { border-color: rgba(76,175,80,0.25); background: rgba(76,175,80,0.06); }
.mem-status-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.mem-status-row:last-child { margin-bottom: 0; }
.mem-status-row .lbl { color: var(--text-muted); }
.mem-status-row .val { color: var(--text); font-weight: 600; }
.mem-status-row .val.gold { color: var(--gold); }
.mem-status-row .val.green { color: var(--green); }
.mem-status-row .val.red { color: var(--red); }
.mem-status .days-bar {
    height: 4px; background: rgba(255,255,255,0.06); border-radius: 4px;
    margin-top: 8px; overflow: hidden;
}
.mem-status .days-bar .fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-dim)); border-radius: 4px; }

.mem-history-title { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin: 14px 0 6px; }
.mem-history-list { display: flex; flex-direction: column; gap: 6px; max-height: 120px; overflow-y: auto; }
.mem-history-item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; padding: 8px 10px; border-radius: 10px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(212,175,55,0.06);
}
.mem-history-item .amt { color: var(--gold); font-weight: 600; }
.mem-history-item .st { font-size: 10px; padding: 1px 8px; border-radius: 10px; }
.mem-history-item .st.paid { color: var(--green); background: rgba(76,175,80,0.1); }
.mem-history-item .st.pending { color: var(--gold); background: rgba(212,175,55,0.08); }
.mem-history-item .st.failed { color: var(--red); background: rgba(239,83,80,0.08); }

.mem-plan-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 18px; padding: 16px; margin-bottom: 14px;
}
.mem-plan-price { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin-bottom: 10px; }
.mem-plan-price .cur { color: var(--gold); font-size: 16px; font-weight: 600; }
.mem-plan-price .amt { color: var(--gold); font-size: 36px; font-weight: 800; line-height: 1; }
.mem-plan-price .per { color: var(--text-muted); font-size: 12px; margin-left: 4px; }
.mem-plan-feats { display: flex; flex-direction: column; gap: 6px; }
.mem-plan-feats > div { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.mem-plan-feats i { color: var(--green); font-size: 10px; }

.mem-sub-btn {
    width: 100%; padding: 13px; border-radius: 30px;
    background: linear-gradient(145deg, var(--gold), var(--gold-dim));
    color: #0f0d0d; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; transition: 0.2s;
}
.mem-sub-btn:active { transform: scale(0.97); }
.mem-sub-btn:disabled { opacity: 0.6; pointer-events: none; }
.mem-sub-btn.active-plan { background: rgba(255,255,255,0.06); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.mem-note { text-align: center; font-size: 10px; color: var(--text-dim); margin-top: 10px; line-height: 1.5; }


