/* ============================================
   page-home – 数据看板首页专属样式
   作用域：.page-home
   移动端优先 + 桌面端增强
   ============================================ */
.page-home {
  --frame-accent: var(--color-accent);
  --frame-primary: var(--color-primary);
  --frame-bg: var(--color-bg);
  --frame-text: var(--color-text);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--color-bg);
}

/* ---------- 框景首屏 ---------- */
.page-home .hero-frame {
  position: relative;
  padding: 1.5rem 1rem 2rem;
  background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg) 40%);
  overflow: hidden;
}

.page-home .hero-frame__context {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.page-home .hero-frame__context .capsule-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.page-home .hero-frame__box {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

/* 顶部刻度条 */
.page-home .hero-frame__scale-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    var(--frame-primary) 0px,
    var(--frame-primary) 3px,
    transparent 3px,
    transparent 14px
  );
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  z-index: 2;
}

/* 左侧刻度条 */
.page-home .hero-frame__scale-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    var(--frame-primary) 0px,
    var(--frame-primary) 3px,
    transparent 3px,
    transparent 14px
  );
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  z-index: 2;
}

/* 角落装饰块 */
.page-home .hero-frame__corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background-color: var(--frame-accent);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 3;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.10);
}

.page-home .hero-frame__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 1.25rem 1.5rem;
}

.page-home .hero-frame__data {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-home .hero-frame__data .capsule-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
  background-color: var(--color-data-green);
  color: var(--color-white);
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.page-home .hero-frame__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
  word-break: break-word;
}

.page-home .stat-highlight {
  display: inline-block;
  font-size: 2.4rem;
  color: var(--frame-accent);
  background-color: rgba(255, 107, 53, 0.08);
  padding: 0 0.15em;
  border-radius: var(--radius-sm);
  line-height: 1.1;
}

.page-home .hero-frame__desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  letter-spacing: 0.01em;
}

.page-home .hero-frame__season {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.page-home .season-select {
  display: inline-block;
  width: 100%;
  max-width: 220px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 2px solid var(--color-primary-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B4332' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.page-home .season-select:hover,
.page-home .season-select:focus {
  border-color: var(--frame-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  outline: none;
}

.page-home .season-hint {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
}

.page-home .hero-frame__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.page-home .stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-home .stat-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: 400;
}

.page-home .stat-value-sm {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* 框景图片 */
.page-home .hero-frame__visual {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.page-home .hero-frame__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ---------- 快速入口 ---------- */
.page-home .quick-links {
  padding: 2rem 1rem;
  background-color: var(--color-bg);
}

.page-home .quick-links__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-home .quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}

.page-home .quick-link-card:hover,
.page-home .quick-link-card:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  outline: none;
}

.page-home .quick-link-icon {
  color: var(--color-primary);
  width: 32px;
  height: 32px;
  margin-bottom: 0.25rem;
}

.page-home .quick-link-label {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

.page-home .quick-link-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ---------- 赛事前瞻卡片流 ---------- */
.page-home .match-preview {
  padding: 2rem 1rem 3rem;
  background-color: var(--color-bg-dark);
}

.page-home .match-preview__header {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  text-align: center;
}

.page-home .match-preview__header .section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.35rem;
  position: relative;
  display: inline-block;
}

.page-home .match-preview__header .section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.page-home .match-preview__sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0.75rem 0 0;
}

.page-home .note-sample {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  opacity: 0.7;
  font-style: italic;
}

.page-home .match-preview__cards {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 单张卡片 */
.page-home .preview-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--color-white);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.page-home .preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.page-home .preview-card__image {
  overflow: hidden;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  max-height: 240px;
}

.page-home .preview-card__image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.page-home .preview-card:hover .preview-card__image img {
  transform: scale(1.04);
}

.page-home .preview-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1.25rem 1.25rem;
}

.page-home .preview-card__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-home .preview-card__title .capsule-tag {
  font-size: 0.6rem;
  padding: 0.15rem 0.55rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.page-home .preview-card__match {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  align-self: flex-start;
}

.page-home .preview-card__data {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.25rem;
}

.page-home .preview-data-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.page-home .preview-data-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.page-home .preview-data-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

/* 悬停详情面板 */
.page-home .preview-card__hover-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0.8rem;
  background-color: var(--color-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-accent);
  margin-top: 0.25rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.3s ease;
}

.page-home .preview-card:hover .preview-card__hover-detail {
  opacity: 1;
  max-height: 120px;
  padding: 0.6rem 0.8rem;
}

.page-home .hover-detail-item {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text);
  font-weight: 500;
  background-color: var(--color-white);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.page-home .preview-card__btn {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background-color var(--transition), transform var(--transition);
}

.page-home .preview-card__btn:hover,
.page-home .preview-card__btn:focus {
  transform: translateY(-1px);
}

.page-home .preview-card__footnote {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  opacity: 0.6;
  font-style: italic;
  margin-top: 0.1rem;
}

/* ---------- 入口变更提示 ---------- */
.page-home .entry-notice {
  padding: 2.5rem 1rem 3rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
}

.page-home .entry-notice__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.page-home .entry-notice__icon {
  color: var(--color-accent);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.page-home .entry-notice__icon svg {
  width: 100%;
  height: 100%;
}

.page-home .entry-notice__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-white);
}

