/* ORMG 官网样式 - 浅色清爽主题 */

/* 防止浏览器自动调整字体（不影响用户双指缩放） */
/* 注意：text-size-adjust 需要前缀+无前缀版本以兼容所有浏览器，lint警告可忽略 */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #e6f4ff;
  --gradient: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-section: #f0f5ff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 1rem;
  overflow-x: auto;
}

/* 导航 */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: #1f2937; text-decoration: none; }
.nav-logo i { font-size: 1.8rem; color: var(--primary); }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-link { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; color: #374151; font-size: 1.5rem; cursor: pointer; }

/* 页面切换 */
.page { display: none; min-height: 100vh; padding-top: 70px; }
.page.active { display: block; }

/* Hero */
.hero { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 50px 20px; background: linear-gradient(180deg, #e6f4ff 0%, #ffffff 100%); }

/* 其他页面section通用 */
.download, .rankings, .register { padding: 80px 0; min-height: calc(100vh - 70px); }
.hero-content { max-width: 800px; }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 20px; justify-content: center; margin-bottom: 60px; }
.hero-stats { display: flex; gap: 60px; justify-content: center; }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 8px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.3s; border: none; }
.btn-primary { background: var(--gradient); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }

/* 通用 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-badge { display: inline-block; background: rgba(24, 144, 255, 0.15); color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }

/* 项目网格 */
.features { background: var(--bg-section); }
.sports-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-top: 50px; }
.sport-card { background: #ffffff; padding: 30px 20px; border-radius: 12px; text-align: center; border: 1px solid var(--border); transition: all 0.3s; box-shadow: var(--shadow-sm); }
.sport-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-md); }
.sport-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 15px; }
.sport-card h3 { font-size: 1.1rem; }

