/* ============================================
   wgaat.com — 淮安梦蝶电子科技 公司官网
   设计：简洁专业，信任感，充电行业主题色
   ============================================ */

:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --accent: #f59e0b;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.10);
}

* { 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;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(8px);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px;
}
.logo-icon { font-size: 28px; }
.logo-text { color: var(--primary); }

.nav { display: flex; gap: 32px; }
.nav a {
  text-decoration: none; color: var(--text-light); font-size: 15px;
  font-weight: 500; transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--primary); }

.mobile-menu-btn {
  display: none; background: none; border: none; font-size: 24px;
  cursor: pointer; color: var(--text);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #059669 50%, #0d9488 100%);
  color: #fff; padding: 80px 0 60px;
}
.hero .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero-content h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.hero-subtitle { font-size: 20px; opacity: .9; margin-bottom: 16px; font-weight: 500; }
.hero-desc { font-size: 16px; opacity: .8; margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; }

.btn { display: inline-block; padding: 12px 28px; border-radius: var(--radius); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: all .2s; }
.btn-primary { background: #fff; color: var(--primary-dark); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline { border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  border-radius: var(--radius); padding: 24px; text-align: center;
  border: 1px solid rgba(255,255,255,.2);
}
.stat-num { font-size: 32px; font-weight: 800; }
.stat-num.loading { font-size: 20px; color: rgba(255,255,255,.6); }
.stat-label { font-size: 14px; opacity: .8; margin-top: 4px; }

/* ── Sections ── */
.section { padding: 64px 0; }
.section-light { background: var(--bg-light); }
.section-highlight { background: var(--primary-light); }
.section-title {
  text-align: center; font-size: 32px; font-weight: 700;
  margin-bottom: 12px; color: var(--text);
}
.section-desc { text-align: center; color: var(--text-light); margin-bottom: 40px; }

/* ── Page Hero ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), #059669);
  color: #fff; padding: 48px 0; text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.page-hero p { font-size: 18px; opacity: .85; }

/* ── Features ── */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px;
}
.feature-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  text-align: center; transition: box-shadow .2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 40px; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); }

/* ── Platform Functions ── */
.platform-func {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px;
}
.func-block {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px;
}
.func-block h4 {
  font-size: 18px; color: var(--primary); margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--primary-light);
}
.func-block ul { list-style: none; }
.func-block li {
  padding: 6px 0; font-size: 14px; color: var(--text-light);
  position: relative; padding-left: 18px;
}
.func-block li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ── Partners ── */
.partners-logos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px;
}
.partner-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.partner-icon { font-size: 36px; margin-bottom: 8px; }
.partner-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.partner-desc { font-size: 13px; color: var(--text-light); }

