/* ================================================================
   丹竹科技 - 全站样式系统
   浅色科技简约风 | 响应式 | 零依赖
   ================================================================ */

/* ---- 设计变量 ---- */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --accent: #7C3AED;
  --bg: #FAFBFC;
  --bg-alt: #F3F4F6;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px -8px rgba(0,0,0,.12), 0 4px 12px -2px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---- 基础重置 ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ---- 容器 ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600;
  transition: all .25s ease; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px -2px rgba(37,99,235,.4);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px -2px rgba(37,99,235,.5); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 4px 14px -2px rgba(37,99,235,.35);
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 6px 24px -2px rgba(124,58,237,.4); }
.btn-lg { padding: 16px 40px; font-size: 17px; }

/* ---- 导航栏 ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: all .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { line-height: 1.1; }
.logo-text small { display: block; font-size: 10px; font-weight: 600; color: var(--text-light); letter-spacing: 1.5px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--text-muted); transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px; background: var(--primary); border-radius: 2px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; background: none; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Hero 首屏 ---- */
.hero {
  position: relative; padding: 140px 0 90px; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--primary-light) 0%, transparent 70%);
}
.hero::before {
  content: ''; position: absolute; top: 20%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.08) 0%, transparent 60%); border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -20%; left: -10%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 60%); border-radius: 50%;
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px;
  background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.15);
  border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 28px;
}
.hero-badge::before { content: ''; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 20px; }
.hero h1 .gradient-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 18px; color: var(--text-muted); line-height: 1.7; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-visual { margin-top: 56px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.hero-phone {
  width: 180px; height: 360px; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-xl); border: 4px solid #fff; background: #fff;
  transform: rotate(-3deg); transition: transform .4s ease;
}
.hero-phone:nth-child(2) { transform: rotate(0deg) translateY(-20px); }
.hero-phone:nth-child(3) { transform: rotate(3deg); }
.hero-phone:hover { transform: rotate(0deg) translateY(-12px); z-index: 10; }
.hero-phone img { width: 100%; height: 100%; object-fit: cover; }

/* ---- 通用板块 ---- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-header h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; margin-bottom: 14px; letter-spacing: -.5px; }
.section-header p { font-size: 16px; color: var(--text-muted); }
.section-header .label { display: inline-block; font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; }

/* ---- 产品网格 ---- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  transition: all .3s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.product-card-img {
  aspect-ratio: 3/4; overflow: hidden; position: relative; background: var(--bg-alt);
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.15) 100%); pointer-events: none; }
.product-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.product-card-body p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.product-tag { font-size: 12px; padding: 4px 12px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-weight: 500; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; }
.product-card-footer .version { font-size: 12px; color: var(--text-light); }
.product-link { font-size: 14px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; transition: gap .2s; }
.product-link:hover { gap: 8px; }

/* ---- 优势板块 ---- */
.advantage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.advantage-item { text-align: center; padding: 40px 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border-light); transition: all .3s; }
.advantage-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.advantage-icon {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.advantage-icon svg { width: 32px; height: 32px; }
.advantage-item h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.advantage-item p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ---- 统计数字 ---- */
.stats { display: flex; justify-content: center; gap: 56px; padding: 48px 0; }
.stat-item { text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ---- 联系板块 ---- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 680px; margin: 0 auto; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border-light); transition: all .3s; }
.contact-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); transform: translateY(-2px); }
.contact-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-icon svg { width: 26px; height: 26px; }
.contact-info h4 { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.contact-info p { font-size: 18px; font-weight: 700; }

/* ---- 页脚 ---- */
.footer { background: #111827; color: #9CA3AF; padding: 56px 0 28px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer-links-col h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.footer-links-col a { display: block; font-size: 14px; padding: 5px 0; transition: color .2s; }
.footer-links-col a:hover { color: #fff; }
.footer-bottom { padding-top: 24px; text-align: center; font-size: 13px; line-height: 1.8; }
.footer-bottom a { color: var(--text-light); }
.footer-bottom a:hover { color: #fff; }

/* ---- App 详情页 ---- */
.detail-page { padding-top: 68px; }
.detail-hero { background: radial-gradient(ellipse 60% 80% at 50% 0%, var(--primary-light) 0%, transparent 70%); padding: 56px 0 48px; }
.detail-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 28px; transition: color .2s; }
.detail-back:hover { color: var(--primary); }
.detail-hero-inner { display: flex; gap: 40px; align-items: flex-start; }
.detail-icon-wrap { flex-shrink: 0; }
.detail-icon {
  width: 200px; aspect-ratio: 9/16; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 4px solid #fff; background: #fff;
}
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.detail-info .detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-tags .product-tag { font-size: 13px; padding: 5px 14px; }
.detail-desc-short { font-size: 16px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }
.detail-meta { display: flex; gap: 24px; margin-bottom: 28px; }
.detail-meta-item { font-size: 14px; color: var(--text-muted); }
.detail-meta-item strong { color: var(--text); font-weight: 600; }
.detail-download { display: flex; gap: 12px; flex-wrap: wrap; }

.detail-body { padding: 56px 0; }
.detail-body-inner { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.detail-content h2 { font-size: 22px; font-weight: 700; margin-bottom: 18px; position: relative; padding-left: 16px; }
.detail-content h2::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 22px; background: var(--primary); border-radius: 3px; }
.detail-content p { font-size: 15px; line-height: 1.8; color: var(--text-muted); margin-bottom: 32px; }

/* 截图展示 - 自适应网格，不会溢出 */
.screenshot-gallery { margin-bottom: 48px; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.screenshot-item {
  aspect-ratio: 9/16; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow); border: 3px solid #fff; cursor: pointer;
  position: relative; transition: transform .25s ease, box-shadow .25s ease;
}
.screenshot-item:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-lg); }
.screenshot-item img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-item::after {
  content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0);
  transition: background .2s; border-radius: var(--radius-sm);
}
.screenshot-item:hover::after { background: rgba(0,0,0,.15); }

