/* ===== 每日大赛冠军榜与荣誉殿堂 - 全局样式 ===== */
:root {
  --primary: #5B21B6;
  --secondary: #F6D365;
  --bg: #170A2E;
  --card: #24113F;
  --accent: #FDE68A;
  --text: #FFF7ED;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
  --gold: #F6D365;
  --gold-light: #FDE68A;
  --purple-light: #7C3AED;
  --purple-dark: #3B0764;
  --font-title: "Noto Serif SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --max-width: 1200px;
  --header-height: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1em;
  line-height: 1.8;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--gold);
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: rgba(255,247,237,0.7);
  margin-top: 10px;
  font-size: 1rem;
}

/* ===== 头部导航 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(23,10,46,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(91,33,182,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

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

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

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

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

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero区域 ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(91,33,182,0.3) 0%, var(--bg) 70%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(246,211,101,0.05) 60deg, transparent 120deg);
  animation: heroRotate 20s linear infinite;
}

@keyframes heroRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-trophy {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  animation: trophyGlow 3s ease-in-out infinite;
}

@keyframes trophyGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(246,211,101,0.5)); }
  50% { filter: drop-shadow(0 0 40px rgba(246,211,101,0.8)); }
}

.hero h1 {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(246,211,101,0.3);
}

.hero .subtitle {
  font-size: 1.2rem;
  color: rgba(255,247,237,0.85);
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

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

.hero-stat .number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 700;
}

.hero-stat .label {
  font-size: 0.9rem;
  color: rgba(255,247,237,0.6);
  margin-top: 4px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--purple-light));
  color: var(--text);
  box-shadow: 0 4px 15px rgba(91,33,182,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(91,33,182,0.6);
  color: var(--text);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--secondary), var(--gold-light));
  color: var(--bg);
  box-shadow: 0 4px 15px rgba(246,211,101,0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(246,211,101,0.6);
  color: var(--bg);
  text-decoration: none;
}

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

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

/* ===== 卡片系统 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid rgba(91,33,182,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow), 0 0 30px rgba(91,33,182,0.2);
  border-color: rgba(246,211,101,0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

/* ===== 冠军卡片 ===== */
.champion-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid rgba(246,211,101,0.2);
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
}

.champion-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(246,211,101,0.15);
  transform: translateY(-8px) scale(1.02);
}

.champion-card .crown {
  font-size: 2rem;
  margin-bottom: 10px;
}

.champion-card .date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.champion-card .name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.champion-card .work {
  font-size: 0.9rem;
  color: rgba(255,247,237,0.7);
}

/* ===== 冠军墙网格 ===== */
.champion-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ===== 徽章系统 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-gold {
  background: linear-gradient(135deg, rgba(246,211,101,0.2), rgba(253,232,138,0.1));
  color: var(--gold);
  border: 1px solid rgba(246,211,101,0.3);
}

.badge-purple {
  background: linear-gradient(135deg, rgba(91,33,182,0.3), rgba(124,58,237,0.1));
  color: var(--purple-light);
  border: 1px solid rgba(91,33,182,0.3);
}

.badge-silver {
  background: linear-gradient(135deg, rgba(192,192,192,0.2), rgba(220,220,220,0.1));
  color: #C0C0C0;
  border: 1px solid rgba(192,192,192,0.3);
}