/* ── Architecture ── */
.arch-diagram { margin-top: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }
.arch-box {
  border-radius: var(--radius); padding: 20px 28px; text-align: center;
}
.arch-box h4 { font-size: 16px; margin-bottom: 6px; }
.arch-box p { font-size: 13px; opacity: .8; }
.arch-user { background: #dbeafe; border: 1px solid #93c5fd; }
.arch-platform { background: var(--primary-light); border: 1px solid #86efac; }
.arch-device { background: #fef3c7; border: 1px solid #fcd34d; }
.arch-arrow { text-align: center; font-size: 24px; color: var(--text-light); padding: 8px 0; }

/* ── Product Detail ── */
.product-block { margin-bottom: 48px; }
.product-block h3 { font-size: 22px; margin-bottom: 20px; color: var(--primary-dark); }
.product-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product-detail {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.product-detail h4 { font-size: 16px; margin-bottom: 6px; }
.product-detail p { font-size: 14px; color: var(--text-light); }

/* ── Integration List ── */
.integration-list { margin-top: 32px; }
.integration-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
}
.integration-item h4 { font-size: 16px; color: var(--primary-dark); margin-bottom: 4px; }
.integration-item p { font-size: 14px; color: var(--text-light); }

/* ── About ── */
.about-content { max-width: 800px; margin: 0 auto; }
.about-content p { margin-bottom: 16px; font-size: 16px; line-height: 1.8; color: var(--text); }

/* ── Info Table ── */
.info-table { width: 100%; max-width: 800px; margin: 32px auto 0; border-collapse: collapse; }
.info-table th, .info-table td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.info-table th { width: 160px; color: var(--text-light); font-weight: 500; white-space: nowrap; }

/* ── IP Cards ── */
.ip-grid { display: flex; justify-content: center; gap: 48px; margin-top: 32px; }
.ip-card { text-align: center; }
.ip-num { font-size: 48px; font-weight: 800; color: var(--primary); }
.ip-label { font-size: 15px; color: var(--text-light); margin-top: 4px; }

/* ── Progress Timeline ── */
.progress-timeline { max-width: 700px; margin: 32px auto 0; }
.timeline-item { display: flex; gap: 20px; margin-bottom: 24px; align-items: flex-start; }
.timeline-dot {
  width: 36px; height: 36px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.timeline-item.done .timeline-dot { background: var(--primary); color: #fff; }
.timeline-item.current .timeline-dot { background: var(--accent); color: #fff; animation: pulse 2s infinite; }
.timeline-content h4 { font-size: 16px; margin-bottom: 4px; }
.timeline-content p { font-size: 14px; color: var(--text-light); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.4); }
  50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* ── News ── */
.news-list { max-width: 800px; margin: 0 auto; }
.news-item {
  border-bottom: 1px solid var(--border); padding: 28px 0;
}
.news-item:first-child { padding-top: 0; }
.news-date {
  font-size: 13px; color: var(--text-light); margin-bottom: 8px;
}
.news-item h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); cursor: pointer; }
.news-item h3:hover { color: var(--primary); }
.news-item p { font-size: 15px; color: var(--text-light); line-height: 1.8; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 22px; margin-bottom: 24px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-icon { font-size: 28px; flex-shrink: 0; }
.contact-item h4 { font-size: 16px; margin-bottom: 2px; }
.contact-item p { font-size: 14px; color: var(--text-light); }
.contact-item a { color: var(--primary); text-decoration: none; }
.contact-qr {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; text-align: center;
}
.contact-qr h3 { font-size: 22px; margin-bottom: 12px; }
.contact-qr p { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }
.qr-tip { font-size: 13px !important; margin-top: 24px !important; }

/* ── Footer ── */
.footer {
  background: var(--bg-dark); color: #94a3b8; padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col p { font-size: 14px; margin-bottom: 8px; line-height: 1.6; }
.footer-col a { display: block; color: #94a3b8; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 20px;
  text-align: center; font-size: 13px;
}

/* ── Development Timeline (About page) ── */
.dev-timeline { position: relative; padding-left: 80px; }
.dev-timeline::before {
  content: ''; position: absolute; left: 48px; top: 0; bottom: 0;
  width: 2px; background: var(--primary-light);
}
.dt-item { position: relative; margin-bottom: 32px; }
.dt-item:last-child { margin-bottom: 0; }
.dt-year {
  position: absolute; left: -80px; top: 0; width: 70px;
  font-size: 14px; font-weight: 700; color: var(--primary);
  text-align: right; white-space: nowrap;
}
.dt-dot {
  position: absolute; left: -36px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--primary-light);
  z-index: 1;
}
.dt-content { padding-bottom: 4px; }
.dt-content h4 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.dt-content p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* ── Back to Top Button ── */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 99;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.back-to-top:hover { background: var(--primary-dark); }

/* ── Stat Loading Animation ── */
.stat-num.loading { animation: pulse 1.2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: .4; }
  50% { opacity: .8; }
}

/* ── Product FAQ ── */
.faq-list { margin-top: 16px; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 18px 0; cursor: pointer;
}
.faq-item:first-child { padding-top: 0; }
.faq-q {
  font-size: 16px; font-weight: 600; color: var(--text);
  display: flex; align-items: flex-start; gap: 10px;
}
.faq-q::before { content: 'Q'; color: var(--primary); font-weight: 800; font-size: 18px; flex-shrink: 0; }
.faq-a {
  font-size: 14px; color: var(--text-light); line-height: 1.8;
  margin-top: 8px; padding-left: 28px; display: none;
}
.faq-a::before { content: 'A'; color: var(--accent); font-weight: 800; margin-right: 8px; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q { color: var(--primary); }

/* ── Print Styles ── */
@media print {
  .header, .footer, .back-to-top, .mobile-menu-btn, .hero-actions { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .hero { background: none !important; color: #000 !important; padding: 20px 0 !important; }
  .section { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .container { max-width: 100%; padding: 0 10px; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 12px;
  }
  .hero .container { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 28px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .platform-func { grid-template-columns: 1fr; }
  .partners-logos { grid-template-columns: 1fr 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .dev-timeline { padding-left: 56px; }
  .dev-timeline::before { left: 32px; }
  .dt-year { left: -56px; width: 48px; font-size: 12px; }
  .dt-dot { left: -26px; }
  .ip-grid { justify-content: space-around; gap: 16px; }
  .ip-num { font-size: 36px; }
}
