/* ============================================
   玩物社区 - 主样式文件
   品牌色：橙红渐变 (#FF6B35 - #FF3D00)
   ============================================ */

/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #FF6B35;
  --secondary-color: #FF3D00;
  --accent-color: #FFB347;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* ==================== 排版 ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text-dark);
}

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

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

h3 {
  font-size: 1.8rem;
}

h4 {
  font-size: 1.4rem;
}

h5 {
  font-size: 1.2rem;
}

h6 {
  font-size: 1rem;
}

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

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

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

/* ==================== 容器 ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding: 0 20px;
}

/* ==================== Header 导航 ==================== */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo span {
  background: linear-gradient(135deg, #FFB347, #FFE5B4);
  -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: white;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 8px 15px;
  gap: 10px;
  transition: var(--transition);
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-box input {
  background: none;
  border: none;
  color: white;
  outline: none;
  width: 150px;
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-box button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ==================== Hero Banner ==================== */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="dots" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="1200" height="600" fill="url(%23dots)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo {
  height: 80px;
  margin-bottom: 20px;
  animation: slideDown 0.8s ease-out;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  animation: slideUp 0.8s ease-out 0.2s both;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  animation: slideUp 0.8s ease-out 0.4s both;
}

.hero-image {
  width: 100%;
  max-width: 600px;
  margin-top: 30px;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.8s ease-out 0.6s both;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

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

.btn-secondary:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
  text-decoration: none;
}

/* ==================== 分区块 ==================== */
section {
  padding: 60px 20px;
}

section.bg-light {
  background-color: var(--bg-light);
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 20px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* ==================== 视频卡片 ==================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.video-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  aspect-ratio: 9/16;
}

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

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover img {
  transform: scale(1.05);
}

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

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

.play-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.8);
  transition: var(--transition);
}

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

.video-card-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
  font-size: 0.85rem;
}

.video-card-stats div {
  margin-bottom: 5px;
}

/* ==================== 内容模块 ==================== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.content-grid.reverse {
  direction: rtl;
}

.content-grid.reverse > * {
  direction: ltr;
}

.content-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.content-text h3 {
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-text p {
  margin-bottom: 15px;
  line-height: 1.8;
}

/* ==================== 专家卡片 ==================== */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.expert-card {
  text-align: center;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.expert-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.expert-card h4 {
  margin-bottom: 5px;
  color: var(--text-dark);
}

.expert-card .title {
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.expert-card p {
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.expert-card .btn {
  font-size: 0.85rem;
  padding: 8px 20px;
  margin: 5px;
}

/* ==================== FAQ ==================== */
.faq-item {
  background: white;
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  transition: var(--transition);
}

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

.faq-answer {
  color: var(--text-light);
  line-height: 1.8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

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

/* ==================== 用户评价 ==================== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.review-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.review-info h4 {
  margin-bottom: 3px;
  font-size: 1rem;
}

.review-info .rating {
  color: #FFB347;
  font-size: 0.9rem;
}

.review-text {
  color: var(--text-light);
  line-height: 1.6;
  font-style: italic;
}

/* ==================== Footer ==================== */
footer {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
  margin-bottom: 15px;
  color: var(--accent-color);
}

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

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-qrcode {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

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

.qrcode-item img {
  width: 120px;
  height: 120px;
  background: white;
  padding: 10px;
  border-radius: 8px;
}

.qrcode-item p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin-bottom: 5px;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--text-light);
}

/* ==================== 动画 ==================== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  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);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  nav ul {
    gap: 1rem;
  }

  .search-box input {
    width: 100px;
  }

  .hero {
    padding: 40px 20px;
  }

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

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

  .content-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .content-grid.reverse {
    direction: ltr;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .expert-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

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

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

  section {
    padding: 40px 20px;
  }
}

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

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

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

  .search-box {
    padding: 6px 10px;
  }

  .search-box input {
    width: 80px;
    font-size: 0.8rem;
  }

  .hero {
    padding: 30px 15px;
  }

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

  .hero p {
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-qrcode {
    flex-direction: column;
    gap: 15px;
  }

  .qrcode-item img {
    width: 100px;
    height: 100px;
  }

  section {
    padding: 30px 15px;
  }
}

/* ==================== 工具类 ==================== */
.text-center {
  text-align: center;
}

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

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

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-40 {
  margin-bottom: 40px;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}
