/* ============================================
   Youayou Web - 首页样式
   ============================================ */

/* 重置 body padding */
body {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 首页容器 */
.home-container {
  flex: 1;
  padding: 0 16px 12px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* 首页内容区域 */
#content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 注意：未来赛事横幅样式已移至 global-banner.css */

/* ============================================
   导航栏 - vivo风格
   ============================================ */

/* 菜单按钮 */
.menu-btn {
  background: rgba(51, 52, 47, 0.06) !important;
}

.menu-btn:active {
  background: rgba(240, 218, 90, 0.25) !important;
}

.menu-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 搜索按钮 */
.search-btn {
  background: rgba(51, 52, 47, 0.06) !important;
}

.search-btn:active {
  background: rgba(240, 218, 90, 0.25) !important;
}

.search-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ============================================
   侧边菜单
   ============================================ */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #FFFAE6;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.side-menu.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-divider);
}

.menu-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.menu-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.menu-close:active {
  background: rgba(51, 52, 47, 0.06);
}

.menu-content {
  padding: 12px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.menu-item:active {
  background: rgba(51, 52, 47, 0.04);
}

.menu-icon-item {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.menu-icon-img-item {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.menu-text {
  font-size: 15px;
  color: var(--color-text-primary);
}

/* 菜单分隔线 */
.menu-divider {
  height: 1px;
  background: var(--color-divider);
  margin: 8px 20px;
}

/* ============================================
   下一场赛事 Banner
   ============================================ */

.next-race-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.next-race-banner:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.race-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.race-round {
  font-size: 12px;
  color: #F0DA5A;
  font-weight: 600;
  letter-spacing: 1px;
}

.race-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.race-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.race-flag {
  font-size: 16px;
}

.race-city {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.race-arrow {
  font-size: 20px;
  color: #F0DA5A;
  margin-left: 4px;
}

.race-sponsor {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsor-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ============================================
   奖牌统计
   ============================================ */

.medal-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-divider);
}

.medal-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.medal-icon {
  font-size: 16px;
}

.medal-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============================================
   统计卡片 - 3列布局
   ============================================ */

.stats-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* ============================================
   运动员卡片 - 泳联FINA风格（三栏布局）
   ============================================ */

.athlete-card-fina {
  background: var(--color-background);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 6px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  min-height: 180px;
  overflow: visible;
}

/* 统计免责声明 */
.stats-disclaimer {
  text-align: right;
  font-size: 10px;
  color: var(--color-text-tertiary);
  margin-top: -24px;
  margin-bottom: 6px;
  padding-right: 20px;
  position: relative;
  top: -8px;
}

/* 左侧：姓名信息 + 奖牌 */
.athlete-info-left {
  flex: 0 0 auto;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: visible;
}

.athlete-name-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.athlete-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.athlete-name-fina {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
  white-space: nowrap;
  margin-bottom: 0;
}

.athlete-birthday {
  font-size: 11px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  line-height: 1.2;
}

.athlete-name-en-fina {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.athlete-info-left .athlete-birthday {
  display: block;
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

/* 中间：运动员照片 + 奖牌 */
.athlete-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: visible;
}

.athlete-photo-fina {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.carousel-wrapper-fina {
  width: 100px;
  flex-shrink: 0;
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.carousel-image-box {
  width: 100px;
  height: 125px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.carousel-container-fina {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-container-fina .carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-container-fina .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 圆点指示器 - 头像区域 */
.carousel-dots-fina {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.carousel-dot-fina {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(51, 52, 47, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot-fina.active {
  background: var(--color-primary);
  width: 14px;
  border-radius: 3px;
}

/* 奖牌统计 - 左侧区域 */
.athlete-medals-left {
  margin-top: 40px;
  margin-left: -4px;
  position: relative;
  z-index: 10;
}

.medals-breakdown-left {
  display: flex;
  gap: 8px;
}

.medal-box-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
}

.medal-bar-wrapper {
  position: relative;
  width: 28px;
  height: 50px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.medal-num-left {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  position: absolute;
  bottom: 100%;
  margin-bottom: 6px;
  transition: bottom 0.3s ease;
}

.medal-bar-container {
  width: 28px;
  height: 50px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.medal-bar-left {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.gold-bar-left {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.silver-bar-left {
  background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
}

.bronze-bar-left {
  background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
}

.medal-label-left {
  font-size: 9px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* 右侧统计数据 */
.athlete-stats-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 70px;
  margin-left: 20px;
}

.stats-breakdown-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-box-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-num-right {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.stat-label-right {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* 垂直排列的统计布局 */
.stats-breakdown-right.vertical {
  gap: 6px;
}

.stats-breakdown-right.vertical .stat-box-right {
  align-items: flex-end;
}

.stat-box-right.two-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.stat-label-line1 {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

.stat-label-line2 {
  font-size: 18px;
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.3;
}

/* 奖牌下方统计数据（旧版，保留兼容） */
.athlete-stats-below {
  margin-top: 12px;
}

.stats-breakdown-below {
  display: flex;
  gap: 10px;
}

.stat-box-below {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 32px;
}

.stat-num-below {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  height: 18px;
  line-height: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stat-bar-container {
  width: 20px;
  height: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stat-bar-below {
  width: 100%;
  height: 16px;
  border-radius: 2px 2px 0 0;
}

.stat-bar-gray {
  background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
}

.stat-label-below {
  font-size: 7px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
}

.athlete-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.athlete-stat-label {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.medal-bar-below {
  width: 32px;
  height: 16px;
  border-radius: 2px;
}

.gold-bar-below {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.silver-bar-below {
  background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
}

.bronze-bar-below {
  background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
}

.medal-label-below {
  font-size: 7px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
}

/* 右侧：占位 */
.athlete-right-placeholder {
  flex: 1;
  min-width: 120px;
}

/* 旧版运动员卡片 - 保留兼容 */
.athlete-card {
  background: var(--color-background);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 16px;
}

/* 运动员头像轮播 */
.athlete-photo-carousel {
  width: 100px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-container {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* 圆点指示器 */
.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.95);
  width: 12px;
  border-radius: 3px;
}

.athlete-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.athlete-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.athlete-name-en {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.athlete-quote {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  font-style: italic;
}

/* 统计卡片 */
.stats-card {
  background: var(--color-primary);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  color: var(--color-text-white);
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stats-title {
  font-size: 16px;
  font-weight: 600;
}

.stats-more {
  font-size: 13px;
  color: rgba(255, 250, 230, 0.7);
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 12px 8px;
  background: rgba(255, 250, 230, 0.1);
  border-radius: 12px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'DIN Alternate', 'Roboto Mono', monospace;
}

.stat-label {
  font-size: 12px;
  color: rgba(255, 250, 230, 0.7);
}

/* ============================================
   快捷入口（横向布局）
   ============================================ */

.quick-access-section {
  background: var(--color-background);
  border-radius: 12px;
  padding: 2px 16px;
  margin-bottom: 4px;
  box-shadow: var(--shadow-card);
}

.quick-access-section.horizontal {
  margin-top: 6px;
}

.quick-access-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-access-grid.horizontal {
  flex-direction: row;
  justify-content: space-around;
  gap: 16px;
}

.quick-access-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.quick-access-grid.horizontal .quick-access-item {
  flex: 1;
  max-width: 100px;
  padding: 8px 4px;
}

.quick-access-item:active {
  background: rgba(51, 52, 47, 0.06);
}

.quick-access-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #e6d180 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-access-grid.horizontal .quick-access-icon {
  width: 44px;
  height: 44px;
}

.quick-access-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.quick-access-label {
  font-size: 10px;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* ============================================
   近期动态（紧凑版）
   ============================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-header.compact {
  margin-bottom: 6px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--color-burgundy);
  border-radius: 2px;
}

.section-more {
  font-size: 12px;
  color: var(--color-text-tertiary);
  cursor: pointer;
}

/* 近期动态区域 */
.recent-section {
  margin-top: 16px;
}

.recent-section.compact {
  margin-top: 0;
  background: var(--color-background);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-card);
}

/* 事件表格 */
.event-table {
  width: 100%;
}

.event-table-header {
  display: grid;
  grid-template-columns: 70px 1fr 80px;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(51, 52, 47, 0.04);
  border-radius: 8px;
  margin-bottom: 8px;
}

.event-table-header-cell {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.event-table-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(51, 52, 47, 0.06);
  cursor: pointer;
  transition: background 0.2s ease;
  align-items: center;
}

.event-table-row:last-child {
  border-bottom: none;
}

.event-table-row.alt {
  background: rgba(51, 52, 47, 0.02);
}

.event-table-row:active {
  background: rgba(51, 52, 47, 0.06);
}

.event-table-cell {
  font-size: 13px;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-table-cell.date {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.event-table-cell.type {
  text-align: right;
}

/* 表格中的标签样式 */
.event-tag-table {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* 表格底部统计 */
.event-table-footer {
  text-align: center;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(51, 52, 47, 0.06);
}

.month-count {
  font-weight: 600;
  color: var(--color-primary);
}

/* 事件列表容器（旧版） */
.event-list {
  background: var(--color-background);
  border-radius: 20px;
  border: 3px solid rgba(51, 52, 47, 0.15);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-list.compact {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  gap: 8px;
}

/* 事件卡片 */
.event-card {
  background: rgba(51, 52, 47, 0.04);
  border-radius: 16px;
  border: 2px solid rgba(51, 52, 47, 0.08);
  padding: 16px;
  cursor: pointer;
}

.event-card:active {
  background: rgba(51, 52, 47, 0.08);
}

.event-list.compact .event-card {
  padding: 10px 12px;
  border-radius: 10px;
  border-width: 1px;
}

/* 日期 - 放在最上面 */
.event-date {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.event-list.compact .event-date {
  font-size: 11px;
  margin-bottom: 4px;
}

/* 标题 */
.event-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.event-list.compact .event-title {
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* 事件标签 */
.event-tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
  margin-bottom: 6px;
}

.event-list.compact .event-tag {
  font-size: 10px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

/* 类型标签颜色 - 与小程序 all-events 页面一致 */
/* 比赛 - 勃艮第红 */
.event-tag-competition {
  background: rgba(128, 0, 32, 0.15);
  color: #800020;
}

/* 日常 - 森林绿 */
.event-tag-daily {
  background: rgba(34, 139, 34, 0.15);
  color: #228b22;
}

/* 商务 - 深蓝 */
.event-tag-business {
  background: rgba(30, 58, 138, 0.15);
  color: #1e3a8a;
}

/* 荣誉 - 金色 */
.event-tag-honor {
  background: rgba(180, 140, 50, 0.2);
  color: #8b6914;
}

/* 社会活动 - 巧克力色 */
.event-tag-social {
  background: rgba(210, 105, 30, 0.15);
  color: #d2691e;
}

/* 其他 - 灰色 */
.event-tag-other {
  background: rgba(100, 100, 100, 0.15);
  color: #666666;
}

/* 描述 */
.event-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.event-list.compact .event-desc {
  font-size: 11px;
  line-height: 1.2;
}

/* ============================================
   今日历史 - 单卡片自动轮播
   ============================================ */

.history-section {
  margin-top: 16px;
}

.history-section.compact {
  margin-top: 0;
  background: var(--color-background);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-card);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
}

.history-card {
  background: var(--color-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.history-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-divider);
}

/* 今日历史区域显示的当天日期 */
.history-date-today {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-list-horizontal {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  padding-bottom: 4px;
  flex: 1;
  min-height: 80px;
}

/* 单卡片样式 */
.history-card-single {
  background: var(--color-background);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--color-divider);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.history-card-single:active {
  transform: scale(0.98);
  background: var(--color-background-dark);
}

.history-card-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-burgundy);
  margin-bottom: 6px;
}

.history-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.history-card-subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-card-subtitle span {
  background: rgba(128, 0, 32, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.history-card-subtitle span.time {
  background: rgba(240, 218, 90, 0.2);
  color: var(--color-text-primary);
  font-weight: 500;
}

.history-card-subtitle span.rank {
  background: rgba(180, 140, 50, 0.15);
  color: #b48c32;
  font-weight: 500;
}

.history-card-subtitle span.rank-gold,
.history-card-subtitle span.rank-silver,
.history-card-subtitle span.rank-bronze {
  background: transparent;
  padding: 0;
  font-size: 14px;
}

.history-list-horizontal::-webkit-scrollbar {
  height: 4px;
}

.history-list-horizontal::-webkit-scrollbar-track {
  background: transparent;
}

.history-list-horizontal::-webkit-scrollbar-thumb {
  background: rgba(51, 52, 47, 0.2);
  border-radius: 2px;
}

/* 年份标题 */
.history-year-header {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-burgundy);
  padding: 8px 0;
  margin-bottom: 8px;
}

/* 多条记录的行容器 */
.history-items-row {
  display: flex;
  gap: 0;
  min-height: 80px;
}

/* 平分宽度的历史记录项 */
.history-item-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-right: 1px solid var(--color-divider);
  box-sizing: border-box;
  text-align: center;
}

.history-item-flex:last-child {
  border-right: none;
}

.history-item-flex .history-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.history-item-flex .history-title {
  text-align: center;
}

.history-item-flex .history-subtitle {
  text-align: center;
}

.history-item-flex .result-info {
  align-items: center;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-divider);
}

.history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.history-list-horizontal .history-item {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: none;
  border-right: 1px solid var(--color-divider);
  min-width: 100px;
  text-align: center;
}

.history-list-horizontal .history-item:last-child {
  border-right: none;
}

.history-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-burgundy);
  min-width: 40px;
}

.history-list-horizontal .history-year {
  font-size: 16px;
  min-width: auto;
}

.history-content {
  flex: 1;
}

.history-title {
  font-size: 14px;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.history-list-horizontal .history-title {
  font-size: 12px;
  line-height: 1.3;
}

.history-subtitle {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.history-list-horizontal .history-subtitle {
  font-size: 11px;
}

/* 比赛结果信息 - 每行显示一个 */
.result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-line {
  line-height: 1.4;
}

/* 历史上的今天 - 圆点指示器 */
.history-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 4px;
}

.history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.3s ease;
}

.history-dot.active {
  background: var(--color-primary);
  opacity: 1;
  transform: scale(1.2);
}

/* 骨架屏 */
.skeleton-container {
  padding: 0 16px 12px;
}

.skeleton-athlete-card {
  background: var(--color-background);
  border-radius: 16px;
  padding: 20px;
  margin-top: 8px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
}

.skeleton-photo {
  width: 100px;
  height: 120px;
  border-radius: 12px;
  background: rgba(191, 182, 167, 0.3);
}

.skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 16px;
  background: rgba(191, 182, 167, 0.3);
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-stats-card {
  background: var(--color-primary);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.skeleton-stats-header {
  height: 20px;
  width: 40%;
  background: rgba(255, 250, 230, 0.2);
  border-radius: 4px;
  margin-bottom: 16px;
}

.skeleton-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skeleton-stat-item {
  height: 60px;
  background: rgba(255, 250, 230, 0.1);
  border-radius: 12px;
}

/* ============================================
   搜索弹窗
   ============================================ */

/* 搜索遮罩层 */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 搜索弹窗 */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-background);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-height: 80vh;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-modal.active {
  transform: translateY(0);
}

/* 搜索头部 */
.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(51, 52, 47, 0.08);
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(51, 52, 47, 0.06);
  border-radius: 20px;
  padding: 8px 12px;
  gap: 8px;
}

.search-input-icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--color-text-primary);
  outline: none;
}

.search-input::placeholder {
  color: var(--color-text-tertiary);
}

.search-clear-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(51, 52, 47, 0.2);
  border: none;
  color: var(--color-text-white);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-cancel-btn {
  font-size: 14px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

/* 搜索内容区 */
.search-content {
  padding: 16px;
  max-height: calc(80vh - 60px);
  overflow-y: auto;
}

/* 搜索区块 */
.search-section {
  margin-bottom: 20px;
}

.search-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.search-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.search-clear-all {
  font-size: 12px;
  color: var(--color-text-tertiary);
  cursor: pointer;
}

/* 搜索标签 */
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag {
  padding: 6px 12px;
  background: rgba(51, 52, 47, 0.06);
  border-radius: 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-tag:hover,
.search-tag:active {
  background: rgba(240, 218, 90, 0.3);
  color: var(--color-text-primary);
}
