/* ===== 篮球生涯模拟器 · 自定义样式 ===== */

html,
body {
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* 安全区域适配 */
.safe-top {
  padding-top: env(safe-area-inset-top, 0);
}
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 隐藏滚动条但保留滚动 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ===== 动画 ===== */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-rise {
  animation: rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
.animate-pulse-soft {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
  50% {
    box-shadow: 0 0 22px 0 rgba(249, 115, 22, 0.28);
  }
}
.animate-glow {
  animation: glow 2.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ===== 能力值徽章 ===== */
.ovr-badge {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  box-shadow: 0 6px 20px -8px rgba(249, 115, 22, 0.6);
}

/* ===== 时间轴表格 ===== */
.timeline-row {
  display: grid;
  grid-template-columns: 2rem 1fr 2.5rem 2.2rem 2.2rem 2.2rem;
  gap: 0.25rem;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 480px) {
  .timeline-row {
    grid-template-columns: 2.5rem 1fr 3rem 2.5rem 2.5rem 2.5rem;
    gap: 0.5rem;
  }
}

.timeline-cell {
  font-size: 0.7rem;
  line-height: 1.1rem;
}
@media (min-width: 480px) {
  .timeline-cell {
    font-size: 0.78rem;
  }
}

/* 当前年龄高亮 */
.timeline-row.current {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.16), transparent 80%);
  border-radius: 0.5rem;
}
.timeline-row.current .timeline-cell {
  color: #fdba74;
}

/* 决策行 */
.timeline-row.deciding {
  background: rgba(249, 115, 22, 0.08);
  border-radius: 0.5rem;
}

/* ===== 决策卡 ===== */
.decision-card {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.06), rgba(24, 24, 27, 0.6));
  border: 1px solid rgba(249, 115, 22, 0.22);
}

/* ===== 队徽色块 ===== */
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.team-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ===== 奖牌/荣誉 ===== */
.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
}

/* ===== 选项卡星级 ===== */
.star {
  color: #f97316;
}
.star-dim {
  color: #52525c;
}

/* ===== 进度条（设置向导） ===== */
.step-pill {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.step-pill.active {
  background: #f97316;
  color: #09090b;
}
.step-pill.done {
  background: #27272a;
  color: #9f9fa9;
}

/* ===== 通用按钮 ===== */
.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 8px 24px -10px rgba(249, 115, 22, 0.7);
  transition: all 0.18s ease;
}
.btn-primary:not(:disabled):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  transition: all 0.15s ease;
}
.btn-ghost:not(:disabled):hover {
  background: #27272a;
}
.btn-ghost:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== 国家/位置网格按钮 ===== */
.grid-btn {
  transition: all 0.15s ease;
}
.grid-btn:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(39, 39, 42, 0.7);
}
.grid-btn.active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4);
}

/* ===== 滚动容器 ===== */
.scroll-area {
  max-height: calc(100vh - 13rem);
}

/* ===== 结局页背景 ===== */
.ending-bg {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(249, 115, 22, 0.18), transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(249, 115, 22, 0.08), transparent 60%);
}

/* 文字渐变 */
.text-gradient-ball {
  background: linear-gradient(135deg, #fdba74, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 选秀顺位徽章 */
.pick-badge {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #422006;
}