/* 灯箱（点击放大查看） */
.lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); align-items: center; justify-content: center; padding: 32px; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 20px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.25); }
.lightbox-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 14px; }

/* 功能亮点 */
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 48px; }
.feature-item { display: flex; align-items: flex-start; gap: 12px; padding: 20px; background: var(--card); border-radius: var(--radius-sm); border: 1px solid var(--border-light); }
.feature-item .check { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.feature-item .check svg { width: 14px; height: 14px; }
.feature-item p { font-size: 14px; color: var(--text); margin: 0; line-height: 1.5; }

/* 操作步骤 */
.step-list { margin-bottom: 48px; }
.step-item { display: flex; gap: 16px; margin-bottom: 20px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-item p { font-size: 15px; color: var(--text); padding-top: 4px; }

/* 侧边栏 */
.detail-sidebar { position: sticky; top: 92px; }
.sidebar-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.sidebar-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.sidebar-card .sidebar-download { display: block; text-align: center; margin-bottom: 16px; }
.sidebar-info { font-size: 14px; }
.sidebar-info-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.sidebar-info-item:last-child { border-bottom: none; }
.sidebar-info-item span:first-child { color: var(--text-muted); }
.sidebar-info-item span:last-child { font-weight: 600; }

/* 相关产品 */
.related-products { padding: 56px 0; background: var(--bg-alt); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---- Toast 提示弹窗 ---- */
#copyToast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.85);
  z-index: 10000; display: flex; align-items: center; gap: 14px;
  padding: 20px 28px; background: rgba(17,24,39,.95); backdrop-filter: blur(8px);
  border-radius: var(--radius); box-shadow: var(--shadow-xl);
  opacity: 0; transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
#copyToast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.toast-icon svg { width: 20px; height: 20px; }
.toast-text { color: #fff; }
.toast-title { font-size: 15px; font-weight: 700; }
.toast-content { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ---- 动效 ---- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in:nth-child(2) { transition-delay: .1s; }
.fade-in:nth-child(3) { transition-delay: .2s; }
.fade-in:nth-child(4) { transition-delay: .3s; }

/* ---- 移动端适配 ---- */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .advantage-grid { grid-template-columns: 1fr; }
  .detail-body-inner { grid-template-columns: 1fr; }
  .detail-hero-inner { flex-direction: column; align-items: center; text-align: center; }
  .detail-tags { justify-content: center; }
  .detail-meta { justify-content: center; }
  .detail-download { justify-content: center; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-list { grid-template-columns: 1fr; }
  .stats { gap: 32px; flex-wrap: wrap; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px 24px; gap: 0; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border-light); width: 100%; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 110px 0 60px; }
  .hero-phone { width: 130px; height: 260px; }
  .product-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .detail-hero { padding: 36px 0 32px; }
  .detail-info h1 { font-size: 26px; }
  .detail-icon { width: 160px; }
  .screenshot-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
}
