/* ============================================
   每日大赛实时数据大屏 - 第23套模板
   视觉风格：深海蓝+数据青 赛事数据大屏
   ============================================ */

:root {
  --primary: #0F3B5F;
  --secondary: #00C2FF;
  --bg: #03111F;
  --card: #0B2239;
  --accent: #F59E0B;
  --text: #E6F7FF;
  --text-muted: #8BAFC4;
  --border: #1A3A54;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(0, 194, 255, 0.15);
  --font-display: "Orbitron", "Courier New", monospace;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --transition: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  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;
}

/* 容器 */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-full {
  width: 100%;
  padding: 0 1.5rem;
}

/* 导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(3, 17, 31, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-brand svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s var(--transition);
}

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

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

/* Hero 数据驾驶舱 */
.hero-dashboard {
  padding: 7rem 0 3rem;
  background: linear-gradient(180deg, var(--bg) 0%, #061829 100%);
  position: relative;
  overflow: hidden;
}

.hero-dashboard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(0, 194, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* 指标卡 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.metric-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.metric-change {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.metric-change.up {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.metric-change.down {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

/* 图表区域 */
.chart-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.chart-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.chart-box-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-box-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 趋势折线图 Canvas */
.trend-canvas {
  width: 100%;
  height: 200px;
  position: relative;
}

.trend-svg {
  width: 100%;
  height: 100%;
}

/* 热度地图 */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: transform 0.2s var(--transition);
}

.heatmap-cell:hover {
  transform: scale(1.08);
}

.heatmap-cell.heat-1 { background: rgba(0, 194, 255, 0.15); }
.heatmap-cell.heat-2 { background: rgba(0, 194, 255, 0.3); }
.heatmap-cell.heat-3 { background: rgba(0, 194, 255, 0.5); }
.heatmap-cell.heat-4 { background: rgba(245, 158, 11, 0.4); }
.heatmap-cell.heat-5 { background: rgba(245, 158, 11, 0.7); }

/* 滚动战报 */
.ticker-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
  max-height: 300px;
}

.ticker-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-list {
  list-style: none;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

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

.ticker-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ticker-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.ticker-badge.submit { background: rgba(0, 194, 255, 0.2); color: var(--secondary); }
.ticker-badge.vote { background: rgba(245, 158, 11, 0.2); color: var(--accent); }
.ticker-badge.rank { background: rgba(16, 185, 129, 0.2); color: #10B981; }

@keyframes ticker-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* 通用卡片 */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 700px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.card-link:hover {
  color: var(--accent);
}

/* 刷新角标 */
.refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 194, 255, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.refresh-badge .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  animation: pulse-dot 1.5s infinite;
}

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

.breadcrumb a {
  color: var(--secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* FAQ */
.faq-list {
  list-style: none;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--secondary);
  transition: transform 0.3s var(--transition);
}

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

.faq-answer {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition), padding 0.4s;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 0.75rem;
}

/* 页脚 */
.site-footer {
  background: #020C17;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

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

.footer-brand {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 内页通用 */
.page-hero {
  padding: 7rem 0 2rem;
  background: linear-gradient(180deg, var(--bg) 0%, #061829 100%);
  text-align: center;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1rem;
  color: var(--text-muted);
}

.page-content {
  padding: 3rem 0;
}

.page-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 1rem;
}

.page-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}

.page-content ul, .page-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: var(--secondary);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

/* 相关链接 */
.related-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-links h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.related-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
}

.related-links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.related-links a:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}

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

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

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

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

.search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.search-results {
  list-style: none;
}

.search-result-item {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.search-result-item:hover {
  border-color: var(--secondary);
}

.search-result-item h3 {
  margin: 0 0 0.25rem;
}

.search-result-item h3 a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.search-result-item h3 a:hover {
  color: var(--secondary);
}

.search-result-item .path {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 0.4rem;
}

.search-result-item .summary {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-result-item .tag {
  display: inline-block;
  margin-top: 0.5rem;
  margin-right: 0.4rem;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 194, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--secondary);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.16s var(--transition), box-shadow 0.3s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--secondary);
  color: #03111F;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 194, 255, 0.4);
}

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

.btn-outline:hover {
  background: rgba(0, 194, 255, 0.1);
}

/* 数字滚动动画 */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-count {
  animation: count-up 0.6s var(--transition) forwards;
}

/* 折线绘制动画 */
@keyframes draw-line {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

.animate-line {
  stroke-dasharray: 1000;
  animation: draw-line 2s var(--transition) forwards;
}

/* 响应式 */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-section {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(3, 17, 31, 0.98);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .metric-value {
    font-size: 1.6rem;
  }
  .chart-section {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .heatmap-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .container {
    padding: 0 1rem;
  }
}

/* 图片响应式 */
img {
  max-width: 100%;
  height: auto;
}

/* 无障碍 */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
