/* ==========================================
   VIGOO银发猜谜馆 - 首页特有样式表 (index.css)
   ========================================== */

/* 主视觉横幅区 (Hero Section) */
.hero {
  background-color: var(--bg-secondary);
  padding: 60px 0 90px 0;
  border-bottom: 3px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-accent-light) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  flex: 1.2;
  max-width: 680px;
}

.hero-tag {
  display: inline-block;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-title span {
  color: var(--color-primary);
  position: relative;
  display: inline-block;
}

.hero-title span::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(30, 64, 175, 0.15);
  z-index: -1;
}

.hero-desc {
  font-size: 21px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-image-box {
  flex: 0.8;
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 36px;
  border: 10px solid #ffffff;
  box-shadow: var(--shadow-md);
  transform: rotate(2deg);
  transition: transform 0.5s ease;
}

.hero-img:hover {
  transform: rotate(0deg) scale(1.03);
}

/* 趣味分类区块 */
.section-header {
  text-align: center;
  margin: 70px 0 45px 0;
}

.section-title {
  font-size: 38px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: bold;
}

.category-section {
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.category-bg-card {
  background-color: var(--bg-secondary);
  border-radius: 40px;
  padding: 48px;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  border-radius: 30px;
  padding: 36px 16px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  border-width: 3px;
  border-style: solid;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-sm);
}

.category-icon-box {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon-box {
  transform: scale(1.1) rotate(-5deg);
}

/* 趣味分类卡片色彩方案 */
.cat-red {
  background-color: #fef2f2;
  border-color: #fee2e2;
  color: #dc2626;
}
.cat-blue {
  background-color: #eff6ff;
  border-color: #dbeafe;
  color: #2563eb;
}
.cat-gold {
  background-color: #fef9c3;
  border-color: #fef08a;
  color: #854d0e;
}
.cat-purple {
  background-color: #faf5ff;
  border-color: #f3e8ff;
  color: #7c3aed;
}

body.dark-theme .cat-red {
  background-color: #2a1212;
  border-color: #7f1d1d;
  color: #fecaca;
}
body.dark-theme .cat-blue {
  background-color: #111a2e;
  border-color: #1e3a8a;
  color: #bfdbfe;
}
body.dark-theme .cat-gold {
  background-color: #251e10;
  border-color: #713f12;
  color: #fef08a;
}
body.dark-theme .cat-purple {
  background-color: #1d1135;
  border-color: #581c87;
  color: #e9d5ff;
}

body.dark-theme .category-icon-box {
  background-color: #1e293b;
}

body.dark-theme .hero-img {
  border-color: var(--bg-secondary);
}

.category-card h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 0 10px 0;
}

.category-card p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
}

/* 每日脑力挑战模块 - 修正居中对齐 */
.daily-challenge {
  margin: 80px auto; /* 核心修正：外边距上下80px，左右auto实现PC端在main中的完美居中，与其他模块保持一致 */
}

.challenge-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 44px;
  padding: 56px;
  color: #ffffff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 56px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.challenge-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.challenge-left {
  flex: 1.2;
  max-width: 580px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.challenge-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.challenge-title {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1.25;
}

.challenge-desc {
  font-size: 20px;
  color: #e0f2fe;
  margin-bottom: 30px;
  line-height: 1.7;
}

.challenge-btn {
  background-color: var(--color-warning) !important;
  color: #ffffff !important;
  border: 3px solid #ffffff !important;
  box-shadow: 0 10px 25px rgba(202, 138, 4, 0.4) !important;
  font-weight: 900;
}

.challenge-btn:hover {
  background-color: #ca8a04 !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(202, 138, 4, 0.55) !important;
}

.challenge-right {
  flex: 0.8;
  max-width: 460px;
  z-index: 2;
  display: flex;
  justify-content: center;
}

/* 互动谜题卡片 */
.interactive-puzzle {
  background-color: #ffffff;
  border-radius: 32px;
  padding: 32px;
  color: var(--text-main);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--color-border);
  position: relative;
  text-align: left;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

body.dark-theme .interactive-puzzle {
  background-color: var(--bg-secondary);
  border-color: var(--color-border);
}

.puzzle-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--color-accent);
  margin-bottom: 16px;
  background-color: var(--color-accent-light);
  padding: 6px 14px;
  border-radius: 12px;
  width: fit-content;
}

.puzzle-question {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--text-main);
}

.puzzle-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.puzzle-opt-btn {
  width: 100%;
  text-align: left;
  background-color: #f8fafc;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 19px;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-theme .puzzle-opt-btn {
  background-color: #0f172a;
  border-color: var(--color-border);
  color: var(--text-main);
}

.puzzle-opt-btn:hover {
  background-color: var(--color-accent-light);
  border-color: var(--color-accent);
}

