/* ===== 主页专属样式 ===== */
.page-home {
  --hero-min-height: 90vh;
  --hero-content-gap: 2rem;
  --rolling-bar-height: 3rem;
  --data-card-size: 200px;
  --feature-card-min-height: 380px;
}

.page-home .hero {
  position: relative;
  min-height: var(--hero-min-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--background);
}

.page-home .hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-home .hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: brightness(0.6) saturate(1.2);
}

.page-home .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.85) 0%, rgba(27,94,32,0.5) 100%);
  z-index: 1;
}

.page-home .hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap) 0;
}

.page-home .hero-masthead {
  max-width: 700px;
}

.page-home .hero-title {
  font-family: var(--font-headings);
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 1.1;
  color: var(--secondary);
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.page-home .hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.page-home .hero-highlights {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-home .hero-cta {
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.3s;
  animation: heroPulse 2s infinite ease-in-out;
}

.page-home .hero-cta:hover,
.page-home .hero-cta:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,87,34,0.5);
}

@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,87,34,0.3); }
  50% { box-shadow: 0 0 12px 4px rgba(255,87,34,0.2); }
}

/* 战绩滚动条 */
.page-home .hero-rolling-bar {
  overflow: hidden;
  background: var(--surface-light);
  border-radius: var(--radius);
  height: var(--rolling-bar-height);
  line-height: var(--rolling-bar-height);
  cursor: pointer;
  transition: background 0.3s;
}

.page-home .hero-rolling-bar:hover,
.page-home .hero-rolling-bar:focus {
  background: var(--surface);
}

.page-home .rolling-track {
  display: flex;
  width: max-content;
  animation: roll 20s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.page-home .hero-rolling-bar[data-scroll-stop="paused"] .rolling-track {
  animation-play-state: paused;
}

@keyframes roll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.page-home .rolling-item {
  display: inline-block;
  padding: 0 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  border-right: 1px solid var(--divider);
}

/* 实时数据墙 */
.page-home .data-wall {
  padding: var(--gap) 0;
}

.page-home .data-wall-header {
  text-align: center;
  margin-bottom: var(--gap);
}

.page-home .section-heading {
  font-family: var(--font-headings);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--secondary);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.page-home .section-desc {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.page-home .data-wall-grid {
  display: grid;
  gap: var(--gap);
}

.page-home .data-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  transition: transform 0.3s var(--transition), box-shadow 0.3s;
}

.page-home .data-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border-color: var(--accent);
}

.page-home .data-card-visual {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.page-home .ring-chart {
  width: 100%;
  height: 100%;
}

.page-home .data-card-value {
  position: absolute;
  font-family: var(--font-data);
  font-size: 2rem;
  color: var(--accent);
  font-weight: bold;
}

.page-home .data-card-bigscore {
  font-family: var(--font-data);
  font-size: 2.2rem;
  color: var(--secondary);
  font-weight: bold;
  letter-spacing: 0.1em;
}

.page-home .data-card-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.page-home .data-card-detail {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 功能索引 */
.page-home .feature-index {
  padding: var(--gap) 0 3rem;
}

.page-home .feature-index-header {
  text-align: center;
  margin-bottom: var(--gap);
}

.page-home .feature-index-grid {
  display: grid;
  gap: var(--gap);
}

.page-home .feature-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--transition), box-shadow 0.3s;
}

.page-home .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.page-home .feature-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-home .feature-card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-home .feature-card-body.no-image {
  padding-top: 2rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.page-home .feature-card-title {
  font-family: var(--font-headings);
  font-size: 1.3rem;
  color: var(--secondary);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.page-home .feature-card-desc {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 1rem;
  flex: 1;
}

.page-home .feature-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.page-home .feature-card:hover .btn {
  animation: scoreboardFlash 0.6s ease-in-out;
}

@keyframes scoreboardFlash {
  0%, 100% { background-color: var(--primary); color: #fff; }
  50% { background-color: var(--accent); color: #fff; box-shadow: 0 0 12px var(--accent-light); }
}

.page-home .feature-index-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: var(--gap);
  flex-wrap: wrap;
}

/* 响应式 */
@media (max-width: 767px) {
  .page-home .hero {
    min-height: 80vh;
  }
  .page-home .hero-title {
    font-size: 2rem;
  }
  .page-home .data-wall-grid.grid-cols-3 {
    grid-template-columns: 1fr;
  }
  .page-home .feature-index-grid {
    grid-template-columns: 1fr;
  }
  .page-home .data-card {
    max-width: 300px;
    margin: 0 auto;
  }
  .page-home .feature-card-img {
    height: 160px;
  }
}

@media (min-width: 768px) {
  .page-home .data-wall-grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-home .feature-index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-home .feature-card:last-child {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .page-home .feature-index-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .page-home .feature-card:last-child {
    grid-column: auto;
    max-width: none;
  }
  .page-home .feature-card-img {
    height: 180px;
  }
}
