/* ============================================
   亲子童趣 - 原创主题CSS
   设计主题：甜蜜视界·社区共鸣
   颜色方案：玫瑰金、深灰、奶油白
   ============================================ */

:root {
  --primary-color: #D4A574;
  --dark-color: #2C2C2C;
  --bg-color: #FFFBF7;
  --accent-color: #FF6B6B;
  --light-gray: #F5F1ED;
  --border-color: #E8E0D8;
  --text-color: #3A3A3A;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Han Sans CN', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

/* ============================================
   排版系统
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ============================================
   通用组件
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  background-color: var(--dark-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: scale(0.97);
}

.btn-secondary {
  background-color: var(--light-gray);
  color: var(--dark-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.card {
  background-color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ============================================
   头部导航
   ============================================ */

header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
}

.logo img {
  height: 40px;
  width: auto;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 150px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.search-box input::placeholder {
  color: #999;
}

.search-box button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .search-box {
    display: none;
  }
}

/* ============================================
   Hero 区域
   ============================================ */

.hero {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), rgba(255, 107, 107, 0.05)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23D4A574" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="1200" height="600" fill="%23FFFBF7"/><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
  background-size: cover;
  background-position: center;
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(212, 165, 116, 0.1), transparent),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.05), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }
}

/* ============================================
   视频卡片
   ============================================ */

.video-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--light-gray);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  group: 'video';
}

.video-card video,
.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-card:hover .video-card-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.play-button {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
}

.video-card:hover .play-button {
  opacity: 1;
  transform: scale(1);
}

.play-button::after {
  content: '▶';
  color: white;
  font-size: 1.5rem;
  margin-left: 4px;
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 1.5rem 1rem 1rem;
  color: white;
  opacity: 0;
  transition: var(--transition);
}

.video-card:hover .video-info {
  opacity: 1;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================
   内容网格
   ============================================ */

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.content-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-item-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
}

.content-item-desc {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   模块区域
   ============================================ */

.section {
  padding: 4rem 2rem;
  margin: 2rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.section-desc {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* 影视传媒模块 */
.media-module {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.05), rgba(255, 107, 107, 0.02));
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.media-item {
  text-align: center;
}

.media-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: white;
}

.media-item-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.media-item-desc {
  color: #666;
  font-size: 0.95rem;
}

/* ============================================
   FAQ 区域
   ============================================ */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  background-color: var(--light-gray);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--dark-color);
  transition: var(--transition);
}

.faq-question:hover {
  background-color: #f0e8e0;
}

.faq-toggle {
  font-size: 1.5rem;
  transition: var(--transition);
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: white;
}

.faq-item.active .faq-answer {
  padding: 1.5rem;
  max-height: 500px;
}

.faq-answer p {
  color: #666;
  margin: 0;
}

/* ============================================
   评论区域
   ============================================ */

.reviews-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.review-card {
  background-color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.review-meta {
  flex: 1;
}

.review-name {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.25rem;
}

.review-time {
  font-size: 0.85rem;
  color: #999;
}

.review-rating {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.review-text {
  color: #666;
  line-height: 1.6;
}

/* ============================================
   专家展示
   ============================================ */

.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.expert-card {
  text-align: center;
  background-color: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.expert-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.expert-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.expert-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.expert-title {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.expert-desc {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.expert-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.expert-actions a {
  flex: 1;
  padding: 0.5rem;
  background-color: var(--light-gray);
  color: var(--dark-color);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.expert-actions a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ============================================
   页脚
   ============================================ */

footer {
  background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-qr {
  text-align: center;
}

.footer-qr-code {
  width: 120px;
  height: 120px;
  background-color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 0.8rem;
  color: #999;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #999;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

/* ============================================
   动画
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .reviews-container {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  nav ul {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .hero .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   工具类
   ============================================ */

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-accent {
  color: var(--accent-color);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid {
  display: grid;
}