.puzzle-feedback {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

.puzzle-feedback.success {
  background-color: #ecfdf5;
  color: #047857;
  border: 2px solid #a7f3d0;
}

body.dark-theme .puzzle-feedback.success {
  background-color: #064e3b;
  color: #ecfdf5;
  border-color: #10b981;
}

.puzzle-feedback.error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 2px solid #fecaca;
}

body.dark-theme .puzzle-feedback.error {
  background-color: #7f1d1d;
  color: #fef2f2;
  border-color: #f87171;
}

/* 推荐测试/猜谜网格系统 */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.quiz-card {
  background-color: var(--bg-secondary);
  border-radius: 36px;
  overflow: hidden;
  text-decoration: none;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quiz-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.quiz-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.quiz-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.quiz-card:hover .quiz-img {
  transform: scale(1.06);
}

.quiz-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.quiz-card-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 24px;
  flex-grow: 1;
}

.quiz-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary);
  border-top: 2px dashed var(--color-border);
  padding-top: 18px;
  transition: color 0.2s ease;
}

.quiz-card:hover .quiz-action {
  color: var(--color-accent);
}

/* 深度健脑知识库区块 */
.seo-section {
  margin-top: 80px;
  margin-bottom: 80px;
  background-color: var(--bg-secondary);
  border-radius: 40px;
  padding: 56px;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.seo-item {
  display: flex;
  flex-direction: column;
}

.seo-item h4 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.seo-item h4 .icon-ph {
  color: var(--color-primary);
  display: inline-flex;
}

.seo-item p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}

.seo-divider {
  border: 0;
  border-top: 2px solid var(--color-border);
  margin: 40px 0;
}

.seo-long-text p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.seo-long-text p:last-child {
  margin-bottom: 0;
}

/* 经典养生金句区块 - 修正居中对齐 */
.quote-section {
  background-color: var(--color-accent-light);
  border: 3px solid var(--color-border);
  border-radius: 44px;
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 auto 80px auto; /* 核心修正：大屏时始终保持 0 auto 80px auto，利用 container 的 max-width 在页面完美居中 */
  box-shadow: var(--shadow-sm);
}

.quote-badge {
  display: inline-block;
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary);
  background-color: #ffffff;
  padding: 6px 18px;
  border-radius: 30px;
  border: 2px solid var(--color-border);
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.05);
}

.quote-text {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.45;
}

.quote-author {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-muted);
}

/* 响应式样式适配 */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quiz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  main .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .category-section {
    margin-top: 20px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .category-bg-card {
    padding: 24px 15px !important;
    border-radius: 24px !important;
  }

  .category-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .hero-wrapper {
    flex-direction: column-reverse;
    text-align: center;
    gap: 36px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-desc {
    font-size: 19px;
  }

  /* 每日一猜在移动端的排版 */
  .challenge-banner {
    flex-direction: column !important;
    padding: 36px 15px !important;
    text-align: center !important;
    gap: 32px !important;
  }

  .challenge-left {
    align-items: center !important;
    text-align: center !important;
  }

  .challenge-desc {
    text-align: center !important;
  }

  .challenge-right {
    width: 100% !important;
    max-width: 100% !important;
  }

  .interactive-puzzle {
    max-width: 100% !important;
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .seo-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .seo-section {
    padding: 32px 15px !important;
  }

  /* 移动端覆盖：将 margin 设为 0 以防由于宽度小溢出或过长拉伸，限制于 768px 以下 */
  .quote-section {
    padding: 36px 15px !important;
    border-radius: 24px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .quote-text {
    font-size: 24px !important;
  }
}

/* 健脑/生活/旅行/常识底部的富文本建议卡片 */
.aside-tips {
  background-color: var(--bg-secondary);
  border: 3px solid var(--color-border);
  border-radius: 36px;
  padding: 36px;
  margin-top: 50px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.aside-tips h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px dashed var(--color-border);
  padding-bottom: 12px;
}

.aside-tips p {
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 20px;
}

.tips-rich-content {
  margin-top: 24px;
  background-color: var(--color-accent-light);
  border: 2px solid var(--color-border);
  border-radius: 24px;
  padding: 24px 28px;
}

body.dark-theme .tips-rich-content {
  background-color: #1e1b4b;
  border-color: var(--color-border);
}

.tips-rich-content h4 {
  font-size: 21px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 14px;
  margin-top: 10px;
}

.tips-rich-content p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tips-rich-content ul,
.tips-rich-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tips-rich-content ul li,
.tips-rich-content ol li {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-main);
}

.tips-rich-content ul li strong,
.tips-rich-content ol li strong {
  color: var(--color-primary);
  font-weight: bold;
}
