/* ===== 页面专属样式：.page-home ===== */
.page-home {
  --frame-color: var(--neon-green, #39FF14);
  --frame-tick-size: 6px;
  --frame-corner-size: 24px;
  --hero-min-height: 85vh;
  --section-gap: 3rem;
  --card-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--bg-dark, #0B0E16);
  color: var(--text-primary, #ffffff);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 框景首屏 ---------- */
.page-home .home-hero {
  position: relative;
  min-height: var(--hero-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--surface-dark, #131724);
  isolation: isolate;
}

/* 刻度边框装饰 */
.page-home .hero-frame {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  z-index: 2;
}

.page-home .frame-corner {
  position: absolute;
  width: var(--frame-corner-size);
  height: var(--frame-corner-size);
  border-color: var(--frame-color);
  border-style: solid;
  border-width: 0;
}

.page-home .frame-corner--tl {
  top: 0; left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
}

.page-home .frame-corner--tr {
  top: 0; right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
}

.page-home .frame-corner--bl {
  bottom: 0; left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
}

.page-home .frame-corner--br {
  bottom: 0; right: 0;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.page-home .frame-tick {
  position: absolute;
  background-color: var(--frame-color);
  opacity: 0.7;
}

.page-home .frame-tick--top,
.page-home .frame-tick--bottom {
  height: var(--frame-tick-size);
  width: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.page-home .frame-tick--top {
  top: 8px;
}

.page-home .frame-tick--bottom {
  bottom: 8px;
}

.page-home .frame-tick--right,
.page-home .frame-tick--left {
  width: var(--frame-tick-size);
  height: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.page-home .frame-tick--right {
  right: 8px;
}

.page-home .frame-tick--left {
  left: 8px;
}

/* 首屏背景图 */
.page-home .hero-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-home .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.25;
  filter: saturate(1.2) contrast(1.1);
}

/* 首屏内容层 */
.page-home .hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

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

.page-home .hero-context {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary, #B0B8D1);
  border: 1px solid var(--border-subtle, #2A2F45);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  align-self: center;
  background-color: rgba(11,14,22,0.6);
  backdrop-filter: blur(4px);
}

.page-home .hero-title {
  font-family: Montserrat, 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--text-primary, #ffffff);
}

.page-home .hero-title .text-neon {
  color: var(--neon-green, #39FF14);
  text-shadow: 0 0 20px rgba(57,255,20,0.4);
}

.page-home .hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--text-secondary, #B0B8D1);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.page-home .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background-color: var(--neon-green, #39FF14);
  color: var(--text-on-neon, #000000);
  font-family: Montserrat, 'Noto Sans SC', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  box-shadow: 0 0 12px rgba(57,255,20,0.25);
}

.page-home .btn-primary:hover,
.page-home .btn-primary:focus-visible {
  box-shadow: 0 0 28px rgba(57,255,20,0.55);
  transform: scale(1.03);
  outline: none;
}

.page-home .btn-primary:active {
  transform: scale(0.97);
}

/* 按钮霓虹脉冲交互 */
.page-home .btn-primary[data-subscribe="pulse"] {
  animation: heroPulse 3s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(57,255,20,0.25); }
  50% { box-shadow: 0 0 30px rgba(57,255,20,0.6); }
}

.page-home .btn-apple-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  color: var(--text-primary, #ffffff);
  background-color: rgba(19,23,36,0.8);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle, #2A2F45);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.page-home .btn-apple-icon:hover,
.page-home .btn-apple-icon:focus-visible {
  border-color: var(--electric-blue, #00D4FF);
  background-color: rgba(0,212,255,0.12);
  outline: none;
}

.page-home .btn-apple-icon svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--electric-blue, #00D4FF);
}

/* ---------- 通用区块 ---------- */
.page-home .home-section {
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border-subtle, #2A2F45);
}

.page-home .section-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-home .section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-home .section-title {
  font-family: Montserrat, 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0.05em;
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
  color: var(--text-primary, #ffffff);
}

.page-home .section-sub {
  font-size: 0.95rem;
  color: var(--text-secondary, #B0B8D1);
  margin: 0;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.page-home .text-blue {
  color: var(--electric-blue, #00D4FF);
}

.page-home .text-gold {
  color: var(--metal-gold, #FFD700);
}

.page-home .text-neon {
  color: var(--neon-green, #39FF14);
}

/* ---------- 追比分网格 ---------- */
.page-home .tracking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.page-home .tracking-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-dark, #131724);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle, #2A2F45);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.page-home .tracking-card:hover {
  border-color: rgba(57,255,20,0.3);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.page-home .card-icon-wrap,
.page-home .card-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--card-dark, #1A1F30);
  position: relative;
}

.page-home .card-icon-wrap {
  padding: 1.5rem;
  min-height: 120px;
}

.page-home .card-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(57,255,20,0.2));
  transition: transform 0.3s ease;
}

.page-home .tracking-card:hover .card-icon {
  transform: scale(1.08);
}

.page-home .card-img-wrap {
  min-height: 180px;
}

.page-home .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.page-home .tracking-card:hover .card-img {
  transform: scale(1.03);
}

.page-home .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.page-home .card-title {
  font-family: Montserrat, 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: 0.04em;
  color: var(--text-primary, #ffffff);
}

.page-home .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--electric-blue, #00D4FF);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s ease;
}

.page-home .card-link:hover {
  color: var(--neon-green, #39FF14);
}

/* 伤停列表 */
.page-home .injury-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.page-home .injury-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary, #B0B8D1);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(42,47,69,0.4);
}

.page-home .injury-item:last-child {
  border-bottom: none;
}

.page-home .injury-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ff3b30;
  flex-shrink: 0;
}

.page-home .injury-dot--ok {
  background-color: var(--neon-green, #39FF14);
}

.page-home .injury-status {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.8rem;
  color: #ff6b6b;
}

.page-home .status-ok {
  color: var(--neon-green, #39FF14);
}

/* 日历微型 */
.page-home .calendar-mini {
  background-color: var(--card-dark, #1A1F30);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle, #2A2F45);
}

.page-home .calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary, #B0B8D1);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-home .calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.page-home .cal-date {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary, #B0B8D1);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.page-home .cal-date:hover {
  background-color: rgba(57,255,20,0.15);
  color: var(--text-primary, #ffffff);
}

.page-home .cal-date--today {
  background-color: var(--neon-green, #39FF14);
  color: var(--text-on-neon, #000000);
  font-weight: 700;
}

.page-home .cal-date--today:hover {
  background-color: var(--neon-green, #39FF14);
  color: var(--text-on-neon, #000000);
}

/* 日历进度条 */
.page-home .calendar-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #B0B8D1);
}

.page-home .progress-label {
  flex-shrink: 0;
  font-weight: 500;
}

.page-home .progress-track {
  flex: 1;
  height: 5px;
  background-color: var(--border-subtle, #2A2F45);
  border-radius: 3px;
  overflow: hidden;
}

.page-home .progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-green, #39FF14), var(--electric-blue, #00D4FF));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.page-home .progress-value {
  flex-shrink: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--neon-green, #39FF14);
}

/* ---------- 收藏区域 ---------- */
.page-home .favorites-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.page-home .fav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--surface-dark, #131724);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-subtle, #2A2F45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-home .fav-card:hover {
  border-color: rgba(255,215,0,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.page-home .fav-star {
  flex-shrink: 0;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s ease;
}

.page-home .fav-star:hover {
  transform: scale(1.15);
}

.page-home .star-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.3));
  transition: filter 0.2s ease;
}

.page-home .star-icon--dim {
  filter: drop-shadow(0 0 2px rgba(255,215,0,0.1));
  opacity: 0.5;
}

.page-home .fav-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.page-home .fav-league {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--metal-gold, #FFD700);
  opacity: 0.8;
}

.page-home .fav-match {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .fav-time {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #B0B8D1);
}

.page-home .fav-enter {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-on-neon, #000000);
  background-color: var(--neon-green, #39FF14);
  border-radius: 4px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 8px rgba(57,255,20,0.2);
}

.page-home .fav-enter:hover {
  box-shadow: 0 0 18px rgba(57,255,20,0.45);
  transform: scale(1.04);
}

/* ---------- 苹果端说明 ---------- */
.page-home .home-apple {
  background-color: var(--surface-dark, #131724);
  border-top: 1px solid var(--border-subtle, #2A2F45);
}

.page-home .apple-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.page-home .apple-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.page-home .apple-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background-color: var(--card-dark, #1A1F30);
  border-radius: 8px;
  border-left: 3px solid var(--electric-blue, #00D4FF);
  transition: background-color 0.2s ease;
}

.page-home .apple-item:hover {
  background-color: rgba(0,212,255,0.06);
}

.page-home .apple-num {
  flex-shrink: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--electric-blue, #00D4FF);
  opacity: 0.7;
  line-height: 1.4;
  min-width: 1.6rem;
}

.page-home .apple-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary, #B0B8D1);
}

.page-home .apple-text strong {
  color: var(--text-primary, #ffffff);
  font-weight: 600;
}

.page-home .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--electric-blue, #00D4FF);
  background-color: transparent;
  border: 1.5px solid var(--electric-blue, #00D4FF);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.page-home .btn-outline:hover {
  background-color: rgba(0,212,255,0.1);
  box-shadow: 0 0 16px rgba(0,212,255,0.2);
  color: var(--text-primary, #ffffff);
}

/* ---------- 底部区域 ---------- */
.page-home .home-bottom {
  border-top: 1px solid var(--border-subtle, #2A2F45);
  background-color: var(--surface-dark, #131724);
}

.page-home .trust-statement {
  max-width: 720px;
  margin: 0 auto 2rem auto;
  padding: 1.25rem 1.5rem;
  background-color: var(--card-dark, #1A1F30);
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #2A2F45);
  text-align: center;
}

.page-home .trust-statement p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary, #B0B8D1);
}

.page-home .home-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.page-home .quick-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #B0B8D1);
  text-decoration: none;
  padding: 0.3rem 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.page-home .quick-link:hover {
  color: var(--neon-green, #39FF14);
  border-bottom-color: var(--neon-green, #39FF14);
}

/* ========== 响应式：平板及以上 ========== */
@media (min-width: 640px) {
  .page-home .home-hero {
    --hero-min-height: 80vh;
    min-height: 80vh;
  }

  .page-home .hero-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 2rem 2.5rem;
  }

  .page-home .hero-text {
    align-items: flex-start;
    max-width: 55%;
  }

  .page-home .hero-context {
    align-self: flex-start;
  }

  .page-home .hero-desc {
    margin: 0;
  }

  .page-home .hero-actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
  }

  .page-home .tracking-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .favorites-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .apple-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .card-icon-wrap {
    min-height: 140px;
  }

  .page-home .card-icon {
    width: 100px;
    height: 100px;
  }

  .page-home .card-img-wrap {
    min-height: 200px;
  }
}

@media (min-width: 1024px) {
  .page-home .home-hero {
    --hero-min-height: 75vh;
  }

  .page-home .hero-frame {
    inset: 18px;
  }

  .page-home .frame-corner {
    width: 32px;
    height: 32px;
  }

  .page-home .frame-tick--top,
  .page-home .frame-tick--bottom {
    width: 16px;
    height: 8px;
  }

  .page-home .frame-tick--right,
  .page-home .frame-tick--left {
    width: 8px;
    height: 16px;
  }

  .page-home .hero-content {
    padding: 2.5rem 3.5rem;
  }

  .page-home .hero-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
  }

  .page-home .hero-actions {
    flex-direction: row;
    min-width: auto;
  }

  .page-home .home-section {
    padding: 3.5rem 2rem;
  }

  .page-home .favorites-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .apple-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .tracking-grid {
    gap: 2rem;
  }

  .page-home .tracking-card {
    flex-direction: row;
  }

  .page-home .card-icon-wrap,
  .page-home .card-img-wrap {
    width: 220px;
    min-height: 180px;
    flex-shrink: 0;
  }

  .page-home .card-icon-wrap {
    width: 180px;
  }

  .page-home .card-body {
    padding: 1.5rem 1.75rem;
  }
}

/* ========== 超大屏修正 ========== */
@media (min-width: 1400px) {
  .page-home .hero-content {
    max-width: 1400px;
  }

  .page-home .section-inner {
    max-width: 1320px;
  }
}

/* ========== 移动端窄屏安全 ========== */
@media (max-width: 380px) {
  .page-home .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .page-home .btn-primary,
  .page-home .btn-apple-icon {
    width: 100%;
    justify-content: center;
  }

  .page-home .fav-card {
    flex-wrap: wrap;
  }

  .page-home .fav-enter {
    width: 100%;
    justify-content: center;
    margin-top: 0.4rem;
  }

  .page-home .calendar-dates {
    gap: 1px;
  }

  .page-home .cal-date {
    height: 24px;
    font-size: 0.65rem;
  }
}