/* ===== 榜单轮播 ===== */
.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.leaderboard-tab {
  padding: 10px 24px;
  border-radius: 30px;
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(91,33,182,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.leaderboard-tab.active,
.leaderboard-tab:hover {
  background: linear-gradient(135deg, var(--primary), var(--purple-light));
  border-color: var(--gold);
  color: var(--gold);
}

.leaderboard-content {
  display: none;
}

.leaderboard-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

/* ===== 榜单列表 ===== */
.rank-list {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(91,33,182,0.15);
  transition: background 0.3s ease;
}

.rank-item:hover {
  background: rgba(91,33,182,0.1);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-number {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  width: 50px;
  text-align: center;
}

.rank-number.top-1 { color: #FFD700; }
.rank-number.top-2 { color: #C0C0C0; }
.rank-number.top-3 { color: #CD7F32; }

.rank-info {
  flex: 1;
  margin-left: 16px;
}

.rank-name {
  font-weight: 600;
  font-size: 1rem;
}

.rank-work {
  font-size: 0.85rem;
  color: rgba(255,247,237,0.6);
  margin-top: 2px;
}

.rank-score {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
}

/* ===== 获奖感言 ===== */
.testimonial {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  border-left: 4px solid var(--gold);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-size: 4rem;
  color: rgba(246,211,101,0.2);
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: serif;
}

.testimonial-text {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 30px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 30px;
}

.testimonial-author .name {
  font-weight: 600;
  color: var(--gold);
}

.testimonial-author .title {
  font-size: 0.85rem;
  color: rgba(255,247,237,0.6);
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid rgba(91,33,182,0.2);
  overflow: hidden;
}

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

.faq-question:hover {
  background: rgba(91,33,182,0.1);
}

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

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

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

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

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  margin-top: var(--header-height);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.breadcrumb-list li::after {
  content: '/';
  margin-left: 8px;
  color: rgba(255,247,237,0.4);
}

.breadcrumb-list li:last-child::after {
  display: none;
}

.breadcrumb-list li:last-child a {
  color: var(--gold);
}

/* ===== 页脚 ===== */
.footer {
  background: rgba(23,10,46,0.95);
  border-top: 1px solid rgba(91,33,182,0.3);
  padding: 60px 0 30px;
}

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

.footer-brand .logo {
  margin-bottom: 16px;
}

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

.footer-col h4 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,247,237,0.7);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(91,33,182,0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,247,237,0.5);
}

/* ===== 页面内容区 ===== */
.page-header {
  padding: 60px 0 40px;
  margin-top: var(--header-height);
  background: radial-gradient(ellipse at top, rgba(91,33,182,0.2) 0%, transparent 60%);
  text-align: center;
}

.page-header h1 {
  color: var(--gold);
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.page-header .desc {
  color: rgba(255,247,237,0.7);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

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

/* ===== 网格布局 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--primary));
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg);
}

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

.search-input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 60px;
  border-radius: 30px;
  border: 2px solid rgba(91,33,182,0.3);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

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

.search-input::placeholder {
  color: rgba(255,247,237,0.4);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple-light));
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-results {
  margin-top: 20px;
}

.search-result-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid rgba(91,33,182,0.2);
}

.search-result-item h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.search-result-item p {
  font-size: 0.9rem;
  color: rgba(255,247,237,0.7);
  margin-bottom: 8px;
}

.search-result-item .path {
  font-size: 0.8rem;
  color: var(--purple-light);
}

/* ===== 动画 ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(246,211,101,0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes badgeLight {
  0%, 100% { box-shadow: 0 0 5px rgba(246,211,101,0.3); }
  50% { box-shadow: 0 0 20px rgba(246,211,101,0.6); }
}

.badge-glow {
  animation: badgeLight 2s ease-in-out infinite;
}

/* ===== 404页面 ===== */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page h1 {
  font-size: 8rem;
  color: var(--gold);
  opacity: 0.3;
}

.error-page h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

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

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(23,10,46,0.98);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid rgba(91,33,182,0.3);
  }

  .nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .champion-wall {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .leaderboard-tabs {
    flex-wrap: wrap;
  }

  .section {
    padding: 50px 0;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 20px;
  }

  .page-header {
    padding: 40px 0 30px;
  }

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

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-trophy { width: 80px; height: 80px; }
  .hero-stat .number { font-size: 1.8rem; }
  .champion-wall { grid-template-columns: 1fr 1fr; gap: 12px; }
  .champion-card { padding: 16px; }
}
