/* FitPro — 今日首页（home-today）页面样式 */

.page-home .ios-screen {
  background: var(--screen-bg);
}

.home-screen-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--screen-bg);
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.82) 38%,
      rgba(10, 10, 10, 0.96) 62%,
      #0a0a0a 100%
    ),
    radial-gradient(ellipse 90% 50% at 100% 0%, rgba(217, 255, 0, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 0% 30%, rgba(217, 255, 0, 0.06) 0%, transparent 50%),
    url("../images/home-hero-bg.jpg");
  background-size: cover, cover, cover, cover;
  background-position: center 20%, center, center, center 35%;
  background-repeat: no-repeat;
}

.page-home .top-header-shell {
  z-index: 18;
}

.page-home .top-header-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 72px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.72) 0%, transparent 100%);
  pointer-events: none;
}

.page-home .screen-content {
  z-index: 1;
}

.page-home .tab-bar {
  z-index: 16;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 4px 4px 0;
}

.greeting-block h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.greeting-block .date-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.greeting-block .date-line i {
  font-size: 12px;
  color: var(--brand);
}

.icon-btn,
a.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.icon-btn-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--text-on-primary);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 8px rgba(217, 255, 0, 0.45);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn i {
  font-size: 16px;
}

.workout-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: rgba(26, 26, 26, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(217, 255, 0, 0.1),
    0 12px 40px rgba(217, 255, 0, 0.1),
    var(--shadow-card);
}

.workout-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(217, 255, 0, 0.16) 0%,
    rgba(217, 255, 0, 0.04) 32%,
    transparent 58%
  );
  pointer-events: none;
  z-index: 0;
}

.workout-hero::after {
  content: "";
  position: absolute;
  top: -56px;
  right: -32px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(217, 255, 0, 0.42) 0%,
    rgba(217, 255, 0, 0.12) 42%,
    transparent 72%
  );
  filter: blur(32px);
  opacity: 0.88;
  pointer-events: none;
  z-index: 0;
}

.workout-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.workout-hero .plan-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--brand-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.workout-hero-intro {
  position: relative;
  z-index: 1;
}

.workout-hero h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.workout-hero .plan-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.workout-hero .plan-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.plan-meta-dot {
  flex-shrink: 0;
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

button.plan-link {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.plan-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.plan-link--change {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.plan-link--change i {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.plan-link:hover {
  color: var(--brand);
}

.plan-link--change:hover {
  background: var(--brand-muted);
  border-color: rgba(217, 255, 0, 0.15);
}

.plan-link--change:hover i {
  transform: translateX(2px);
  opacity: 1;
}

.workout-hero .today-exercise-list {
  position: relative;
  z-index: 1;
}

.today-exercise-list {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding: 18px 0 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 6px;
  border-top: 1px solid var(--border-subtle);
}

.today-exercise-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  min-height: 68px;
  padding: 0 2px;
  text-align: center;
}

.today-ex-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.today-ex-icon .sport-icon-img {
  width: 28px;
  height: 28px;
}

.today-ex-name {
  width: 100%;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.streak-card {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  isolation: isolate;
  overflow: hidden;
}

.streak-card .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.streak-card .section-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.streak-card .section-title span {
  font-size: 12px;
  color: var(--text-secondary);
}

.data-update-weight-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(217, 255, 0, 0.2);
  background: var(--brand-muted);
  color: var(--brand);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.data-update-weight-btn:active {
  transform: scale(0.95);
  background: rgba(217, 255, 0, 0.14);
}

.streak-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.streak-stats--six {
  grid-template-columns: repeat(2, 1fr);
}

.streak-stats--six .stat-label {
  font-size: 10px;
  line-height: 1.3;
}

.stat-box {
  padding: 14px;
  border-radius: 16px;
  background: rgba(26, 26, 26, 0.65);
  border: 1px solid var(--border-subtle);
}

.stat-box .stat-value {
  display: block;
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-box .stat-label {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.train-heatmap {
  margin-top: 4px;
}

.train-week-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.train-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0;
}

.train-week-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.train-cell {
  display: block;
  width: 100%;
  max-width: 28px;
  aspect-ratio: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.train-week-day {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.train-week-col:has(.train-cell.done) .train-week-day {
  color: var(--text-secondary);
}

.train-week-day--today {
  color: var(--brand);
  font-weight: 700;
}

.train-cell.done {
  background: var(--brand);
  box-shadow: 0 0 10px rgba(217, 255, 0, 0.28);
}

.train-cell.today {
  border: 1px solid var(--brand);
  background-color: rgba(255, 255, 255, 0.08);
  background-image: linear-gradient(
    135deg,
    var(--brand) 50%,
    rgba(255, 255, 255, 0.1) 50%
  );
  box-shadow: 0 0 8px rgba(217, 255, 0, 0.2);
}

.train-cell.today.done {
  box-shadow: 0 0 8px rgba(217, 255, 0, 0.28);
}

.quick-actions h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.action-row {
  text-decoration: none;
  color: inherit;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.action-row:active {
  transform: scale(0.98);
}

.action-row .action-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
}

.action-row .action-icon i {
  font-size: 18px;
  color: var(--brand);
}

.action-row .action-text {
  flex: 1;
  min-width: 0;
}

.action-row .action-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.action-row .action-text small {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-row .chevron {
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 768px) {
  .page-home .ios-screen {
    background: var(--screen-bg);
  }

  .home-screen-bg {
    background-position: center 15%, center, center, center 30%;
  }
}
