/* ===== 每日大赛奖励兑换与积分商城 - 第21套模板样式 ===== */
:root {
  --primary: #D97706;
  --secondary: #4A2C0A;
  --bg: #FFF7E6;
  --card: #FFFFFF;
  --accent: #10B981;
  --text: #2B1B0A;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
  --primary-light: #F59E0B;
  --primary-dark: #B45309;
  --accent-light: #34D399;
  --border: #E5D5B0;
  --muted: #8B7355;
  --font-title: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

ul, ol {
  list-style: none;
}

/* ===== 布局容器 ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 头部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card);
  border-bottom: 2px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(74,44,10,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

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

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--secondary);
  cursor: pointer;
}

/* ===== 首屏Hero ===== */
.hero-section {
  background: linear-gradient(135deg, var(--secondary) 0%, #6B3A10 50%, var(--primary-dark) 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(217,119,6,0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-content .hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero-content .hero-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

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

.hero-stat .stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-light);
  display: block;
}

.hero-stat .stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(217,119,6,0.4);
}

.hero-cta:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217,119,6,0.5);
}

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

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 100%;
}

/* ===== 积分卡片 ===== */
.points-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.points-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.points-card .points-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.points-card .points-value {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.points-card .points-actions {
  display: flex;
  gap: 12px;
}

.points-card .points-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s;
}

.points-card .points-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ===== 奖品货架 ===== */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.reward-item {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.reward-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.reward-item .reward-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.reward-item .reward-info {
  padding: 20px;
}

.reward-item .reward-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.reward-item .reward-points {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
}

.reward-item .reward-stock {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.reward-item .reward-stock::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== 兑换进度 ===== */
.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 60px;
  right: 60px;
  height: 3px;
  background: var(--border);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.progress-step .step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.progress-step.completed .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.progress-step .step-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

/* ===== 等级成长条 ===== */
.level-bar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.level-progress {
  height: 12px;
  background: #E5E7EB;
  border-radius: 6px;
  overflow: hidden;
  margin: 20px 0;
}

.level-progress .level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 6px;
  transition: width 1s ease;
}

.level-badges {
  display: flex;
  justify-content: space-between;
}

.level-badge {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.level-badge.current {
  color: var(--primary);
  font-weight: 700;
}

.level-badge .badge-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 4px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-badge.current .badge-icon {
  background: var(--primary);
  color: #fff;
}

/* ===== 中奖记录表格 ===== */
.records-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.records-table th {
  background: var(--secondary);
  color: #fff;
  padding: 14px 16px;
  font-size: 0.9rem;
  text-align: left;
}

.records-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.records-table tr:last-child td {
  border-bottom: none;
}

.records-table .status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.completed {
  background: #D1FAE5;
  color: #065F46;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge.processing {
  background: #DBEAFE;
  color: #1E40AF;
}

/* ===== FAQ手风琴 ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

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

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.faq-question:hover {
  background: rgba(217,119,6,0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  padding: 0 24px 18px;
  max-height: 500px;
}

.faq-answer p {
  color: var(--muted);
  line-height: 1.8;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

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

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

.breadcrumb .separator {
  margin: 0 8px;
  color: var(--border);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .footer-logo {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

.footer-col h4 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color 0.3s;
}

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

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

/* ===== 通用卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== 搜索框 ===== */
.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ===== 页面内容区 ===== */
.page-header {
  background: linear-gradient(135deg, var(--secondary), #6B3A10);
  padding: 48px 0;
  color: #fff;
}

.page-header h1 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 1rem;
  opacity: 0.8;
}

.page-content {
  padding: 40px 0;
}

.page-content p {
  margin-bottom: 16px;
  line-height: 1.9;
}

.page-content h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--secondary);
  margin: 32px 0 16px;
  font-weight: 700;
}

.page-content h3 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin: 24px 0 12px;
  font-weight: 600;
}

/* ===== 内链模块 ===== */
.related-links {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 40px;
  border: 1px solid var(--border);
}

.related-links h3 {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 16px;
}

.related-links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-links li a {
  display: block;
  padding: 10px 16px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.related-links li a:hover {
  background: rgba(217,119,6,0.1);
}

/* ===== 动效 ===== */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== 中奖弹窗 ===== */
.reward-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.reward-popup.show {
  display: flex;
}

.popup-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: fadeInUp 0.4s ease;
}

.popup-content .popup-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.popup-content h3 {
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.popup-content p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.popup-close {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* ===== 404页面 ===== */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-page .error-code {
  font-family: var(--font-mono);
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  opacity: 0.3;
}

.error-page h1 {
  font-size: 2rem;
  color: var(--secondary);
  margin: 16px 0;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 32px;
}

/* ===== 响应式断点 ===== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .hero-content .hero-stats {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
    gap: 16px;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

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

  .progress-steps {
    flex-direction: column;
    gap: 24px;
  }

  .progress-steps::before {
    display: none;
  }

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

  .page-header h1 {
    font-size: 1.6rem;
  }

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

  .level-badges {
    flex-wrap: wrap;
    gap: 12px;
  }

  .records-table {
    display: block;
    overflow-x: auto;
  }
}

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

  .points-card .points-value {
    font-size: 2.2rem;
  }

  .section {
    padding: 40px 0;
  }
}
