/* 每日大赛官网 - 全局样式表 */

:root {
  --primary-color: #FF6B35;
  --secondary-color: #004E89;
  --accent-color: #1B998B;
  --light-bg: #F5F5F5;
  --white: #FFFFFF;
  --dark-text: #333333;
  --gray-text: #666666;
  --border-color: #E0E0E0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--dark-text);
  background-color: var(--white);
  line-height: 1.6;
}

/* ==================== 通用样式 ==================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--dark-text);
}

.section-title span {
  color: var(--primary-color);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-text);
  text-align: center;
  margin-bottom: 30px;
}

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

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

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
}

nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  color: var(--dark-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--primary-color);
}

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

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

.search-container {
  position: relative;
  width: 200px;
}

.search-box {
  width: 100%;
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-box:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.2);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-text);
  cursor: pointer;
}

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

.hero {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310519663517335165/DefbqffgXE5HK6RK7PeYUT/hero-banner-rga9fkp-jiK8EgHVdV7wbNb7EsEGDB.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  font-size: 1rem;
}

.cta-button:hover {
  background-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 107, 53, 0.3);
}

.cta-button.secondary {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
  margin-left: 15px;
}

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

/* ==================== 功能模块 ==================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--dark-text);
}

.feature-card p {
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.video-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background-color: var(--light-bg);
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(255, 107, 53, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

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

.video-card:hover .video-play-button {
  opacity: 1;
}

.video-info {
  padding: 20px;
}

.video-category {
  display: inline-block;
  background-color: var(--light-bg);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--dark-text);
  line-height: 1.4;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-text);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.video-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ==================== 更新日志 ==================== */

.updates-timeline {
  position: relative;
  padding: 20px 0;
}

.updates-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}

.update-item {
  margin-bottom: 40px;
  position: relative;
}

.update-item:nth-child(odd) .update-content {
  margin-left: 0;
  margin-right: auto;
  width: calc(50% - 30px);
  text-align: right;
}

.update-item:nth-child(even) .update-content {
  margin-left: auto;
  margin-right: 0;
  width: calc(50% - 30px);
}

.update-dot {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--primary-color);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--primary-color);
  z-index: 2;
}

.update-content {
  background-color: var(--light-bg);
  padding: 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.update-content:hover {
  box-shadow: var(--shadow);
}

.update-date {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 5px;
}

.update-version {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 10px;
}

.update-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.update-description {
  font-size: 0.95rem;
  color: var(--gray-text);
  margin-bottom: 10px;
}

.update-features {
  list-style: none;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.update-features li {
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}

.update-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
}

/* ==================== FAQ ==================== */

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

.faq-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.faq-question {
  padding: 20px;
  background-color: var(--light-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--dark-text);
  user-select: none;
  transition: all 0.3s ease;
}

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

.faq-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: 700;
  transition: transform 0.3s ease;
}

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

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

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

.faq-answer p {
  color: var(--gray-text);
  line-height: 1.7;
}

/* ==================== 用户评价 ==================== */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.review-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.review-stars {
  color: #FFB800;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.review-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.review-content {
  color: var(--gray-text);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.6;
}

.review-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.review-author-name {
  font-weight: 600;
  color: var(--dark-text);
}

.review-verified {
  background-color: #E8F5E9;
  color: #2E7D32;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.review-date {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-top: 10px;
}

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

footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--white);
}

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

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

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-contact {
  margin-bottom: 20px;
}

.footer-contact p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.footer-bottom p {
  font-size: 0.9rem;
  opacity: 0.9;
}

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

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  nav {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    order: 3;
  }

  .search-container {
    width: 100%;
    order: 2;
  }

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

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

  .cta-button.secondary {
    display: block;
    margin-left: 0;
    margin-top: 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .updates-timeline::before {
    left: 15px;
  }

  .update-item:nth-child(odd) .update-content,
  .update-item:nth-child(even) .update-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
    margin-right: 0 !important;
    text-align: left !important;
  }

  .update-dot {
    left: 15px;
  }

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

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

  .section-title {
    font-size: 1.5rem;
  }

  .features-grid,
  .video-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .video-card,
  .review-card {
    padding: 20px;
  }

  nav a {
    gap: 15px;
  }

  .search-container {
    width: 100%;
  }
}

/* ==================== 动画效果 ==================== */

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

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

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-in;
}

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

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

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

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

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

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

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

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

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

.hidden {
  display: none;
}

.visible {
  display: block;
}
