/* --- 全局样式 (所有页面共用) --- */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-glow: rgba(168, 85, 247, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; line-height: 1.6; }

/* 背景光效 */
.glow-bg { position: fixed; top: -20%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(15,23,42,0) 70%); border-radius: 50%; z-index: -1; filter: blur(80px); }
.glow-bg-2 { position: fixed; bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, rgba(15,23,42,0) 70%); border-radius: 50%; z-index: -1; filter: blur(100px); }

/* 导航栏 */
nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; backdrop-filter: blur(10px); position: fixed; width: 100%; top: 0; z-index: 100; border-bottom: 1px solid rgba(255,255,255,0.05); }
.logo { font-size: 1.5rem; font-weight: 700; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none; letter-spacing: -0.5px; }
.nav-links a { color: var(--text-muted); text-decoration: none; margin-left: 30px; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

/* 按钮 */
.btn-primary { background: var(--primary-gradient); color: white; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: all 0.3s; border: none; cursor: pointer; display: inline-block; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px -5px var(--accent-glow); }
.btn-secondary { background: transparent; color: white; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s; display: inline-block; }
.btn-secondary:hover { border-color: var(--text-main); background: rgba(255,255,255,0.05); }

/* 通用布局 */
.section { padding: 100px 5%; max-width: 1200px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.05); padding: 35px; border-radius: 20px; transition: all 0.3s ease; position: relative; overflow: hidden; }
.card:hover { transform: translateY(-5px); border-color: rgba(168, 85, 247, 0.4); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5); }
.card h3 { margin-bottom: 15px; font-size: 1.4rem; color: #fff; }
.card p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.card-icon { font-size: 2rem; margin-bottom: 20px; display: block; }

/* 首页特有 */
header { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 120px 20px 50px; position: relative; }
h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; letter-spacing: -1px; }
.subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 650px; margin-bottom: 50px; font-weight: 300; }

/* 代码预览 */
.code-preview { margin-top: 60px; background: #1e293b; border-radius: 12px; padding: 20px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5); font-family: 'Courier New', monospace; font-size: 0.9rem; color: #94a3b8; max-width: 800px; width: 100%; text-align: left; opacity: 0; animation: fadeInUp 1s ease forwards 0.5s; }
.code-line { margin-bottom: 5px; display: block; }
.c-purple { color: #a855f7; }
.c-blue { color: #6366f1; }
.c-green { color: #10b981; }
.cmd { color: #f8fafc; }

/* 动画 */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 页脚 */
footer { text-align: center; padding: 60px 20px; border-top: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.9rem; margin-top: 50px;}

/* 响应式 */
@media (max-width: 768px) { 
    h1 { font-size: 3rem; } 
    .nav-links { display: none; } 
    .code-preview { display: none; }
}
