/* 亿滴福 AI科技网 - 全局样式 */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #06b6d4;
  --accent: #8b5cf6;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --success: #10b981;
  --warning: #f59e0b;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-2: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--secondary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary); }

/* 导航栏 */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.navbar-logo span { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar-links { display: flex; gap: 2rem; align-items: center; }
.navbar-links a { color: var(--text-secondary); font-weight: 500; transition: color 0.3s; }
.navbar-links a:hover, .navbar-links a.active { color: var(--primary); }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a { padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; border: 1px solid var(--border); color: var(--text-secondary); }
.lang-switch a.active { background: var(--primary); color: white; border-color: var(--primary); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* 英雄区 */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(6,182,212,0.1) 0%, transparent 60%);
  padding: 100px 2rem 4rem;
}
.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; }
.hero-title .gradient { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.8; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 10px; font-weight: 600; font-size: 1rem; transition: all 0.3s; cursor: pointer; border: none; }
.btn-primary { background: var(--gradient-1); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }
.btn-outline { background: transparent; color: var(--text-primary); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.hero-visual { position: relative; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem; backdrop-filter: blur(10px);
}
.hero-card pre { color: var(--secondary); font-size: 0.85rem; line-height: 1.8; overflow-x: auto; }

/* 通用区域 */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 1rem; }
.section-sub { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; font-size: 1.1rem; }

/* 功能卡片 */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(99,102,241,0.15); }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.2rem; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.feature-card p { color: var(--text-secondary); line-height: 1.7; }

/* 文章卡片 */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 2rem; }
.article-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: all 0.3s;
}
.article-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.article-card-img {
  height: 180px; background: var(--gradient-1); display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: white;
}
.article-card-body { padding: 1.5rem; }
.article-card-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; background: rgba(99,102,241,0.15); color: var(--primary); margin-bottom: 0.8rem; }
.article-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; line-height: 1.5; }
.article-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.article-card-meta { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.85rem; }

/* 工具卡片 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; transition: all 0.3s; cursor: pointer; display: block; color: var(--text-primary);
}
.tool-card:hover { transform: translateY(-5px); border-color: var(--secondary); box-shadow: 0 10px 30px rgba(6,182,212,0.15); color: var(--text-primary); }
.tool-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.tool-card h3 { font-size: 1.3rem; margin-bottom: 0.8rem; }
.tool-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* 数据看板 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.stat-box {
  text-align: center; padding: 2rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
}
.stat-number { font-size: 2.8rem; font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: var(--text-secondary); margin-top: 0.5rem; }

/* 页脚 */
.footer {
  background: rgba(15, 23, 42, 0.98); border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-secondary); margin-top: 1rem; line-height: 1.7; }
.footer h4 { font-size: 1rem; margin-bottom: 1.2rem; color: var(--text-primary); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.95rem; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 2rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* 文章详情页 */
.article-detail { max-width: 800px; margin: 100px auto 4rem; padding: 0 2rem; }
.article-detail-header { margin-bottom: 3rem; }
.article-detail-title { font-size: 2.5rem; font-weight: 800; line-height: 1.3; margin: 1rem 0; }
.article-detail-meta { display: flex; gap: 2rem; color: var(--text-muted); font-size: 0.95rem; flex-wrap: wrap; }
.article-detail-body { font-size: 1.1rem; line-height: 1.9; color: var(--text-secondary); }
.article-detail-body h2 { color: var(--text-primary); font-size: 1.8rem; margin: 2.5rem 0 1rem; }
.article-detail-body h3 { color: var(--text-primary); font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.article-detail-body p { margin-bottom: 1.2rem; }
.article-detail-body pre {
  background: #0d1117; border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; font-size: 0.95rem; line-height: 1.7;
}
.article-detail-body code { color: var(--secondary); }
.article-detail-body ul, .article-detail-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-detail-body li { margin-bottom: 0.5rem; }
.article-detail-body .tip-box {
  background: rgba(99,102,241,0.08); border-left: 4px solid var(--primary);
  padding: 1.2rem 1.5rem; border-radius: 0 10px 10px 0; margin: 1.5rem 0;
}

/* 工具页面 */
.tool-page { max-width: 1000px; margin: 100px auto 4rem; padding: 0 2rem; }
.tool-page-header { text-align: center; margin-bottom: 3rem; }
.tool-page-icon { font-size: 4rem; margin-bottom: 1rem; }
.tool-page-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 1rem; }

/* 提示词优化器 */
.prompt-tool { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.prompt-tool label { display: block; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 500; }
.prompt-tool textarea {
  width: 100%; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; color: var(--text-primary); font-size: 1rem; resize: vertical; min-height: 120px;
  font-family: inherit;
}
.prompt-tool textarea:focus { outline: none; border-color: var(--primary); }
.prompt-result {
  background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; margin-top: 1.5rem; white-space: pre-wrap; line-height: 1.8;
  display: none;
}
.prompt-result.show { display: block; }

/* Token 计算器 */
.token-calc { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.token-calc select, .token-calc input, .token-calc textarea {
  width: 100%; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; color: var(--text-primary); font-size: 1rem; margin-bottom: 1rem;
}
.token-calc select:focus, .token-calc input:focus, .token-calc textarea:focus { outline: none; border-color: var(--primary); }
.token-result {
  background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; margin-top: 1rem; display: none;
}
.token-result.show { display: block; }
.token-result .big-number { font-size: 2.5rem; font-weight: 800; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* 关于页面 */
.about-page { max-width: 900px; margin: 100px auto 4rem; padding: 0 2rem; }
.about-hero { text-align: center; margin-bottom: 4rem; }
.about-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }
.about-section { margin-bottom: 3rem; }
.about-section h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--primary); }
.about-section p { color: var(--text-secondary); line-height: 1.8; font-size: 1.05rem; }
.timeline { border-left: 3px solid var(--primary); padding-left: 2rem; margin: 2rem 0; }
.timeline-item { margin-bottom: 2rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.55rem; top: 5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
}
.timeline-date { color: var(--secondary); font-weight: 600; font-size: 0.95rem; }
.timeline-title { font-size: 1.2rem; font-weight: 600; margin: 0.3rem 0; }

/* 回到顶部 */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-1); color: white; border: none;
  font-size: 1.2rem; cursor: pointer; opacity: 0; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.back-to-top.show { opacity: 1; }
.back-to-top:hover { transform: translateY(-3px); }

/* 响应式 */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-title { font-size: 2.2rem; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .navbar-links { display: none; }
  .navbar-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-dark); padding: 1rem 2rem; border-bottom: 1px solid var(--border); }
  .mobile-menu-btn { display: block; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.6rem; }
  .article-detail-title { font-size: 1.8rem; }
}