.page-home .entry-notice__desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.page-home .entry-notice__btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--color-white);
  background-color: transparent;
  color: var(--color-white);
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-block;
  transition: background-color var(--transition), color var(--transition);
}

.page-home .entry-notice__btn:hover,
.page-home .entry-notice__btn:focus {
  background-color: var(--color-white);
  color: var(--color-primary);
  outline: none;
}

/* ============================================
   桌面端增强 (min-width: 768px)
   ============================================ */
@media (min-width: 768px) {
  .page-home .hero-frame {
    padding: 2rem 2rem 3rem;
  }

  .page-home .hero-frame__inner {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2rem 2rem 2.5rem;
  }

  .page-home .hero-frame__data {
    flex: 0 0 42%;
    gap: 0.85rem;
  }

  .page-home .hero-frame__visual {
    flex: 1 1 55%;
    max-width: 55%;
  }

  .page-home .hero-frame__title {
    font-size: 2.6rem;
  }

  .page-home .stat-highlight {
    font-size: 3rem;
  }

  .page-home .hero-frame__stats {
    gap: 1rem 2rem;
  }

  .page-home .quick-links__inner {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }

  .page-home .quick-link-card {
    flex: 0 0 280px;
    padding: 1.5rem 2rem;
  }

  .page-home .match-preview {
    padding: 3rem 2rem 4rem;
  }

  .page-home .match-preview__header .section-title {
    font-size: 2.2rem;
  }

  /* 卡片桌面错位布局 */
  .page-home .preview-card {
    flex-direction: row;
    gap: 0;
    min-height: 280px;
  }

  .page-home .preview-card__image {
    flex: 0 0 42%;
    max-height: none;
    border-radius: var(--card-radius) 0 0 var(--card-radius);
  }

  .page-home .preview-card__image img {
    height: 100%;
    min-height: 300px;
  }

  .page-home .preview-card__content {
    flex: 1;
    padding: 1.5rem 2rem;
    justify-content: center;
  }

  /* 反向卡片（图右文左） */
  .page-home .preview-card--rev {
    flex-direction: row-reverse;
  }

  .page-home .preview-card--rev .preview-card__image {
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
  }

  .page-home .preview-card__title {
    font-size: 1.6rem;
  }

  .page-home .preview-data-value {
    font-size: 1.6rem;
  }

  .page-home .entry-notice {
    padding: 3rem 2rem 3.5rem;
  }

  .page-home .entry-notice__inner {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .page-home .entry-notice__text {
    flex: 1;
  }

  .page-home .entry-notice__title {
    font-size: 1.8rem;
  }

  .page-home .entry-notice__btn {
    flex-shrink: 0;
  }
}

/* ============================================
   大桌面端增强 (min-width: 1024px)
   ============================================ */
@media (min-width: 1024px) {
  .page-home .hero-frame {
    padding: 3rem 2rem 4rem;
  }

  .page-home .hero-frame__inner {
    gap: 3rem;
    padding: 2.5rem 2.5rem 2.5rem 3rem;
  }

  .page-home .hero-frame__title {
    font-size: 3.2rem;
  }

  .page-home .stat-highlight {
    font-size: 3.8rem;
  }

  .page-home .hero-frame__data {
    flex: 0 0 40%;
  }

  .page-home .hero-frame__visual {
    flex: 0 0 55%;
    max-width: 55%;
  }

  .page-home .match-preview__cards {
    gap: 2.5rem;
  }

  .page-home .preview-card__image {
    flex: 0 0 40%;
  }

  .page-home .preview-card__content {
    padding: 2rem 2.5rem;
  }

  .page-home .preview-card__title {
    font-size: 1.8rem;
  }

  .page-home .preview-data-value {
    font-size: 1.8rem;
  }

  .page-home .entry-notice__title {
    font-size: 2rem;
  }
}

/* ============================================
   极小屏安全 (max-width: 374px)
   ============================================ */
@media (max-width: 374px) {
  .page-home .hero-frame__title {
    font-size: 1.5rem;
  }

  .page-home .stat-highlight {
    font-size: 1.8rem;
  }

  .page-home .preview-card__data {
    gap: 0.5rem 1rem;
  }

  .page-home .preview-data-value {
    font-size: 1.1rem;
  }

  .page-home .entry-notice__title {
    font-size: 1.3rem;
  }
}

/* ============================================
   打印样式精简
   ============================================ */
@media print {
  .page-home .hero-frame {
    background: none;
    padding: 1rem;
  }

  .page-home .hero-frame__box {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .page-home .preview-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .page-home .preview-card__hover-detail {
    opacity: 1;
    max-height: none;
  }

  .page-home .entry-notice {
    background: none;
    color: var(--color-text);
    border: 1px solid var(--color-primary);
  }

  .page-home .entry-notice__btn {
    border-color: var(--color-primary);
    color: var(--color-primary);
  }
}
