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

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

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f97316;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* 通用类 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

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

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

/* 头部导航 */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

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

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

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

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

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

.search-box {
  position: relative;
  width: 250px;
}

.search-box input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  background-color: var(--bg-light);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
}

/* Banner */
.banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 100px 0;
  text-align: center;
}

.banner-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
}

.banner-content p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.banner-image {
  margin-top: 40px;
}

.banner-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 14px 40px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.cta-button:hover {
  background-color: #ea580c;
  transform: translateY(-2px);
}

/* 功能模块 */
.features {
  background-color: var(--bg-light);
}

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

.feature-card {
  background-color: var(--bg-white);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

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

.feature-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* 视频卡片 */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #000;
  aspect-ratio: 16 / 9;
}

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

.video-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

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

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

.play-button::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 15px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.video-card:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* 教程模块 */
.tutorials {
  background-color: var(--bg-white);
}

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

.tutorial-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.tutorial-card:hover {
  transform: translateY(-5px);
}

.tutorial-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.tutorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutorial-content {
  padding: 20px;
  background-color: var(--bg-white);
}

.tutorial-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.tutorial-content p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

/* 更新日志 */
.changelog {
  background-color: var(--bg-light);
}

.changelog-item {
  background-color: var(--bg-white);
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
}

.changelog-version {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.changelog-date {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.changelog-changes {
  list-style: none;
}

.changelog-changes li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--text-dark);
}

.changelog-changes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* FAQ */
.faq {
  background-color: var(--bg-white);
}

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

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

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

.faq-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.3s;
}

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

.faq-answer {
  padding: 20px;
  color: var(--text-light);
  display: none;
  background-color: var(--bg-white);
}

.faq-item.active .faq-answer {
  display: block;
}

/* 用户评价 */
.reviews {
  background-color: var(--bg-light);
}

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

.review-card {
  background-color: var(--bg-white);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.review-rating {
  color: #fbbf24;
  font-size: 16px;
  margin-bottom: 12px;
}

.review-text {
  color: var(--text-dark);
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 14px;
}

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

.review-date {
  color: var(--text-light);
  font-size: 12px;
  margin-top: 5px;
}

/* 联系我们 */
.contact {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.contact-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.contact-item p {
  opacity: 0.9;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  background-color: var(--accent-color);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.form-submit:hover {
  background-color: #ea580c;
}

/* 页脚 */
footer {
  background-color: var(--text-dark);
  color: white;
  padding: 40px 0 20px;
  text-align: center;
}

.footer-content {
  margin-bottom: 30px;
}

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

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 20px;
  color: #9ca3af;
  font-size: 14px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .banner-content h1 {
    font-size: 32px;
  }

  .banner-content p {
    font-size: 16px;
  }

  nav ul {
    gap: 15px;
  }

  .search-box {
    width: 150px;
  }

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

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 24px;
  }

  .footer-links {
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .banner-content h1 {
    font-size: 24px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .search-box {
    width: 100%;
  }

  .header-container {
    flex-direction: column;
    gap: 15px;
  }
}