/* 下载 */
.download { text-align: center; }
.download-card { display: inline-block; background: #ffffff; padding: 50px 60px; border-radius: 20px; border: 1px solid var(--border); margin-top: 40px; box-shadow: var(--shadow-md); }
.download-icon { font-size: 4rem; color: var(--primary); margin-bottom: 20px; }
.download-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.download-card .version { color: var(--text-muted); margin-bottom: 30px; }

/* 成绩查询 */
.rankings { background: var(--bg-section); }
.search-box { display: flex; gap: 15px; max-width: 500px; margin: 40px auto; }
.search-box input { flex: 1; padding: 14px 20px; background: #ffffff; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1rem; }
.search-box input:focus { outline: none; border-color: var(--primary); }
.rankings-result { margin-top: 40px; min-height: 200px; }
.no-data { text-align: center; color: var(--text-muted); padding: 60px 0; }
.no-data i { font-size: 3rem; margin-bottom: 15px; display: block; }

/* 报名 */
.register-form { max-width: 600px; margin: 40px auto 0; background: #ffffff; padding: 40px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group .required { color: #ff4d4f; }
.form-group input, .form-group select { width: 100%; padding: 12px 16px; background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(24,144,255,0.1); }
.form-group input::placeholder { color: #666; }
.form-tip { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Hero增强 */
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(24,144,255,0.15); color: var(--primary); padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; margin-bottom: 24px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }

/* 运动卡片增强 */
.sport-card p { color: var(--text-muted); font-size: 0.85rem; margin-top: 8px; }

/* 成绩查询增强 */
.no-data span { display: block; margin-top: 8px; font-size: 0.85rem; opacity: 0.7; }

/* 下载图标增强 */
.download-card .download-icon { display: block; }

/* 辅助类 */
.mt-80 { margin-top: 80px; }
.opacity-50 { opacity: 0.5; }

/* 页脚 */
.footer { text-align: center; padding: 40px 20px; border-top: 1px solid var(--border); color: var(--text-muted); }

/* Toast提示 */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: #ffffff; padding: 14px 24px; border-radius: 8px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); z-index: 9999; opacity: 0; transition: all 0.3s; border: 1px solid var(--border); color: var(--text); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: #52c41a; }
.toast-success i { color: #52c41a; }
.toast-error { border-color: #ff4d4f; }
.toast-error i { color: #ff4d4f; }
.toast-warning { border-color: #faad14; }
.toast-warning i { color: #faad14; }
.toast-info i { color: var(--primary); }

/* 加载动画 */
.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.loading-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.loading-state i { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; display: block; }

/* 成绩卡片 */
.ranking-card { background: #ffffff; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.ranking-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: var(--bg-light); border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.ranking-header h3 { display: flex; align-items: center; gap: 8px; }
.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.status-completed { background: rgba(82,196,26,0.15); color: #52c41a; }
.ranking-tabs { display: flex; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.tab-btn:hover, .tab-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th, .ranking-table td { padding: 14px 24px; text-align: left; border-bottom: 1px solid var(--border); }
.ranking-table th { color: var(--text-muted); font-weight: 600; font-size: 0.9rem; background: #f3f4f6; }
.ranking-table tbody tr:hover { background: rgba(24,144,255,0.05); }
.rank-gold td:first-child { color: #faad14; font-weight: 700; }
.rank-silver td:first-child { color: #bfbfbf; font-weight: 700; }
.rank-bronze td:first-child { color: #d48806; font-weight: 700; }
.rank-icon { margin-right: 6px; }
.ranking-note { padding: 16px 24px; color: var(--text-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }

/* 功能网格 */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 50px; }
.feature-card { background: #ffffff; padding: 32px; border-radius: 16px; border: 1px solid var(--border); transition: all 0.3s; box-shadow: var(--shadow-sm); }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.feature-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; display: block; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* 下载卡片增强 */
.download-cards { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 50px; }
.download-card.featured { border: 2px solid var(--primary); position: relative; }
.download-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient); padding: 4px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.download-requirements { list-style: none; text-align: left; margin: 20px 0; }
.download-requirements li { padding: 8px 0; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.download-requirements i { color: #52c41a; }
.download-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }

/* 更新日志 */
.changelog { margin-top: 80px; text-align: left; max-width: 700px; margin-left: auto; margin-right: auto; }
.changelog h3 { margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.changelog-item { background: #ffffff; padding: 24px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.changelog-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.changelog-version { font-weight: 700; color: var(--primary); }
.changelog-date { color: var(--text-muted); font-size: 0.9rem; }
.changelog-tag { padding: 2px 10px; border-radius: 4px; font-size: 0.75rem; }
.tag-new { background: #52c41a; color: white; }
.changelog-content { padding-left: 20px; color: var(--text-muted); }
.changelog-content li { margin: 8px 0; }

/* 响应式 - 平板 */
@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .sports-grid { grid-template-columns: repeat(3, 1fr); }
  .download-cards { gap: 20px; }
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
  .nav-menu { 
    display: none; 
    position: absolute; 
    top: 70px; 
    left: 0; 
    right: 0; 
    background: #ffffff; 
    flex-direction: column; 
    padding: 20px; 
    gap: 15px; 
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.active { display: flex; }
  .nav-toggle { display: block; }
  
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-badge { font-size: 0.8rem; padding: 6px 12px; }
  .stat-number { font-size: 2rem; }
  
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.95rem; }
  .section-badge { font-size: 0.75rem; }
  
  .sports-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .sport-card { padding: 20px 12px; }
  .sport-card i { font-size: 1.8rem; margin-bottom: 10px; }
  .sport-card h3 { font-size: 0.9rem; }
  .sport-card p { font-size: 0.75rem; display: none; }
  
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { padding: 24px; }
  .feature-card i { font-size: 2rem; }
  .feature-card h3 { font-size: 1.1rem; }
  
  .download-cards { flex-direction: column; align-items: stretch; }
  .download-card { max-width: 100%; }
  
  .search-box { flex-direction: column; max-width: 100%; }
  .search-box input { width: 100%; }
  
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .register-form { padding: 24px; margin: 20px; }
  
  .ranking-table th, .ranking-table td { padding: 10px 12px; font-size: 0.85rem; }
  .ranking-header { flex-direction: column; align-items: flex-start; }
  .ranking-tabs { overflow-x: auto; }
  
  .changelog { margin-top: 50px; }
  .changelog-item { padding: 16px; }
  
  .container { padding: 0 16px; }
  .mt-80 { margin-top: 50px; }
}

/* 响应式 - 小手机 */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .sports-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sport-card { padding: 16px 8px; }
  .sport-card i { font-size: 1.5rem; }
  .sport-card h3 { font-size: 0.8rem; }
  
  .download-card { padding: 30px 20px; }
  .download-icon { font-size: 3rem; }
  
  .btn { padding: 12px 20px; font-size: 0.9rem; }
  .btn-lg { padding: 14px 24px; font-size: 1rem; }
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* ===== 成绩查询页面样式 ===== */

/* 搜索区域 */
.rankings-search {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-input-group {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1.1rem;
}

.search-input-group input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input-group input:focus {
  border-color: #1677ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.search-filters select {
  padding: 14px 40px 14px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 1rem;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 16px center;
  appearance: none;
  cursor: pointer;
  min-width: 140px;
}

/* 赛事卡片网格 */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.event-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: #1677ff;
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.event-card .sport-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.event-card .access-code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.85rem;
  color: #666;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 6px;
}

.event-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.4;
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #666;
  font-size: 0.9rem;
}

.event-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-card-meta i {
  color: #999;
}

/* 加载和空状态 */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.loading-state i, .empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 8px;
}

.empty-state span {
  font-size: 0.9rem;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ri-spin {
  animation: spin 1s linear infinite;
}

/* ===== 赛事详情页样式 ===== */

.event-detail {
  padding-top: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.back-btn:hover {
  background: #e8e8e8;
  color: #333;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8faff 0%, #f0f5ff 100%);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  border: 1px solid #e6f0ff;
}

.event-info .sport-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #1677ff, #0958d9);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.event-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  color: #666;
  font-size: 0.95rem;
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-meta i {
  color: #1677ff;
}

.event-code {
  text-align: center;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.code-label {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
}

.code-value {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1677ff;
  letter-spacing: 1px;
}

/* 详情页标签切换 */
.detail-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.detail-content {
  width: 100%;
  overflow-x: auto;
}

.detail-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 0.95rem;
  color: #666;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.detail-tab:hover {
  color: #1677ff;
  background: #f5f8ff;
}

.detail-tab.active {
  color: #1677ff;
  font-weight: 600;
}

.detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1677ff;
}

/* 标签面板 */
.tab-panel {
  display: none;
  min-height: 300px;
}

.tab-panel.active {
  display: block;
}

.panel-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  color: #999;
  font-size: 1rem;
}

/* 成绩排名筛选器 - 加大尺寸便于查看 */
.standings-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.standings-filters .filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.standings-filters label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.standings-filters select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.standings-filters select:hover {
  border-color: var(--primary);
}

.standings-filters select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

/* 排名表格 */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.standings-table th,
.standings-table td {
  padding: 14px 16px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
}

.standings-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #6b7280;
  font-size: 0.85rem;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table tr:hover td {
  background: #f8faff;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #7a5c00;
}

.rank-badge.silver {
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  color: #555;
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: white;
}

/* ===== 日程表专用样式 ===== */
.schedule-table td {
  color: #374151 !important;
  /* 防止微信浏览器自动识别为链接 */
  -webkit-user-select: text;
  user-select: text;
}

/* 选手名称列 - 确保列名与选手姓名完全对齐（第3列：选手A，第5列：选手B） */
.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3), /* 选手A */
.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5)  /* 选手B */
{
  font-weight: 500;
  color: #1f2937 !important;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding-left: 0;
}

/* VS 列始终居中，宽度由内容自适应 */
.schedule-table .vs-cell,
.schedule-table td:nth-child(4) {
  text-align: center;
  color: #9ca3af !important;
  font-weight: 400;
  padding: 10px 4px;
}

/* 状态列样式 */
.schedule-table .status-done {
  color: #10b981 !important;
  font-weight: 500;
}

.schedule-table .status-playing {
  color: #f59e0b !important;
  font-weight: 500;
}

/* 成绩详情 */
.schedule-selector {
  margin-bottom: 20px;
}

.schedule-selector select {
  padding: 10px 16px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: 0.95rem;
  min-width: 200px;
}

/* 响应式 - 详情页 */
@media (max-width: 768px) {
  .event-header {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  
  .event-code {
    width: 100%;
  }
  
  .event-name {
    font-size: 1.4rem;
  }
  
  .event-meta {
    gap: 12px;
  }
  
  .detail-tabs {
    gap: 4px;
  }
  
  .detail-tab {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .detail-tab i {
    display: none;
  }
  
  .events-grid {
    grid-template-columns: 1fr;
  }
  
  .rankings-search {
    flex-direction: column;
  }
  
  .search-input-group {
    min-width: 100%;
  }
  
  .search-filters select {
    width: 100%;
  }

  .standings-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .standings-filters .filter-item {
    min-width: 100%;
  }

  .standings-filters label {
    font-size: 0.95rem;
  }

  .standings-filters select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .standings-table,
  .results-table,
  .schedule-table {
    font-size: 0.8rem;
  }
}

/* 空数据提示 */
.empty-hint {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 0.95rem;
}

/* 秩序册信息 */
.orderbook-info h4 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.orderbook-info h4 i {
  color: var(--primary);
}

/* 增强渲染样式 - 9个项目差异化显示 */

/* 赛程分组标题 */
.schedule-standings h4,
.schedule-results h4,
.schedule-draw h4,
.schedule-orderbook h5,
.schedule-day h4 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-standings h5,
.schedule-results h5,
.schedule-draw h5 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin: 16px 0 12px;
  padding: 10px 14px;
  background: #e6f4ff;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

/* 分组块间距（通用于所有标签页） */
.draw-block,
.standings-block,
.results-block,
.schedule-block {
  margin-bottom: 8px;
}

.draw-block + .draw-block,
.standings-block + .standings-block,
.results-block + .results-block,
.schedule-block + .schedule-block {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

/* 队伍分组 */
.team-entries h6 {
  color: var(--primary);
  font-size: 0.9rem;
  margin: 12px 0 8px;
  font-weight: 500;
}

/* 积分单元格高亮 */
.points-cell {
  font-weight: 600;
  color: var(--primary);
}

/* 正负差值颜色 */
.positive { color: #52c41a; }
.negative { color: #ff4d4f; }

/* 获胜者高亮 */
.winner {
  font-weight: 600;
  color: var(--primary);
}

/* 比分单元格 */
.score-cell {
  font-weight: 600;
  white-space: nowrap;
}

/* VS单元格 */
.vs-cell {
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  padding: 0 4px !important;
}

/* 弃权徽章 */
.walkover-badge {
  background: #ff4d4f;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* 弃权比分（W-L格式） */
.walkover-score {
  font-weight: 600;
  margin-right: 4px;
}

/* 平局徽章 */
.draw-badge {
  background: #faad14;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* 种子徽章 */
.seed-badge {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #333;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

/* 类别徽章 */
.category-badge {
  background: #e6f4ff;
  color: var(--primary);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* 状态样式 */
.status-done { color: #52c41a; }
.status-playing { color: #faad14; }

/* 排名徽章增强 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.85rem;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #333;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-badge.silver {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #333;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #b8722e);
  color: white;
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

/* 赛制徽章 */
.format-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.format-badge.round-robin {
  background: rgba(82, 196, 26, 0.2);
  color: #52c41a;
}

.format-badge.elimination {
  background: rgba(255, 77, 79, 0.2);
  color: #ff4d4f;
}

/* ===== 淘汰赛对阵图（Bracket）样式 - 专业级对称设计 ===== */
.bracket-container {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding: 20px 10px;
  gap: 0;
  min-height: 400px;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 180px;
  margin-right: 24px;
  position: relative;
  flex-shrink: 0;
}

.round-title {
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  padding: 8px 0 16px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.bracket-match {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;
  justify-content: center;
  min-height: 70px;
}

.bracket-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 3px 0;
  min-width: 150px;
  font-size: 0.85rem;
  transition: all 0.2s;
  position: relative;
}

.bracket-slot:hover {
  border-color: var(--primary);
  background: rgba(24, 144, 255, 0.05);
}

.bracket-slot.winner {
  border-color: #52c41a;
  background: rgba(82, 196, 26, 0.1);
}

/* 轮空比赛样式 */
.bracket-match.bye-match {
  opacity: 0.9;
}

.bracket-slot.bye-slot {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #999;
}

.bracket-slot.bye-slot .slot-name {
  font-style: italic;
  color: #999;
}

.bracket-slot.bye-advance {
  border-color: #1890ff;
  background: rgba(24, 144, 255, 0.1);
}

.bracket-slot.bye-advance .slot-score {
  color: #1890ff;
  font-size: 0.75rem;
}

.slot-position {
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 3px;
  min-width: 20px;
  text-align: center;
}

.slot-name {
  flex: 1;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-score {
  font-weight: 600;
  color: var(--primary);
  min-width: 24px;
  text-align: right;
  font-size: 0.85rem;
}

/* 成绩页淘汰赛对阵图 */
.elimination-bracket-results {
  margin: 16px 0;
}

.elimination-bracket-results > h5 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* 冠军区域 */
.bracket-champion {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 180px;
  padding: 0 15px;
}

.champion-title {
  color: #faad14;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  text-align: center;
}

.champion-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff9e6 0%, #fffbe6 100%);
  border: 2px solid #faad14;
  border-radius: 8px;
  min-width: 150px;
}

.champion-slot .trophy-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.champion-slot .champion-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #d48806;
  text-align: center;
}

/* 冠军已确定时的高亮样式 */
.champion-slot.determined {
  background: linear-gradient(135deg, #fff1b8 0%, #ffe58f 100%);
  border-color: #d48806;
  box-shadow: 0 4px 12px rgba(250, 173, 20, 0.3);
}

.champion-slot.determined .champion-name {
  color: #ad6800;
  font-size: 1rem;
}

/* ===== 连接线系统 - 标准淘汰赛对阵图样式 ===== */

/* 每场比赛的连接线容器 */
.bracket-match {
  position: relative;
  padding-right: 24px;
}

/* 第一个选手右侧水平线 + 向下的垂直线（┐形状） */
.bracket-round:not(.bracket-champion) .bracket-slot:first-child::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  width: 12px;
  height: calc(100% + 6px);
  border-top: 1px solid #bfbfbf;
  border-right: 1px solid #bfbfbf;
  border-top-right-radius: 4px;
  box-sizing: border-box;
}

/* 第二个选手右侧水平线 + 向上的垂直线（┘形状） */
.bracket-round:not(.bracket-champion) .bracket-slot:last-child::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: 50%;
  width: 12px;
  height: calc(100% + 6px);
  border-bottom: 1px solid #bfbfbf;
  border-right: 1px solid #bfbfbf;
  border-bottom-right-radius: 4px;
  box-sizing: border-box;
}

/* 连接到下一轮/冠军的水平线（从括号中点向右延伸） */
.bracket-round:not(.bracket-champion) .bracket-match::after {
  content: '';
  position: absolute;
  right: -24px;
  top: 50%;
  width: 24px;
  height: 1px;
  background: #bfbfbf;
}

/* 下一轮比赛的左侧入口线（在比赛中点位置） */
.bracket-round:not(:first-of-type):not(.bracket-champion) .bracket-match::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: #bfbfbf;
}

/* 冠军区域 */
.bracket-champion {
  position: relative;
  margin-left: 0;
  padding-left: 12px;
}

.bracket-champion::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: #bfbfbf;
}

/* ===== 名次赛样式 ===== */
.classification-matches-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px dashed var(--border);
}

.classification-title {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--primary);
}

.classification-group {
  margin-bottom: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 12px;
}

.classification-group-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.classification-match {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.classification-match .bracket-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.classification-match .bracket-slot:last-child {
  border-bottom: none;
}

.classification-match .bracket-slot.winner {
  background: rgba(82, 196, 26, 0.1);
}

.classification-match .bracket-slot.winner .slot-name {
  color: #52c41a;
  font-weight: 600;
}

.rank-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

/* ===== 循环赛对阵矩阵样式 ===== */
.round-robin-matrix {
  overflow-x: auto;
  margin: 16px 0;
}

.matrix-table {
  border-collapse: collapse;
  min-width: 100%;
}

.matrix-table th,
.matrix-table td {
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--border);
  min-width: 80px;
}

.matrix-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.matrix-table td.name-cell {
  text-align: left;
  font-weight: 500;
  background: var(--bg-light);
  position: sticky;
  left: 0;
  z-index: 1;
}

.matrix-table td.diagonal {
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    #d9d9d9 calc(50% - 1px),
    #d9d9d9 calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.matrix-table td.win {
  background: rgba(255, 77, 79, 0.08);
  color: #ff4d4f;
  font-weight: 600;
}

.matrix-table td.loss {
  background: transparent;
  color: #333;
  font-weight: 400;
}

.matrix-table td.draw {
  background: rgba(250, 173, 20, 0.1);
  color: #faad14;
  font-weight: 500;
}

/* 弃权比赛：胜方(W)红色 */
.matrix-table td.walkover-win {
  background: rgba(255, 77, 79, 0.08);
  color: #ff4d4f;
  font-weight: 700;
  font-size: 0.95rem;
}

/* 弃权比赛：负方(L)黑色 */
.matrix-table td.walkover-loss {
  background: transparent;
  color: #333;
  font-weight: 400;
  font-size: 0.95rem;
}

/* 双方弃权：灰色背景 */
.matrix-table td.double-forfeit {
  background: rgba(140, 140, 140, 0.1);
  color: #8c8c8c;
  font-weight: 500;
  font-size: 0.95rem;
}

.matrix-table td.clickable {
  cursor: pointer;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1); /* 微信浏览器点击反馈 */
  -webkit-touch-callout: none; /* 禁止长按菜单 */
  -webkit-user-select: none;
  user-select: none;
}

.matrix-table td.clickable:hover,
.matrix-table td.clickable:active {
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1;
  position: relative;
}

/* ===== 比赛详情弹窗样式（微信浏览器兼容） ===== */
.match-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9999; /* 确保在微信浏览器中覆盖其他元素 */
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
}

.modal-content {
  position: relative;
  background: #fff;
  -webkit-border-radius: 12px;
  border-radius: 12px;
  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  overflow-y: auto;
  -webkit-animation: modalFadeIn 0.2s ease;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
}

/* 9个运动项目的弹窗标题颜色（使用下划线格式） */
.modal-header.sport-badminton { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); }
.modal-header.sport-table_tennis { background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%); }
.modal-header.sport-volleyball { background: linear-gradient(135deg, #eb2f96 0%, #c41d7f 100%); }
.modal-header.sport-tug_of_war { background: linear-gradient(135deg, #722ed1 0%, #531dab 100%); }
.modal-header.sport-basketball { background: linear-gradient(135deg, #f5222d 0%, #cf1322 100%); }
.modal-header.sport-football { background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%); }
.modal-header.sport-swimming { background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); }
.modal-header.sport-guandan { background: linear-gradient(135deg, #faad14 0%, #d48806 100%); }
.modal-header.sport-doudizhu { background: linear-gradient(135deg, #a0d911 0%, #7cb305 100%); }

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

.match-players {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.match-players .player {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  padding: 8px 16px;
  background: #f5f5f5;
  border-radius: 6px;
}

.match-players .player.winner {
  background: linear-gradient(135deg, #fff1b8 0%, #ffe58f 100%);
  color: #ad6800;
  font-weight: 600;
}

.match-players .vs {
  font-size: 0.9rem;
  color: #999;
  font-weight: 600;
}

.final-score {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #1890ff;
  margin-bottom: 20px;
}

/* 特殊结果标签（弃权、平局等） */
.result-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.result-badge.walkover {
  background: #ff4d4f;
  color: white;
}

.result-badge.double-forfeit {
  background: #8c8c8c;
  color: white;
}

.result-badge.draw {
  background: #faad14;
  color: white;
}

/* 特殊结果详情内容 */
.special-result {
  text-align: center;
  padding: 24px 16px;
  background: #fafafa;
  border-radius: 8px;
}

.special-result i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.special-result p {
  margin: 6px 0;
  color: #595959;
}

.special-result p strong {
  color: #262626;
}

.walkover-result i {
  color: #52c41a;
}

.double-forfeit-result i {
  color: #8c8c8c;
}

.draw-result i {
  color: #faad14;
}

/* 特殊结果横向简洁布局 */
.special-result-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 16px;
  background: #fafafa;
  border-radius: 8px;
  font-size: 1rem;
}

.special-result-inline .result-item {
  color: #595959;
}

.special-result-inline .result-item strong {
  color: #262626;
}

.special-result-inline .result-item.loser {
  color: #ff4d4f;
}

.special-result-inline .result-item.loser strong {
  color: #ff4d4f;
}

.special-result-inline .result-item.winner {
  color: #52c41a;
}

.special-result-inline .result-item.winner strong {
  color: #52c41a;
}

.special-result-inline .result-divider {
  color: #bfbfbf;
  font-weight: 300;
}

.special-result-inline.double-forfeit-result .result-item {
  color: #8c8c8c;
}

.special-result-inline.draw-result .result-item {
  color: #faad14;
}

.game-details {
  margin-top: 16px;
}

.score-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.score-detail-table th,
.score-detail-table td {
  padding: 10px 16px;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.score-detail-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
  font-size: 0.9rem;
}

.score-detail-table td {
  font-size: 1rem;
}

.score-detail-table td.game-win {
  color: #ff4d4f;
  font-weight: 600;
  background: rgba(255, 77, 79, 0.05);
}

.score-detail-table tr:hover {
  background: #fafafa;
}

.score-detail-table tr.total-row {
  background: #f0f5ff;
  border-top: 2px solid #1890ff;
}

.score-detail-table tr.total-row td {
  font-weight: 600;
}

.no-detail {
  text-align: center;
  color: #999;
  padding: 20px;
}

/* ===== 9个项目专业化样式 ===== */

/* 羽毛球（BWF绿色） */
.modal-content.sport-badminton .score-detail-table thead th {
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  color: #fff;
}

/* 乒乓球（ITTF橙色） */
.modal-content.sport-table_tennis .score-detail-table thead th {
  background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%);
  color: #fff;
}

/* 气排球（CVA粉红） */
.modal-content.sport-volleyball .score-detail-table thead th {
  background: linear-gradient(135deg, #eb2f96 0%, #c41d7f 100%);
  color: #fff;
}

/* 拔河（TWIF紫色） */
.modal-content.sport-tug_of_war .score-detail-table thead th {
  background: linear-gradient(135deg, #722ed1 0%, #531dab 100%);
  color: #fff;
}

/* 标准徽章 */
.standard-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.header-title {
  display: flex;
  align-items: center;
}

/* 胜方单元格 */
.winner-cell {
  color: #52c41a;
  font-weight: 600;
}

/* 结果单元格 */
.result-cell {
  font-weight: 500;
}

/* ===== 拔河专业样式 ===== */
.score-detail-table.tug-of-war thead th {
  background: linear-gradient(135deg, #722ed1 0%, #531dab 100%);
  color: #fff;
}

.score-detail-table.tug-of-war .foul-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.7rem;
  background: #ff4d4f;
  color: #fff;
  border-radius: 3px;
  margin-left: 4px;
}

/* ===== 篮球专业样式 ===== */
.score-detail-table.basketball thead th {
  background: linear-gradient(135deg, #f5222d 0%, #cf1322 100%);
  color: #fff;
}

/* ===== 足球专业样式 ===== */
.score-detail-table.football thead th {
  background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%);
  color: #fff;
}

.score-detail-table.football .penalty-row {
  background: #fff7e6;
}

.score-detail-table.football .penalty-total-row {
  background: #ffe58f;
}

.score-detail-table.football .goal-detail {
  font-size: 0.85rem;
  color: #666;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 篮球加时样式 ===== */
.score-detail-table.basketball .overtime-row {
  background: #f0f5ff;
}

/* ===== 游泳专业样式 ===== */
.score-detail-table.swimming thead th {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  color: #fff;
}

.score-detail-table.swimming .time-cell {
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.score-detail-table.swimming tr.gold {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, transparent 100%);
}

.score-detail-table.swimming tr.silver {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, transparent 100%);
}

.score-detail-table.swimming tr.bronze {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.2) 0%, transparent 100%);
}

.score-detail-table.swimming .rank-cell.gold { color: #d4af37; font-weight: 700; }
.score-detail-table.swimming .rank-cell.silver { color: #a0a0a0; font-weight: 700; }
.score-detail-table.swimming .rank-cell.bronze { color: #cd7f32; font-weight: 700; }

/* ===== 掼蛋专业样式 ===== */
.score-detail-table.guandan thead th {
  background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
  color: #fff;
}

.score-detail-table.guandan .upgrade-cell {
  color: #722ed1;
  font-weight: 500;
}

/* ===== 斗地主专业样式 ===== */
.score-detail-table.doudizhu thead th {
  background: linear-gradient(135deg, #a0d911 0%, #7cb305 100%);
  color: #fff;
}

.score-detail-table.doudizhu .landlord-cell {
  color: #f5222d;
  font-weight: 600;
}

.score-detail-table.doudizhu .multiplier-cell {
  color: #722ed1;
  font-weight: 600;
}

.score-detail-table.doudizhu .landlord-win {
  color: #f5222d;
  font-weight: 600;
}

.score-detail-table.doudizhu .farmer-win {
  color: #52c41a;
  font-weight: 600;
}

.score-detail-table.doudizhu .score-up {
  color: #52c41a;
  font-weight: 600;
}

.score-detail-table.doudizhu .score-down {
  color: #f5222d;
  font-weight: 600;
}

/* ========================================
   9个项目排名表格专业化样式
   ======================================== */

/* 项目标签 */
.sport-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== 羽毛球（BWF 21分制）- 绿色系 ===== */
.standings-table.sport-badminton thead th { background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%); color: #fff; }
[data-sport="badminton"] .sport-tag { background: #52c41a; }

/* ===== 乒乓球（ITTF 11分制）- 橙色系 ===== */
.standings-table.sport-table_tennis thead th { background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%); color: #fff; }
[data-sport="table_tennis"] .sport-tag { background: #fa8c16; }

/* ===== 气排球（CVA 25分制）- 粉红系 ===== */
.standings-table.sport-volleyball thead th { background: linear-gradient(135deg, #eb2f96 0%, #c41d7f 100%); color: #fff; }
[data-sport="volleyball"] .sport-tag { background: #eb2f96; }

/* ===== 拔河（TWIF 回合制）- 紫色系 ===== */
.standings-table.sport-tug_of_war thead th { background: linear-gradient(135deg, #722ed1 0%, #531dab 100%); color: #fff; }
[data-sport="tug_of_war"] .sport-tag { background: #722ed1; }

/* ===== 篮球（FIBA 4节制）- 红色系 ===== */
.standings-table.sport-basketball thead th { background: linear-gradient(135deg, #f5222d 0%, #cf1322 100%); color: #fff; }
[data-sport="basketball"] .sport-tag { background: #f5222d; }

/* ===== 足球（FIFA 90分钟）- 青色系 ===== */
.standings-table.sport-football thead th { background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%); color: #fff; }
[data-sport="football"] .sport-tag { background: #13c2c2; }

/* ===== 游泳（FINA 计时制）- 蓝色系 ===== */
.standings-table.sport-swimming thead th { background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); color: #fff; }
[data-sport="swimming"] .sport-tag { background: #1890ff; }
.standings-table.sport-swimming .time-cell { 
  font-family: 'Courier New', monospace; 
  font-weight: 600; 
  letter-spacing: 0.5px;
}
.standings-table.sport-swimming .medal-gold { color: #d4af37; font-weight: 700; }
.standings-table.sport-swimming .medal-silver { color: #a0a0a0; font-weight: 700; }
.standings-table.sport-swimming .medal-bronze { color: #cd7f32; font-weight: 700; }

/* ===== 掼蛋（CGDA 升级制）- 金色系 ===== */
.standings-table.sport-guandan thead th { background: linear-gradient(135deg, #faad14 0%, #d48806 100%); color: #fff; }
[data-sport="guandan"] .sport-tag { background: #faad14; }
.standings-table.sport-guandan .level-cell { 
  font-weight: 700; 
  color: #722ed1;
  font-size: 1.1em;
  text-align: center;
}

/* ===== 斗地主（CDDL 积分制）- 青绿系 ===== */
.standings-table.sport-doudizhu thead th { background: linear-gradient(135deg, #a0d911 0%, #7cb305 100%); color: #fff; }
[data-sport="doudizhu"] .sport-tag { background: #a0d911; }
.standings-table.sport-doudizhu .total-score { 
  font-weight: 700; 
  color: #f5222d;
  font-size: 1.1em;
}

/* 正负值颜色 */
.standings-table .positive { color: #52c41a; font-weight: 600; }
.standings-table .negative { color: #f5222d; font-weight: 600; }

/* 选手名称列 */
.standings-table .entry-name {
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 积分列强调 */
.standings-table .points-cell {
  font-weight: 700;
  color: var(--primary);
}

/* ========================================
   多端响应式布局 - 5个断点
   ======================================== */

/* 大屏幕桌面端 (1920px+) */
@media (min-width: 1920px) {
  .modal-content {
    min-width: 500px;
    max-width: 800px;
  }
  
  .score-detail-table {
    font-size: 1.1rem;
  }
  
  .score-detail-table th,
  .score-detail-table td {
    padding: 14px 20px;
  }
  
  .match-players .player {
    font-size: 1.3rem;
    padding: 12px 24px;
  }
  
  .final-score {
    font-size: 2.5rem;
  }
}

/* 标准桌面端 (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
  .modal-content {
    min-width: 420px;
    max-width: 680px;
  }
}

/* 平板端 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .modal-content {
    min-width: 380px;
    max-width: 90vw;
  }
  
  .standings-table {
    font-size: 0.9rem;
  }
  
  .standings-table th,
  .standings-table td {
    padding: 10px 8px;
  }
  
  .bracket-round {
    min-width: 165px;
    margin-right: 20px;
  }
  
  .bracket-slot {
    padding: 10px 12px;
    min-width: 150px;
  }
}

/* 移动端 (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .standings-table {
    font-size: 0.85rem;
  }
  
  .standings-table th,
  .standings-table td {
    padding: 8px 6px;
  }
  
  /* 日程表列宽重新分配：时间/场地/选手A/VS/选手B/状态 */
  .schedule-table th:nth-child(1),
  .schedule-table td:nth-child(1) { /* 时间 */
    width: 18%;
  }
  .schedule-table th:nth-child(2),
  .schedule-table td:nth-child(2) { /* 场地 */
    width: 22%;
  }
  .schedule-table th:nth-child(3),
  .schedule-table td:nth-child(3) { /* 选手A */
    width: 22%;
  }
  .schedule-table th:nth-child(4),
  .schedule-table td:nth-child(4) { /* VS */
    width: 6%;
  }
  .schedule-table th:nth-child(5),
  .schedule-table td:nth-child(5) { /* 选手B */
    width: 22%;
    text-align: center;
  }
  .schedule-table th:nth-child(6),
  .schedule-table td:nth-child(6) { /* 状态 */
    width: 10%;
    text-align: center;
  }
  
  .bracket-container {
    padding: 12px 0;
  }
  
  .bracket-round {
    min-width: 150px;
    margin-right: 16px;
  }
  
  .bracket-slot {
    padding: 8px 10px;
    min-width: 135px;
  }
  
  .slot-name {
    font-size: 0.85rem;
  }
  
  /* 弹窗移动端适配 */
  .modal-content {
    min-width: 90vw;
    max-width: 95vw;
    margin: 10px;
    border-radius: 10px;
  }
  
  .modal-header {
    padding: 14px 16px;
  }
  
  .modal-header h3 {
    font-size: 1rem;
  }
  
  .modal-body {
    padding: 14px;
  }
  
  .match-players {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .match-players .player {
    font-size: 1rem;
    padding: 8px 14px;
  }
  
  .final-score {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }
  
  .score-detail-table th,
  .score-detail-table td {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  
  /* 对阵矩阵移动端 */
  .round-robin-matrix {
    overflow-x: auto;
  }
  
  .matrix-table {
    min-width: 400px;
  }
  
  .matrix-table td.clickable {
    min-width: 44px;
    min-height: 44px;
  }
}

/* 小屏移动端 (<480px) */
@media (max-width: 479px) {
  .standings-table {
    font-size: 0.8rem;
  }
  
  .standings-table th,
  .standings-table td {
    padding: 6px 4px;
    white-space: nowrap;
  }
  
  /* 小屏日程表：保留 时间 / 选手A / VS / 选手B，隐藏场地和状态 */
  .schedule-table th:nth-child(2),
  .schedule-table td:nth-child(2), /* 场地 */
  .schedule-table th:nth-child(6),
  .schedule-table td:nth-child(6)  /* 状态 */
  {
    display: none;
  }
  
  .results-table th:nth-child(5),
  .results-table td:nth-child(5) {
    display: none;
  }
  
  /* 淘汰赛对阵图横向滚动 */
  .bracket-container {
    padding: 8px 0;
    overflow-x: auto;
  }
  
  .bracket-round {
    min-width: 130px;
    margin-right: 12px;
  }
  
  .bracket-slot {
    padding: 6px 8px;
    min-width: 115px;
    font-size: 0.8rem;
  }
  
  .slot-name {
    font-size: 0.75rem;
  }
  
  .slot-score {
    font-size: 0.7rem;
  }
  
  .round-title {
    font-size: 0.75rem;
    padding: 6px 0 10px;
  }
  
  /* 弹窗全屏模式 */
  .match-detail-modal {
    padding: 0;
  }
  
  .modal-content {
    min-width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  
  .modal-header {
    padding: 12px 14px;
    border-radius: 0;
  }
  
  .modal-header h3 {
    font-size: 0.95rem;
  }
  
  .standard-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  
  .modal-body {
    padding: 12px;
    max-height: calc(100vh - 50px);
  }
  
  .match-players {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .match-players .player {
    font-size: 0.95rem;
    padding: 6px 12px;
  }
  
  .match-players .vs {
    font-size: 0.8rem;
  }
  
  .final-score {
    font-size: 1.4rem;
    margin-bottom: 14px;
  }
  
  .game-details {
    overflow-x: auto;
  }
  
  .score-detail-table {
    min-width: 300px;
  }
  
  .score-detail-table th,
  .score-detail-table td {
    padding: 6px 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  
  /* 对阵矩阵小屏适配 */
  .round-robin-matrix {
    overflow-x: auto;
    margin: 0 -12px;
    padding: 0 12px;
  }
  
  .matrix-table {
    min-width: 320px;
  }
  
  .matrix-table th,
  .matrix-table td {
    padding: 6px 4px;
    font-size: 0.75rem;
  }
  
  .matrix-table td.name-cell {
    font-size: 0.7rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* 触摸友好的点击区域 */
  .matrix-table td.clickable {
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
  }
  
  /* 筛选器小屏适配 */
  .standings-filters {
    flex-direction: column;
    gap: 8px;
  }
  
  .filter-item {
    width: 100%;
  }
  
  .filter-item select {
    width: 100%;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 增大可点击区域 */
  .matrix-table td.clickable {
    min-width: 44px;
    min-height: 44px;
  }
  
  .modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 移除悬停效果，使用激活效果 */
  .matrix-table td.clickable:hover {
    transform: none;
    box-shadow: none;
  }
  
  .matrix-table td.clickable:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.05);
  }
}

/* 横屏移动设备 */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-content {
    max-height: 95vh;
  }
  
  .modal-body {
    max-height: calc(95vh - 50px);
    padding: 10px;
  }
  
  .match-players {
    flex-direction: row;
    gap: 12px;
  }
  
  .final-score {
    font-size: 1.2rem;
    margin: 10px 0;
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .score-detail-table {
    border-width: 0.5px;
  }
  
  .score-detail-table th,
  .score-detail-table td {
    border-width: 0.5px;
  }
}

/* 安全区域适配（iPhone 刘海屏等） */
@supports (padding: env(safe-area-inset-top)) {
  .modal-content {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  @media (max-width: 479px) {
    .modal-header {
      padding-top: calc(12px + env(safe-area-inset-top));
    }
    
    .modal-body {
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
  }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
  
  .modal-content {
    background: #1f1f1f;
    color: #e0e0e0;
  }
  
  .score-detail-table {
    background: #1f1f1f;
  }
  
  .score-detail-table th {
    background: #333;
  }
  
  .score-detail-table td {
    border-color: #333;
  }
  
  .score-detail-table tr:hover {
    background: #2a2a2a;
  }
  
  .match-players .player {
    background: #333;
    color: #e0e0e0;
  }
  
  .no-detail {
    color: #888;
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .modal-content {
    animation: none;
  }
  
  .matrix-table td.clickable {
    transition: none;
  }
  
  .matrix-table td.clickable:hover {
    transform: none;
  }
}

/* ===== 局制项目详情表格专属样式（羽毛球/乒乓球/气排球）===== */
/* 羽毛球（BWF 21分制）- 绿色系 */
.score-detail-table.badminton thead th {
  background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
  color: #fff;
}

/* 乒乓球（ITTF 11分制）- 橙色系 */
.score-detail-table.table_tennis thead th {
  background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%);
  color: #fff;
}

/* 气排球（CVA 25分制）- 粉红系 */
.score-detail-table.volleyball thead th {
  background: linear-gradient(135deg, #eb2f96 0%, #c41d7f 100%);
  color: #fff;
}

/* 打印样式 */
@media print {
  .modal-overlay {
    display: none;
  }
  
  .modal-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .modal-close {
    display: none;
  }
}

/* ===== 双败淘汰赛对阵图样式 ===== */
.double-elimination-bracket {
  margin: 20px 0;
  padding: 15px;
  background: #fafafa;
  border-radius: 8px;
}

.double-elimination-bracket h5 {
  margin: 0 0 15px 0;
  color: var(--primary);
  font-size: 1.1rem;
  text-align: center;
}

.double-elim-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.double-elim-section {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.double-elim-section .section-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid;
}

/* 胜者组样式 - 绿色主题 */
.winners-bracket .section-title {
  color: #52c41a;
  border-color: #52c41a;
}

.winners-bracket .bracket-slot.winner {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  border-color: #52c41a;
}

/* 败者组样式 - 橙色主题 */
.losers-bracket .section-title {
  color: #fa8c16;
  border-color: #fa8c16;
}

.losers-bracket .bracket-slot.winner {
  background: linear-gradient(135deg, #fff7e6 0%, #ffd591 100%);
  border-color: #fa8c16;
}

/* 总决赛样式 - 紫色主题 */
.grand-final-section {
  width: 100%;
  max-width: 400px;
  margin: 20px auto 0;
  text-align: center;
}

.grand-final-section .section-title {
  color: #722ed1;
  border-color: #722ed1;
  font-size: 1.1rem;
}

.grand-final-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.grand-final-match {
  background: linear-gradient(135deg, #f9f0ff 0%, #efdbff 100%);
  border-radius: 8px;
  padding: 12px;
  border: 2px solid #722ed1;
}

.grand-final-match .match-title {
  font-weight: 600;
  color: #722ed1;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.grand-final-reset {
  opacity: 0.7;
  border-style: dashed;
}

.grand-final-match .bracket-match {
  margin: 0;
}

.grand-final-match .bracket-slot.winner {
  background: linear-gradient(135deg, #722ed1 0%, #9254de 100%);
  color: #fff;
  border-color: #531dab;
}

.grand-final-match .bracket-slot.winner .slot-name,
.grand-final-match .bracket-slot.winner .slot-score {
  color: #fff;
}

/* 双败淘汰赛响应式 */
@media (max-width: 768px) {
  .double-elim-layout {
    flex-direction: column;
  }
  
  .double-elim-section {
    max-width: 100%;
  }
  
  .grand-final-section {
    max-width: 100%;
  }
}
