/* ---------------------------------------------------------------------------
   第六感测试 · 官网样式（响应式 / 移动优先）
   --------------------------------------------------------------------------- */

:root {
  --primary: #6c5ce7;
  --primary-dark: #5847d1;
  --primary-light: #a29bfe;
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-mute: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(31, 41, 55, 0.08);
  --shadow-hover: 0 10px 36px rgba(108, 92, 231, 0.18);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 顶部导航 ========== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand img { height: 32px; width: 32px; border-radius: 8px; object-fit: cover; }
.nav-menu {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 15px;
  transition: all .15s;
}
.nav-menu a:hover, .nav-menu a.active {
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  color: var(--text);
}

/* ========== Hero ========== */

.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 50%, #fdf4ff 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.12), transparent 40%),
                    radial-gradient(circle at 80% 30%, rgba(236, 72, 153, 0.10), transparent 45%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}
.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(120deg, var(--primary) 0%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
}
.hero p {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 32px;
}
.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.35);
}
.hero-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(108, 92, 231, 0.45);
}
.hero-image {
  margin-top: 56px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.hero-image img { width: 100%; display: block; }

/* ========== Section ========== */

.section {
  padding: 80px 0;
}
.section.alt { background: var(--bg-soft); }
.section-title {
  text-align: center;
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}
.section-sub {
  text-align: center;
  color: var(--text-mute);
  margin: 0 0 48px;
  font-size: 16px;
}

/* ========== 产品卡片 ========== */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}
.product-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-icon .product-icon-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}
.product-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.product-card .subtitle {
  color: var(--primary);
  font-size: 14px;
  margin: 0 0 12px;
}
.product-card .summary {
  color: var(--text-soft);
  font-size: 15px;
  margin: 0 0 20px;
  flex: 1;
}
.product-card .more {
  font-size: 14px;
  font-weight: 600;
}

/* ========== 平台介绍 ========== */

.about-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--text-soft);
}
.about-content h2, .about-content h3 { color: var(--text); }
.about-content img { border-radius: var(--radius); margin: 16px 0; }

/* ========== 新闻卡片 ========== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.news-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-light), #f9a8d4);
  overflow: hidden;
}
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cover .news-cover-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}
.news-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.news-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
  border-radius: 999px;
  margin-bottom: 10px;
  width: fit-content;
}
.news-card h3 { margin: 0 0 8px; font-size: 18px; }
.news-meta { font-size: 13px; color: var(--text-mute); margin-bottom: 8px; }
.news-summary { color: var(--text-soft); font-size: 14px; margin: 0 0 14px; flex: 1; }
.news-link { font-size: 14px; font-weight: 600; }

/* 新闻列表（独立页用） */
.news-list { display: flex; flex-direction: column; gap: 20px; max-width: 820px; margin: 0 auto; }
.news-row {
  display: flex;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .2s;
}
.news-row:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}
.news-row .news-cover { width: 200px; aspect-ratio: 4 / 3; flex-shrink: 0; border-radius: 8px; }
.news-row .body { flex: 1; }
.news-row h3 { margin: 6px 0; font-size: 18px; }
.news-row p { color: var(--text-soft); margin: 6px 0 0; font-size: 14px; }
.news-row .news-meta { margin-bottom: 0; }
.empty-tip { text-align: center; color: var(--text-mute); padding: 60px 0; }

/* ========== 新闻详情 ========== */

.article {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.article h1 { font-size: 30px; margin: 0 0 12px; }
.article .meta { color: var(--text-mute); font-size: 14px; margin-bottom: 28px; }
.article .content { font-size: 16px; color: var(--text-soft); line-height: 1.85; }
.article .content img { border-radius: 8px; margin: 16px 0; }
.article .content h2 { margin-top: 32px; }
.article .content h3 { margin-top: 24px; }
.article .back { display: inline-block; margin-top: 32px; font-size: 14px; }

/* ========== 联系我们 ========== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 980px;
  margin: 0 auto;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-card h3 { margin: 0 0 20px; font-size: 20px; }
.contact-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.contact-row .label { color: var(--text-mute); width: 80px; flex-shrink: 0; font-size: 14px; }
.contact-row .value { color: var(--text); font-size: 15px; word-break: break-all; }
.contact-qrcode { text-align: center; margin-top: 16px; }
.contact-qrcode img { width: 160px; height: 160px; margin: 0 auto; border: 1px solid var(--border); padding: 6px; border-radius: 8px; }
.map-frame iframe { width: 100%; height: 320px; border: 0; border-radius: 8px; }

/* ========== Footer ========== */

.footer {
  background: #1f2937;
  color: #9ca3af;
  padding: 32px 0 24px;
  font-size: 14px;
  text-align: center;
}
.footer a { color: #c4b5fd; }
.footer .links { margin-bottom: 12px; }
.footer .links a { margin: 0 12px; }

/* ========== 响应式 ========== */

@media (max-width: 768px) {
  .nav-menu { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 14px; margin-bottom: 32px; }
  .container { padding: 0 16px; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .news-row { flex-direction: column; }
  .news-row .news-cover { width: 100%; aspect-ratio: 16 / 9; }
  .article { padding: 24px 20px; }
  .article h1 { font-size: 22px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 28px; }
  .hero-cta { padding: 12px 24px; font-size: 14px; }
}

/* ===== 小程序扫码引导弹窗 ===== */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qr-modal.open { display: flex; }
.qr-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 36px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  animation: qr-pop 0.2s ease-out;
}
@keyframes qr-pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.qr-dialog h3 { margin: 0 0 8px; font-size: 20px; }
.qr-dialog .qr-tip { margin: 0 0 20px; font-size: 14px; color: var(--text-soft); }
.qr-dialog .qr-img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
}
.qr-dialog .qr-foot { margin: 0; font-size: 12px; color: var(--text-soft); letter-spacing: 1px; }
.qr-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.qr-close:hover { color: #475569; }
