/* 竞赛卡片全局样式 - 保持与其他页面风格一致 */
.competition-card-section {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(44,62,80,0.08);
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 56px 40px 48px;
  border: 1px solid #e2e8f0;
  width: 100%;
}

.competition-card-section h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #1a237e;
  font-size: 32px;
  font-weight: 600;
}

/* 卡片网格布局 */
.competition-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 24px;
}

/* 卡片基础样式 */
.competition-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e9ecef;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.competition-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

/* 卡片头部 */
.competition-card-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #f1f3f5;
  position: relative;
}

.competition-card-title {
  margin: 0;
  font-size: 1.15rem;
  color: #1a237e;
  font-weight: 600;
  line-height: 1.4;
  padding-right: 30px;
}

/* 状态标记 */
.competition-status {
  position: absolute;
  top: 20px;
  right: 16px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
  background: #e3f2fd;
  color: #1976d2;
}

.status-enrolling { background: #e3f2fd; color: #1976d2; }
.status-upcoming { background: #fff8e1; color: #ff8f00; }
.status-ended { background: #f5f5f5; color: #757575; }

/* 卡片内容 */
.competition-card-body {
  padding: 18px 20px;
  flex: 1;
}

/* 标签容器 */
.competition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* 标签样式 */
.competition-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* 不同类别的标签颜色 */
.tag-national { background: #e3f2fd; color: #1976d2; }
.tag-international { background: #e8f5e9; color: #2e7d32; }
.tag-regional { background: #fff3e0; color: #ef6c00; }
.tag-math { background: #e3f2fd; color: #1565c0; }
.tag-programming { background: #e8eaf6; color: #3949ab; }
.tag-science { background: #e0f7fa; color: #00838f; }
.tag-english { background: #e8f5e9; color: #2e7d32; }
.tag-chinese { background: #f3e5f5; color: #7b1fa2; }

/* 信息行 */
.competition-info {
  margin: 12px 0;
  font-size: 0.9rem;
  color: #455a64;
  line-height: 1.6;
}

.competition-info strong {
  color: #263238;
  font-weight: 500;
  margin-right: 6px;
}

/* 卡片底部 */
.competition-card-footer {
  padding: 16px 20px;
  border-top: 1px solid #f1f3f5;
  text-align: right;
}

/* 查看详情按钮 */
.btn-view-detail {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: #3498db;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-view-detail:hover {
  background: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-view-detail i {
  margin-left: 6px;
  font-size: 0.8em;
  transition: transform 0.2s ease;
}

.btn-view-detail:hover i {
  transform: translateX(2px);
}

/* 筛选标签 */
.competition-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.filter-tab.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.filter-tab:not(.active) {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.filter-tab:not(.active):hover {
  background: #e9ecef;
  border-color: #ced4da;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .competition-card-section {
    margin: 0 40px 60px;
    width: calc(100% - 80px);
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .competition-card-section {
    padding: 32px 20px;
    margin: 0 16px 40px;
    width: calc(100% - 32px);
  }
  
  .competition-card-section h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .competition-filters {
    gap: 8px;
    margin: 16px 0;
  }
  
  .filter-tab {
    padding: 6px 16px;
    font-size: 0.85rem;
  }
  
  .competition-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .competition-card-section {
    padding: 40px 20px;
    margin: 0 20px 40px;
    width: calc(100% - 40px);
  }
  
  .competition-card-grid {
    grid-template-columns: 1fr;
  }
  
  .competition-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-tab {
    width: 100%;
    text-align: center;
  }
}

/* 发现更多按钮 */
.btn-discover-more {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: #3498db;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.btn-discover-more:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

.btn-discover-more i {
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.btn-discover-more:hover i {
  transform: translateX(4px);
}
