/* ============================================
   Youayou Web - 赛事中心页样式
   ============================================ */

/* 导航栏样式继承自 components.css */

/* 取消点击高亮效果 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 页面容器 - 固定布局 */
body {
  background: linear-gradient(135deg, #BFB6A7 0%, #CFCEB6 100%);
  height: 100vh;
  overflow: hidden;
  /* 导航栏使用绝对定位，不需要预留空间 */
  padding-top: 0 !important;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}

/* 确保固定定位元素（搜索弹窗、菜单等）不受 body 布局影响 */
body > .search-overlay,
body > .search-modal,
body > .menu-overlay,
body > .side-menu {
  position: fixed;
}

.competition-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
}

/* 头部区域 - 固定不滚动 */
.header {
  background: #FFFAE6;
  padding: 12px 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(51, 52, 47, 0.06);
  border-bottom: 2px solid rgba(51, 52, 47, 0.12);
  margin-top: 0;
  position: relative;
}

/* 胶囊 Tab */
.tab-container {
  margin-bottom: 8px;
  padding: 0;
}

.tab-group {
  display: flex;
  background: rgba(51, 52, 47, 0.06);
  padding: 2px;
  border-radius: 10px;
  border: 2px solid rgba(51, 52, 47, 0.1);
}

.filter-tab-item {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  color: rgba(51, 52, 47, 0.7);
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-tab-item.active {
  color: #FFFFFF;
  font-weight: 600;
  background: #33342F;
}

/* 筛选栏 */
.filters {
  display: flex;
  gap: 8px;
  padding: 0;
}

.filter-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.filter-text {
  font-size: 12px;
  color: #33342F;
}

.filter-value {
  font-size: 12px;
  color: rgba(51, 52, 47, 0.6);
}

.filter-arrow {
  font-size: 9px;
  color: rgba(51, 52, 47, 0.5);
}

/* 筛选下拉菜单 */
.filter-dropdown {
  position: absolute;
  background: #FFFAE6;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(51, 52, 47, 0.15);
  z-index: 100;
  padding: 0;
  border: 2px solid rgba(51, 52, 47, 0.12);
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  min-width: 100px;
}

/* 年份下拉位置 */
.filter-dropdown-year {
  left: 16px;
  top: 180px;
  width: calc(33% - 20px);
}

/* 规格下拉位置 */
.filter-dropdown-level {
  left: calc(33% + 8px);
  top: 180px;
  width: calc(33% - 20px);
}

/* 状态下拉位置 */
.filter-dropdown-status {
  right: 16px;
  top: 180px;
  width: calc(33% - 20px);
}

.filter-dropdown[style*="display: none"] {
  pointer-events: none;
}

.dropdown-item {
  padding: 12px 16px;
  font-size: 14px;
  color: #33342F;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  z-index: 1001;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  border-bottom: 1px solid rgba(51, 52, 47, 0.1);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(51, 52, 47, 0.06);
}

.dropdown-item.active {
  color: #33342F;
  font-weight: 600;
  background: rgba(51, 52, 47, 0.06);
}

/* 赛事列表 - 可滚动区域 */
.competition-list {
  flex: 1;
  min-height: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 年份分组 */
.year-group {
  margin-bottom: 8px;
}

.year-group-title {
  font-size: 17px;
  font-weight: 600;
  color: #33342F;
  margin: 16px 0 12px 0;
  display: flex;
  align-items: center;
}

.year-group-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: #800020;
  border-radius: 2px;
  margin-right: 8px;
}

.year-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(51, 52, 47, 0.15) 20%, rgba(51, 52, 47, 0.15) 80%, transparent 100%);
  margin: 8px 0;
}

/* 赛事卡片 - 与小程序一致 */
.event-card {
  position: relative;
  background-color: #FFFAE6;
  border-radius: 12px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(51, 52, 47, 0.08);
  border: 2px solid rgba(51, 52, 47, 0.1);
  cursor: pointer;
}

.event-card:active {
  transform: none;
}

.card-content {
  display: flex;
  padding: 16px 20px;
  align-items: flex-start;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-range {
  font-size: 14px;
  color: rgba(51, 52, 47, 0.6);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.date-text {
  font-size: 14px;
  color: rgba(51, 52, 47, 0.6);
  font-weight: 500;
}

.date-separator {
  color: rgba(51, 52, 47, 0.4);
}

.name {
  font-size: 17px;
  font-weight: 600;
  color: #33342F;
  line-height: 1.3;
}

.name-sub {
  font-size: 13px;
  color: rgba(180, 140, 50, 0.9);
  line-height: 1.2;
  margin-top: 4px;
  padding: 4px 10px;
  background: rgba(180, 140, 50, 0.12);
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}

.location {
  font-size: 14px;
  color: rgba(51, 52, 47, 0.6);
  font-weight: 400;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.location-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* 右侧标签 */
.right-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  margin-left: 16px;
}

.right-tag {
  font-size: 12px;
  color: rgba(51, 52, 47, 0.6);
  background: rgba(51, 52, 47, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* 状态标签样式 */
.right-tag.status-upcoming {
  background: #E8F5E9;
  color: #2E7D32;
}

.right-tag.status-ongoing {
  background: #FFF3E0;
  color: #E65100;
}

.right-tag.status-completed {
  background: rgba(51, 52, 47, 0.08);
  color: rgba(51, 52, 47, 0.5);
}

.right-tag.status-unknown {
  background: #F5F5F5;
  color: #9E9E9E;
}

/* 底部统计 */
.stats-bottom {
  padding: 12px;
  background: #FFFAE6;
  text-align: center;
  font-size: 13px;
  color: #33342F;
  font-weight: 500;
  border-top: 2px solid rgba(51, 52, 47, 0.12);
  flex-shrink: 0;
}

/* 骨架屏 */
.skeleton-container {
  flex: 1;
  min-height: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
}

.skeleton-year-group {
  margin-bottom: 24px;
}

.skeleton-year-title {
  width: 60px;
  height: 20px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

.skeleton-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card {
  height: 80px;
  background: #FFFAE6;
  border-radius: 12px;
  border: 2px solid rgba(51, 52, 47, 0.1);
  background: linear-gradient(90deg, #FFFAE6 25%, #FFF5D6 50%, #FFFAE6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

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


