:root {
    --bg-color: #f0f4f8;
    --text-main: #1e293b;
    --text-sub: #64748b;
    
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: 1px solid rgba(255, 255, 255, 0.8);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    --primary: #3b82f6; 
    --accent: #6366f1;  
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    line-height: 1.6;
    overflow-x: hidden;
}

/* 动态背景 */
.ambient-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; animation: float 10s infinite alternate; }
.blob-1 { width: 300px; height: 300px; background: #bfdbfe; top: -50px; left: -50px; }
.blob-2 { width: 400px; height: 400px; background: #e9d5ff; bottom: -100px; right: -50px; animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* 主容器 */
.app-wrapper {
    width: 100%; max-width: 480px; min-height: 100vh;
    padding: 20px; display: flex; flex-direction: column; position: relative;
}

/* 头部卡片 */
.header-card {
    background: var(--card-bg); border: var(--card-border); border-radius: 24px; padding: 20px;
    text-align: center; box-shadow: var(--card-shadow); backdrop-filter: blur(20px); margin-bottom: 20px;
}
.brand-title {
    font-size: 1.8rem; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}
.brand-slogan { font-size: 0.85rem; color: var(--text-sub); text-transform: uppercase; letter-spacing: 2px; }

.notice-bar {
    background: #fff; border-radius: 50px; padding: 8px 15px;
    display: flex; align-items: center; margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden; 
}
.notice-icon { font-size: 1.1rem; margin-right: 10px; animation: shake 3s infinite; flex-shrink: 0; }
.marquee-wrap { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }

.marquee-text { 
    display: inline-block; 
    font-size: 0.85rem; 
    color: #ef4444; /* 红色高亮 */
    font-weight: 600;
    /* 4s linear infinite 表示4秒滚完一圈，匀速，无限循环 */
    animation: scrollLeft 10s linear infinite; 
    /* 增加 padding-left 确保初始位置 */
    padding-left: 0;
}

/* 动画关键帧保持不变，控制从右侧屏幕外(100%)滚到左侧屏幕外(-100%) */
@keyframes scrollLeft { 
    0% { transform: translateX(100%); } 
    100% { transform: translateX(-100%); } 
}

@keyframes scrollLeft { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes shake { 0%,100% { transform: rotate(0); } 10%,30% { transform: rotate(-15deg); } 20%,40% { transform: rotate(15deg); } 50% { transform: rotate(0); } }

/* 首页快捷入口 */
.section-title { font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 20px 0 12px 5px; display: flex; align-items: center; }
.section-title::before { content: ''; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; margin-right: 8px; }

.grid-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.nav-card {
    background: #fff; border-radius: 20px; padding: 25px 15px;
    text-decoration: none; position: relative; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.2s;
    /* 居中对齐 */
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.nav-card:active { transform: scale(0.97); }

.card-icon-box {
    width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; margin-bottom: 12px; box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.card-desc { font-size: 0.8rem; color: var(--text-sub); opacity: 0.8; }

/* 列表导航 */
.list-nav { display: flex; flex-direction: column; gap: 12px; }
.list-item {
    background: #fff; border-radius: 16px; padding: 15px 20px; display: flex; align-items: center;
    text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,0.02); transition: background 0.2s;
    justify-content: space-between;
}
.list-content { display: flex; align-items: center; }
.list-item:active { background: #f8fafc; }
.list-icon { font-size: 1.4rem; margin-right: 15px; }
.list-text { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.list-arrow { color: #cbd5e1; font-size: 1.2rem; }

/* 网站列表 */
.site-list { display: flex; flex-direction: column; gap: 12px; }
.site-row {
    background: #fff; border-radius: 16px; padding: 18px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); text-decoration: none; border: 1px solid rgba(0,0,0,0.02);
}
.site-left { display: flex; align-items: center; }
.site-index { font-size: 0.9rem; font-weight: 700; color: #cbd5e1; width: 25px; }
.site-info h3 { font-size: 0.9rem; color: var(--text-sub); font-weight: 500; margin-bottom: 2px; }
.site-url { font-size: 1.1rem; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; }
.site-speed { 
    font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; 
    min-width: 50px; text-align: center; display: inline-block;
}
.speed-fast { color: #10b981; background: #d1fae5; }
.speed-medium { color: #f59e0b; background: #fef3c7; }
.speed-slow { color: #ef4444; background: #fee2e2; }
.speed-checking { color: #64748b; background: #f1f5f9; animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* 扫码页 */
.scan-card {
    background: #fff; border-radius: 24px; padding: 30px 20px; text-align: center; margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 5px; }
.page-desc { color: var(--text-sub); font-size: 0.9rem; margin-bottom: 25px; }
.qr-box {
    background: #f8fafc; padding: 15px; border-radius: 20px; position: relative;
    width: 220px; height: 220px; margin: 0 auto 20px auto; border: 1px solid #e2e8f0;
}
.qr-img { width: 100%; height: 100%; border-radius: 12px; object-fit: contain; }
.scan-line {
    position: absolute; width: 90%; left: 5%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
    top: 10%; animation: scanAnim 2.5s ease-in-out infinite; z-index: 5; opacity: 0.8;
}
@keyframes scanAnim { 0% { top: 10%; opacity: 0; } 50% { opacity: 1; } 90% { opacity: 1; } 100% { top: 90%; opacity: 0; } }

.step-tips { display: flex; justify-content: space-around; margin-top: 30px; border-top: 1px solid #f1f5f9; padding-top: 20px; }
.tip-item { display: flex; flex-direction: column; align-items: center; width: 33%; position: relative; }
.tip-item:not(:last-child)::after { content: '›'; position: absolute; right: -5px; top: 15px; color: #cbd5e1; font-size: 1.2rem; }
.tip-num { width: 28px; height: 28px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 8px; font-size: 0.9rem; }
.tip-text { font-size: 0.75rem; color: var(--text-sub); line-height: 1.4; }

.big-btn {
    display: flex; justify-content: center; align-items: center; width: 100%; padding: 16px; border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700;
    text-decoration: none; box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3); border: none; font-size: 1rem;
    transition: transform 0.2s;
}
.big-btn:active { transform: scale(0.97); }

/* 教程页 */
.guide-flow { margin-top: 20px; padding: 0 5px; }
.guide-step { display: flex; margin-bottom: 30px; }
.g-icon { 
    width: 40px; height: 40px; background: #fff; border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-right: 15px; flex-shrink: 0; z-index: 2; position: relative;
}
.guide-step:not(:last-child) .g-icon::after {
    content: ''; position: absolute; bottom: -35px; left: 50%; transform: translateX(-50%);
    width: 2px; height: 35px; background: #e2e8f0; z-index: -1;
}
.g-content { flex: 1; }
.g-title { font-weight: 700; color: var(--text-main); font-size: 1rem; margin-bottom: 5px; }
.g-desc { font-size: 0.85rem; color: var(--text-sub); line-height: 1.5; margin-bottom: 12px; }
.browser-mockup { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; max-width: 260px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.mockup-btn { width: 100%; height: 36px; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #333; font-size: 0.85rem; font-weight: 500; }

.footer { margin-top: auto; text-align: center; color: #94a3b8; font-size: 0.75rem; padding-bottom: 20px; }

/* 游标 (仅PC) */
.cursor-dot { pointer-events: none; z-index: 9999; position: fixed; border-radius: 50%; width: 8px; height: 8px; background: var(--primary); }
.cursor-outline { pointer-events: none; z-index: 9999; position: fixed; border-radius: 50%; width: 30px; height: 30px; border: 2px solid rgba(255, 117, 140, 0.5); transition: 0.15s; }
.cursor-outline.hovered { width: 50px; height: 50px; background: rgba(255, 117, 140, 0.1); border-color: transparent; }

@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
}