/* OMRG 官网样式 - 浅色清爽主题 */

/* 防止浏览器自动调整字体（不影响用户双指缩放） */
/* stylelint-disable property-no-vendor-prefix */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}
/* stylelint-enable property-no-vendor-prefix */

:root {
  --primary: #1890ff;
  --primary-dark: #096dd9;
  --primary-light: #e6f4ff;
  --gradient: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-section: #f0f5ff;
  --bg-alt: #f5f7fa;
  --bg-hover: rgba(22, 119, 255, 0.04);
  --card-bg: #ffffff;
  --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 10px 25px rgba(0,0,0,0.15);
}

* { 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;
  /* stylelint-disable property-no-vendor-prefix */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* stylelint-enable property-no-vendor-prefix */
  font-size: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
}

 body.scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
 }

 img,
 svg,
 video,
 canvas {
  max-width: 100%;
  height: 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: 1080; 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; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-logo-icon { width: 32px; height: 32px; object-fit: contain; }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-link { color: var(--text-muted); text-decoration: none; transition: color 0.3s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.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; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; position: relative; z-index: 1060; }

 .nav-overlay {
  display: none;
 }

/* 页面切换 */
.page { display: none; min-height: 100vh; min-height: 100svh; padding-top: 70px; }
.page.active { display: block; }

/* Hero */
.hero { min-height: calc(100vh - 70px); min-height: calc(100svh - 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); min-height: calc(100svh - 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(3, 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; min-height: 44px; }
.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 { 
  background: #1f2937;
  color: #9ca3af;
  padding: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.footer-disclaimer,
.footer-terms {
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-disclaimer h4,
.footer-terms h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-disclaimer p,
.footer-terms p {
  color: #9ca3af;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 16px;
  }
  
  .footer-disclaimer,
  .footer-terms {
    font-size: 0.8rem;
  }
}

/* Toast提示 */
.toast { position: fixed; bottom: calc(30px + env(safe-area-inset-bottom)); 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; min-height: 44px; touch-action: manipulation; }
.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: 1024px) {
  section { padding: 90px 0; }
  .container { padding: 0 18px; }
  .hero { padding: 44px 18px; }
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1.15rem; }
  .section-title { font-size: 2.1rem; }
  .section-subtitle { font-size: 1.05rem; }
}

/* 响应式 - 平板 */
@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-overlay {
    display: none !important;
    pointer-events: none !important;
  }

  .nav-overlay.active {
    display: none !important;
    pointer-events: none !important;
  }

  .nav-menu { 
    display: none;
    position: fixed; 
    top: 70px;
    left: 0; 
    right: 0;
    max-height: calc(100vh - 70px);
    max-height: calc(100svh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff; 
    flex-direction: column; 
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); 
    gap: 14px; 
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    z-index: 1050;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-menu.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.has-beta-banner .nav-menu {
    top: 126px;
    max-height: calc(100vh - 126px);
    max-height: calc(100svh - 126px);
  }

  .nav-link {
    display: block;
    padding: 10px 4px;
  }

  .nav-toggle { display: flex; }
  
  .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;
  min-height: 44px;
}

.search-input-group input:focus {
  border-color: #1890ff;
  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;
  min-height: 44px;
}

/* 赛事卡片网格 */
.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: #1890ff;
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.event-card .sport-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  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;
  max-width: min(240px, 70%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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;
  min-height: 44px;
  touch-action: manipulation;
}

.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 {
  flex: 1 1 auto;
  min-width: 0;
 }

.event-info .sport-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  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;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

 .event-meta span span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
 }

.event-meta i {
  color: #1890ff;
}

.event-code {
  text-align: center;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex: 0 0 auto;
  max-width: min(260px, 40vw);
}

.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: #1890ff;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 详情页标签切换 */
.detail-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.detail-content {
  width: 100%;
  overflow-x: visible;
}

 .table-scroll {
  --sticky-col-1: 56px;
  --sticky-col-2: clamp(140px, 26vw, 220px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
 }

 .table-scroll > table {
  width: max-content;
  min-width: 100%;
 }

 .table-scroll > .standings-table {
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: visible;
 }

 .table-scroll th,
 .table-scroll td {
  white-space: nowrap;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) th:nth-child(1),
 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) td:nth-child(1) {
  position: sticky;
  left: 0;
  min-width: var(--sticky-col-1);
  width: var(--sticky-col-1);
  z-index: 3;
  box-shadow: 1px 0 0 #e5e7eb;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) th:nth-child(2),
 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) td:nth-child(2) {
  position: sticky;
  left: var(--sticky-col-1);
  min-width: var(--sticky-col-2);
  z-index: 2;
  box-shadow: 1px 0 0 #e5e7eb;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) td:nth-child(2) {
  max-width: var(--sticky-col-2);
  overflow: hidden;
  text-overflow: ellipsis;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) th:nth-child(1),
 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) th:nth-child(2) {
  background: #f3f4f6;
  z-index: 4;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) td:nth-child(1),
 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) td:nth-child(2) {
  background: #ffffff;
 }

 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) tr:hover td:nth-child(1),
 .table-scroll .standings-table:not(.results-table):not(.schedule-table):not(.draw-table) tr:hover td:nth-child(2) {
  background: #f8faff;
 }

 .table-scroll .schedule-table th:nth-child(1),
 .table-scroll .schedule-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 #e5e7eb;
 }

 .table-scroll .schedule-table th:nth-child(6),
 .table-scroll .schedule-table td:nth-child(6) {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -1px 0 0 #e5e7eb;
 }

 .table-scroll .schedule-table th:nth-child(1),
 .table-scroll .schedule-table th:nth-child(6) {
  background: #f3f4f6;
  z-index: 4;
 }

 .table-scroll .schedule-table td:nth-child(1),
 .table-scroll .schedule-table td:nth-child(6) {
  background: #ffffff;
 }

 .table-scroll .schedule-table tr:hover td:nth-child(1),
 .table-scroll .schedule-table tr:hover td:nth-child(6) {
  background: #f8faff;
 }

 .table-scroll .results-table th:nth-child(1),
 .table-scroll .results-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 #e5e7eb;
 }

 .table-scroll .results-table th:last-child,
 .table-scroll .results-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -1px 0 0 #e5e7eb;
 }

 .table-scroll .results-table th:nth-child(1),
 .table-scroll .results-table th:last-child {
  background: #f3f4f6;
  z-index: 4;
 }

 .table-scroll .results-table td:nth-child(1),
 .table-scroll .results-table td:last-child {
  background: #ffffff;
 }

 .table-scroll .results-table tr:hover td:nth-child(1),
 .table-scroll .results-table tr:hover td:last-child {
  background: #f8faff;
 }

 .table-scroll .draw-table th:nth-child(1),
 .table-scroll .draw-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 #e5e7eb;
 }

 .table-scroll .draw-table.draw-has-time th:last-child,
 .table-scroll .draw-table.draw-has-time td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -1px 0 0 #e5e7eb;
 }

 .table-scroll .draw-table th:nth-child(1),
 .table-scroll .draw-table.draw-has-time th:last-child {
  background: #f3f4f6;
  z-index: 4;
 }

 .table-scroll .draw-table td:nth-child(1),
 .table-scroll .draw-table.draw-has-time td:last-child {
  background: #ffffff;
 }

 .table-scroll .draw-table tr:hover td:nth-child(1),
 .table-scroll .draw-table.draw-has-time tr:hover td:last-child {
  background: #f8faff;
 }

.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;
  min-height: 44px;
  touch-action: manipulation;
}

.detail-tab:hover {
  color: #1890ff;
  background: #f5f8ff;
}

.detail-tab.active {
  color: #1890ff;
  font-weight: 600;
}

.detail-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1890ff;
}

/* 标签面板 */
.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;
  min-height: 44px;
  touch-action: manipulation;
}

.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;
  width: auto;
  min-height: 44px;
  touch-action: manipulation;
}

/* 响应式 - 详情页 */
@media (max-width: 768px) {
  .table-scroll {
    --sticky-col-1: 48px;
    --sticky-col-2: clamp(120px, 44vw, 200px);
  }

  .schedule-selector select {
    width: 100%;
    min-width: 0;
  }

  .schedule-table th:nth-child(3),
  .schedule-table td:nth-child(3),
  .schedule-table th:nth-child(5),
  .schedule-table td:nth-child(5) {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .event-header {
    flex-direction: column;
    gap: 20px;
    padding: 24px;
  }
  
  .event-code {
    width: 100%;
    max-width: 100%;
  }
  
  .event-name {
    font-size: 1.4rem;
  }
  
  .event-meta {
    gap: 12px;
  }
  
  .detail-tabs {
    justify-content: flex-start;
    gap: 4px;
  }
  
  .detail-tab {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  .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;
    min-height: 44px;
    touch-action: manipulation;
  }

  .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-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;
  max-height: 80svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -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;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  max-height: calc(80vh - 60px);
  max-height: calc(80svh - 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;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

 .game-details > table {
  width: max-content;
  min-width: 100%;
 }

 .score-detail-table .rankings-row td {
  padding: 10px 12px;
 }

 .card-rankings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
 }

 .card-ranking-item {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  background: #fbfdff;
  border-radius: 10px;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
 }

 .card-ranking-item strong {
  white-space: nowrap;
  color: #111827;
 }

.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个项目专业化样式 ===== */

/* 项目标签 */
.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;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  section { padding: 80px 0; }

  .rankings-search {
    flex-direction: row;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .search-input-group {
    flex: 1 1 320px;
    min-width: 0;
  }

  .search-input-group input {
    padding: 12px 14px 12px 44px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .search-filters {
    flex: 0 0 clamp(140px, 24vw, 180px);
  }

  .search-filters select {
    padding: 12px 36px 12px 14px;
    font-size: 0.95rem;
    min-width: 0;
    width: 100%;
    border-radius: 10px;
    background-position: right 14px center;
  }

  .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }

  .event-card {
    padding: 18px;
  }

  .event-card-title {
    font-size: 1.05rem;
    margin-bottom: 10px;
  }

  .event-card-meta {
    gap: 12px;
    font-size: 0.85rem;
  }

  .event-header {
    flex-direction: row;
    padding: 22px;
    margin-bottom: 24px;
  }

  .event-name {
    font-size: 1.55rem;
    margin-bottom: 12px;
  }

  .event-meta {
    gap: 16px;
    font-size: 0.9rem;
  }

  .event-code {
    width: auto;
    padding: 12px 16px;
  }

  .code-value {
    font-size: 1.2rem;
  }

  .detail-tabs {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 18px;
  }

  .detail-tab {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .detail-tab i {
    display: inline-block;
  }

  .standings-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 12px;
  }

  .standings-filters .filter-item {
    min-width: 0;
  }

  .standings-filters label {
    font-size: 0.85rem;
  }

  .standings-filters select {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .standings-table {
    font-size: 0.88rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 9px 8px;
  }

  .standings-table .entry-name {
    max-width: 120px;
  }

  .schedule-table,
  .results-table {
    font-size: 0.86rem;
  }

  .schedule-table th,
  .schedule-table td,
  .results-table th,
  .results-table td {
    padding: 8px 6px;
  }

  .schedule-table th:nth-child(3),
  .schedule-table td:nth-child(3),
  .schedule-table th:nth-child(5),
  .schedule-table td:nth-child(5) {
    max-width: 120px;
  }

  .schedule-table td:nth-child(3),
  .schedule-table td:nth-child(5) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .schedule-table {
    table-layout: fixed;
  }

  .table-scroll > .schedule-table,
  .table-scroll > .results-table,
  .table-scroll > .draw-table {
    width: 100%;
  }

  .schedule-table th:nth-child(1),
  .schedule-table td:nth-child(1) {
    width: 96px;
  }

  .schedule-table th:nth-child(2),
  .schedule-table td:nth-child(2) {
    width: 72px;
  }

  .schedule-table th:nth-child(4),
  .schedule-table td:nth-child(4) {
    width: 36px;
  }

  .schedule-table th:nth-child(6),
  .schedule-table td:nth-child(6) {
    width: 76px;
  }

  .results-table {
    table-layout: fixed;
  }

  .results-table th:nth-child(1),
  .results-table td:nth-child(1) {
    width: 64px;
  }

  .results-table th:nth-child(2),
  .results-table td:nth-child(2),
  .results-table th:nth-child(4),
  .results-table td:nth-child(4) {
    width: 180px;
  }

  .results-table td:nth-child(2),
  .results-table td:nth-child(4) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .results-table th:nth-child(3),
  .results-table td:nth-child(3) {
    width: 92px;
  }

  .results-table th:nth-child(5),
  .results-table td:nth-child(5) {
    width: 76px;
  }

  .results-table th:nth-child(6),
  .results-table td:nth-child(6) {
    width: 76px;
  }

  .results-table.results-doudizhu th:nth-child(1),
  .results-table.results-doudizhu td:nth-child(1) {
    width: 56px;
  }

  .results-table.results-doudizhu th:nth-child(2),
  .results-table.results-doudizhu td:nth-child(2),
  .results-table.results-doudizhu th:nth-child(3),
  .results-table.results-doudizhu td:nth-child(3),
  .results-table.results-doudizhu th:nth-child(4),
  .results-table.results-doudizhu td:nth-child(4) {
    width: 120px;
  }

  .results-table.results-doudizhu td:nth-child(2),
  .results-table.results-doudizhu td:nth-child(3),
  .results-table.results-doudizhu td:nth-child(4) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .results-table.results-doudizhu th:nth-child(5),
  .results-table.results-doudizhu td:nth-child(5) {
    width: 92px;
  }

  .results-table.results-doudizhu th:nth-child(6),
  .results-table.results-doudizhu td:nth-child(6),
  .results-table.results-doudizhu th:nth-child(7),
  .results-table.results-doudizhu td:nth-child(7) {
    width: 76px;
  }

  .draw-table {
    table-layout: fixed;
  }

  .draw-table th:nth-child(1),
  .draw-table td:nth-child(1) {
    width: 72px;
  }

  .draw-table th:nth-child(2),
  .draw-table td:nth-child(2) {
    width: 220px;
  }

  .draw-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .draw-table th:nth-child(3),
  .draw-table td:nth-child(3) {
    width: 180px;
  }

  .draw-table td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .draw-table th:nth-child(4),
  .draw-table td:nth-child(4) {
    width: 160px;
  }

  .modal-content {
    min-width: 360px;
    max-width: 85vw;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 14px;
  }

  .final-score {
    font-size: 1.8rem;
  }

  .score-detail-table {
    font-size: 0.92rem;
  }

  .score-detail-table th,
  .score-detail-table td {
    padding: 8px 10px;
  }

  .bracket-round {
    min-width: 150px;
    margin-right: 16px;
  }

  .bracket-slot {
    padding: 8px 10px;
    min-width: 135px;
  }

  .matrix-table td.clickable {
    min-width: 42px;
    min-height: 42px;
  }

  .table-scroll {
    border-radius: 12px;
  }

  .schedule-standings h4,
  .schedule-results h4,
  .schedule-draw h4,
  .schedule-orderbook h5,
  .schedule-day h4 {
    font-size: 1rem;
    margin: 16px 0 10px;
  }

  .schedule-standings h5,
  .schedule-results h5,
  .schedule-draw h5 {
    font-size: 0.95rem;
    margin: 10px 0 8px;
  }

  .draw-block,
  .standings-block,
  .results-block,
  .schedule-block {
    margin-bottom: 6px;
  }

  .draw-block + .draw-block,
  .standings-block + .standings-block,
  .results-block + .results-block,
  .schedule-block + .schedule-block {
    padding-top: 12px;
    margin-top: 6px;
  }
}

/* 移动端 (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;
  }
  
  .standard-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  
  .modal-body {
    padding: 14px;
    max-height: calc(95vh - 50px);
    max-height: calc(95svh - 50px);
  }
  
  .match-players {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .match-players .player {
    font-size: 1rem;
    padding: 6px 12px;
  }
  
  .match-players .vs {
    font-size: 0.8rem;
  }
  
  .final-score {
    font-size: 1.6rem;
    margin: 10px 0;
  }
  
  .game-details {
    overflow-x: auto;
  }
  
  .score-detail-table {
    min-width: 300px;
  }

  .card-rankings {
    grid-template-columns: 1fr;
  }

  .card-ranking-item {
    font-size: 0.9rem;
    padding: 9px 10px;
    border-radius: 9px;
  }
  
  .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%;
    min-height: 44px;
    touch-action: manipulation;
  }

  .standings-filters select {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
}

/* 触摸设备优化 */
@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: 0;
  }

  .modal-header {
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
  }

  .modal-body {
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  @media (max-width: 479px) {
    .modal-header {
      padding-top: calc(12px + env(safe-area-inset-top));
      padding-left: calc(14px + env(safe-area-inset-left));
      padding-right: calc(14px + env(safe-area-inset-right));
    }

    .modal-body {
      padding-left: calc(12px + env(safe-area-inset-left));
      padding-right: calc(12px + env(safe-area-inset-right));
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
  }
}

 .ranking-tabs {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
 }

 .tab-btn {
  min-height: 44px;
 }

 @media (hover: none) and (pointer: coarse) {
  .tab-btn {
    min-height: 44px;
  }
 }

 .ranking-table th,
 .ranking-table td {
  white-space: nowrap;
 }

/* 暗色模式支持 */
@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%;
  }
}

/* ===== 在线报名页面样式 ===== */

.registration {
  padding: 80px 0;
  min-height: calc(100vh - 70px);
  background: var(--bg-section);
}

/* 用户栏 */
.reg-user-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.reg-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reg-user-name {
  color: var(--text);
  font-weight: 500;
}

/* 报名按钮样式 */
.reg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.reg-btn-primary {
  background: var(--gradient);
  color: white;
}

.reg-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

.reg-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.reg-btn-outline {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}

.reg-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.reg-btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.reg-btn-block {
  width: 100%;
}

.reg-btn-add {
  margin-top: 12px;
}

/* 内容区域 */
.reg-content {
  min-height: 400px;
}

/* 赛事列表页 */
.reg-list-page {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 搜索区域 */
.reg-search-section {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.reg-search-input-group {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.reg-search-input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.reg-search-input-group input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  min-height: 44px;
}

.reg-search-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.reg-search-filters select {
  padding: 12px 36px 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  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 12px center;
  appearance: none;
  cursor: pointer;
  min-height: 44px;
}

/* 赛事卡片网格 */
.reg-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.reg-event-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.reg-event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

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

.reg-sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.reg-schedule-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.reg-event-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.reg-event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.reg-event-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reg-event-schedules-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reg-schedule-tag {
  padding: 2px 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reg-schedule-tag.open {
  background: rgba(82, 196, 26, 0.1);
  color: #52c41a;
}

.reg-schedule-more {
  padding: 2px 8px;
  color: var(--primary);
  font-size: 0.75rem;
}

/* 加载和空状态 */
.reg-loading-state,
.reg-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.reg-loading-state i,
.reg-empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  color: var(--text-dim);
}

.reg-empty-state p {
  font-size: 1rem;
  margin-bottom: 8px;
}

.reg-empty-state span {
  font-size: 0.85rem;
}


/* 返回按钮 */
.reg-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
  min-height: 44px;
  touch-action: manipulation;
}

.reg-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 赛事详情页 */
.reg-detail-page {
  animation: fadeIn 0.3s ease;
}

.reg-event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.reg-event-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reg-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.reg-event-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

 .reg-event-meta span span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
 }

.reg-event-meta i {
  color: var(--primary);
}

/* 赛程选择区域 */
.reg-schedules-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
}

.reg-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.reg-schedules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.reg-schedule-card {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.reg-schedule-card:not(.disabled):hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.1);
}

.reg-schedule-card.disabled {
  opacity: 0.6;
}

.reg-schedule-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.reg-schedule-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.reg-status-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.reg-status-badge.open {
  background: rgba(82, 196, 26, 0.15);
  color: #52c41a;
}

.reg-status-badge.not_started {
  background: rgba(22, 119, 255, 0.15);
  color: var(--primary);
}

.reg-status-badge.ended {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

.reg-status-badge.full {
  background: rgba(255, 77, 79, 0.15);
  color: #ff4d4f;
}

.reg-status-badge.pending {
  background: rgba(250, 173, 20, 0.15);
  color: #d48806;
}

.reg-status-badge.approved {
  background: rgba(82, 196, 26, 0.15);
  color: #52c41a;
}

.reg-status-badge.rejected {
  background: rgba(255, 77, 79, 0.15);
  color: #ff4d4f;
}

.reg-schedule-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.reg-schedule-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reg-schedule-notes {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 8px 0 0;
  line-height: 1.5;
}

.reg-schedule-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.reg-btn-register {
  width: 100%;
}

/* 报名方式选择 */
.reg-type-select-page {
  animation: fadeIn 0.3s ease;
}

.reg-type-header {
  text-align: center;
  margin-bottom: 32px;
}

.reg-type-header h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 8px;
}

.reg-type-header p {
  color: var(--text-muted);
}

.reg-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.reg-type-card {
  background: white;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.reg-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.reg-type-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reg-type-icon i {
  font-size: 1.8rem;
  color: var(--primary);
}

.reg-type-card h4 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.reg-type-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* 报名表单页 */
.reg-form-page {
  animation: fadeIn 0.3s ease;
  max-width: 700px;
  margin: 0 auto;
}

.reg-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.reg-form-header h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 4px;
}

.reg-form-header p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.reg-entry-type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.reg-form {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
}

.reg-form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.reg-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.reg-form-section h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 手机号+验证码行布局 */
.reg-phone-verify-row {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 12px;
  align-items: end;
}

.reg-phone-group,
.reg-code-group,
.reg-send-btn-group {
  margin-bottom: 16px;
}

.reg-phone-group label,
.reg-code-group label,
.reg-send-btn-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.reg-code-group input {
  width: 100%;
  text-align: center;
  letter-spacing: 4px;
  font-family: monospace;
}

/* 手机号和验证码输入框样式（与其他输入框一致） */
.reg-phone-group input,
.reg-code-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-phone-group input:focus,
.reg-code-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.reg-phone-group input::placeholder,
.reg-code-group input::placeholder {
  color: var(--text-dim);
}

/* 验证码输入框特殊样式 */
.reg-code-group input {
  text-align: center;
  letter-spacing: 4px;
  font-family: monospace;
}

.reg-send-btn-group .reg-btn {
  white-space: nowrap;
  min-width: 100px;
  height: 42px;
  padding: 10px 16px;
}

.reg-send-btn-group .reg-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.reg-code-hint {
  margin-top: -8px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.reg-form-group {
  margin-bottom: 16px;
}

.reg-form-group:last-child {
  margin-bottom: 0;
}

.reg-form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.reg-form-group label .required {
  color: #ff4d4f;
}

.reg-form-group input,
.reg-form-group select,
.reg-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-form-group input:focus,
.reg-form-group select:focus,
.reg-form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.reg-form-group input::placeholder,
.reg-form-group textarea::placeholder {
  color: var(--text-dim);
}

.reg-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.reg-form-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* 单选按钮组（性别选择） */
.reg-radio-group {
  display: flex;
  gap: 16px;
  padding: 8px 0;
}

.reg-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0;
}

.reg-radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

@media (max-width: 480px) {
  .reg-radio-group {
    gap: 20px;
  }
  
  .reg-radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
  }
}

.reg-input-with-btn {
  display: flex;
  gap: 8px;
}

.reg-input-with-btn input {
  flex: 1;
}

.reg-input-with-btn .reg-btn {
  white-space: nowrap;
}

/* 运动员/配对/队员列表项 */
.reg-athlete-item,
.reg-pair-item,
.reg-member-item {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.reg-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--text);
}

.reg-btn-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.reg-btn-remove:hover {
  background: #ff4d4f;
  color: white;
}

.reg-pair-athletes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.reg-pair-athlete h5 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.reg-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.reg-form-actions .reg-btn {
  flex: 1;
}

/* 弹窗样式 */
.reg-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.reg-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  max-height: 90svh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.reg-modal-sm {
  max-width: 360px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.reg-modal-header h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

.reg-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.reg-modal-close:hover {
  background: var(--bg-light);
  color: var(--text);
}

.reg-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
  max-height: calc(90svh - 140px);
  -webkit-overflow-scrolling: touch;
}

.reg-modal-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.reg-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.reg-modal-footer .reg-btn {
  flex: 1;
}

.reg-error-text {
  color: #ff4d4f;
  font-size: 0.85rem;
  margin-top: 8px;
}

/* 登录弹窗 */
.reg-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.reg-auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: var(--bg-light);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.reg-auth-tab.active {
  background: var(--primary);
  color: white;
}

.reg-auth-panel {
  display: none;
}

.reg-auth-panel.active {
  display: block;
}


/* 报名成功页 */
.reg-success-page {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 0.3s ease;
}

.reg-success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.reg-success-page h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 12px;
}

.reg-success-info {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.reg-success-id {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 24px;
}

.reg-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 我的报名页 */
.reg-my-page {
  animation: fadeIn 0.3s ease;
}

.reg-my-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.reg-my-header h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 0;
}

.reg-my-query {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.reg-my-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reg-my-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

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

.reg-my-event-name {
  font-weight: 600;
  color: var(--text);
}

.reg-my-item-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 4px 0;
}

.reg-my-item-body strong {
  color: var(--text);
}

.reg-my-item-time {
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  margin-top: 8px !important;
}

.reg-my-item-reason {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 77, 79, 0.08);
  border-radius: 6px;
  color: #ff4d4f;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.reg-my-item-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.reg-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reg-input-with-btn {
  display: flex;
  gap: 8px;
}

.reg-input-with-btn input {
  flex: 1;
}

.reg-input-with-btn button {
  flex-shrink: 0;
}

/* 响应式 - 报名页面 */
@media (max-width: 768px) {
  .registration {
    padding: 70px 0 20px;
  }
  
  .registration .container {
    padding: 0 16px;
  }
  
  .registration .section-header {
    margin-bottom: 16px;
  }
  
  .registration .section-title {
    font-size: 1.3rem;
  }
  
  .registration .section-subtitle {
    font-size: 0.9rem;
  }
  
  .reg-user-bar {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .reg-events-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .reg-event-card {
    padding: 16px;
  }
  
  .reg-event-card-title {
    font-size: 1rem;
  }
  
  .reg-schedules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .reg-schedule-card {
    padding: 14px;
  }
  
  .reg-type-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .reg-type-card {
    padding: 24px 16px;
  }
  
  .reg-form-page {
    padding: 0;
  }
  
  .reg-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .reg-phone-verify-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .reg-send-btn-group {
    margin-bottom: 8px;
  }
  
  .reg-send-btn-group label {
    display: none;
  }
  
  .reg-send-btn-group .reg-btn {
    width: 100%;
  }
  
  .reg-pair-athletes {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .reg-form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .reg-form-actions .reg-btn {
    width: 100%;
  }
  
  .reg-success-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .reg-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  
  .reg-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    max-height: 85svh;
    margin: 0;
  }
  
  .reg-modal-body {
    max-height: calc(85vh - 140px);
    max-height: calc(85svh - 140px);
  }
  
  .reg-search-section {
    flex-direction: column;
    gap: 12px;
  }
  
  .reg-search-input-group {
    min-width: 100%;
  }
  
  .reg-search-input-group input {
    padding: 14px 16px 14px 44px;
    font-size: 16px; /* 防止iOS自动缩放 */
  }
  
  .reg-search-filters {
    width: 100%;
  }
  
  .reg-search-filters select {
    width: 100%;
    padding: 14px 36px 14px 16px;
    font-size: 16px;
  }
  
  /* 详情页手机端 */
  .reg-detail-page {
    padding: 0;
  }
  
  .reg-back-btn {
    margin-bottom: 12px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .reg-event-header {
    flex-direction: column;
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .reg-event-info {
    width: 100%;
  }
  
  .reg-event-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .reg-event-actions .reg-btn {
    width: 100%;
  }
  
  .reg-event-name {
    font-size: 1.2rem;
  }
  
  .reg-event-meta {
    gap: 8px;
    font-size: 0.85rem;
  }
  
  .reg-schedules-section {
    padding: 16px;
  }
  
  .reg-section-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  
  /* 表单手机端 */
  .reg-form {
    padding: 16px;
    border-radius: 8px;
  }
  
  .reg-form-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }
  
  .reg-form-section h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }
  
  .reg-form-group {
    margin-bottom: 12px;
  }
  
  .reg-form-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }
  
  .reg-form-group input,
  .reg-form-group select,
  .reg-form-group textarea {
    padding: 12px 14px;
    font-size: 16px; /* 防止iOS自动缩放 */
    border-radius: 6px;
  }
  
  .reg-athlete-item,
  .reg-pair-item,
  .reg-member-item {
    padding: 12px;
    margin-bottom: 10px;
  }
  
  .reg-item-header {
    margin-bottom: 10px;
    font-size: 0.9rem;
  }
  
  /* 我的报名手机端 */
  .reg-my-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .reg-my-header h2 {
    font-size: 1.2rem;
  }
  
  .reg-my-query {
    padding: 16px;
  }
  
  .reg-my-list {
    gap: 12px;
  }
  
  .reg-my-item {
    padding: 16px;
  }
  
  .reg-my-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  /* 成功页手机端 */
  .reg-success-page {
    padding: 40px 16px;
  }
  
  .reg-success-icon {
    font-size: 3rem;
  }
  
  .reg-success-page h2 {
    font-size: 1.3rem;
  }
  
  /* 按钮触摸优化 */
  .reg-btn {
    min-height: 44px;
    padding: 12px 20px;
  }
  
  .reg-btn-sm {
    min-height: 36px;
    padding: 8px 14px;
  }
  
  .reg-btn-register {
    padding: 14px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .reg-event-name {
    font-size: 1.1rem;
  }
  
  .reg-event-card-title {
    font-size: 0.95rem;
  }
  
  .reg-form {
    padding: 14px;
  }
  
  .reg-athlete-item,
  .reg-pair-item,
  .reg-member-item {
    padding: 10px;
  }
  
  .reg-type-card {
    padding: 20px 14px;
  }
  
  .reg-type-icon {
    width: 56px;
    height: 56px;
  }
  
  .reg-type-icon i {
    font-size: 1.5rem;
  }
  
  .reg-type-card h4 {
    font-size: 1rem;
  }
  
  .reg-type-card p {
    font-size: 0.85rem;
  }
  
  .reg-schedule-card {
    padding: 12px;
  }
  
  .reg-schedule-name {
    font-size: 0.95rem;
  }
  
  .reg-schedule-info {
    gap: 8px;
    font-size: 0.8rem;
  }
  
  .reg-status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
  }
  
  .reg-sport-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
  
  .reg-modal-header {
    padding: 14px 16px;
  }
  
  .reg-modal-header h3 {
    font-size: 1rem;
  }
  
  .reg-modal-body {
    padding: 16px;
  }
  
  .reg-modal-footer {
    padding: 14px 16px;
  }
  
  .reg-form-header h2 {
    font-size: 1.1rem;
  }
}

/* 报名公示页 */
.reg-publicity-page {
  animation: fadeIn 0.3s ease;
}

.reg-publicity-header {
  text-align: center;
  margin-bottom: 24px;
}

.reg-publicity-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.reg-publicity-header p {
  color: var(--text-muted);
}

.reg-publicity-filters {
  margin-bottom: 20px;
}

.reg-publicity-filters select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  min-width: 200px;
  min-height: 44px;
}

.reg-publicity-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reg-publicity-group {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.reg-publicity-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1.1rem;
  margin: 0;
}

.reg-publicity-group-title i {
  font-size: 1.2rem;
}

.reg-publicity-count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0.9;
}

.reg-publicity-table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.reg-publicity-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.reg-publicity-table th,
.reg-publicity-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.reg-publicity-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reg-publicity-table tbody tr:hover {
  background: var(--bg-hover);
}

.reg-publicity-table tbody tr:last-child td {
  border-bottom: none;
}

/* 赛事详情页操作按钮 */
.reg-event-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .reg-publicity-filters select {
    width: 100%;
  }
  
  .reg-publicity-table th,
  .reg-publicity-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .reg-publicity-group-title {
    padding: 12px 16px;
    font-size: 1rem;
  }
  
  .reg-publicity-header h2 {
    font-size: 1.2rem;
  }
}

/* ===== 产品对比卡片样式 ===== */
.product-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.product-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.product-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #e6f4ff 0%, #bae0ff 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.product-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.product-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.product-features {
  list-style: none;
  margin-bottom: 24px;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.product-features li i {
  color: #52c41a;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.product-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-tags .tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-online {
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary);
}

.tag-app {
  background: rgba(82, 196, 26, 0.1);
  color: #52c41a;
}

.tag-offline {
  background: rgba(250, 173, 20, 0.1);
  color: #d48806;
}

.tag-school {
  background: rgba(114, 46, 209, 0.1);
  color: #722ed1;
}

/* ===== 下载分区样式 ===== */
.download-section {
  margin-bottom: 20px;
}

.download-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.download-section-title i {
  color: var(--primary);
  font-size: 1.4rem;
}

.section-hint {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

.product-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-note i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.mt-60 {
  margin-top: 60px;
}

/* 下载卡片调整 */
.download-card {
  text-align: left;
  padding: 32px;
  min-width: 280px;
  max-width: 360px;
}

.download-cards {
  justify-content: flex-start;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .product-compare {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-card {
    padding: 28px 24px;
  }
  
  .product-icon {
    width: 56px;
    height: 56px;
  }
  
  .product-icon i {
    font-size: 1.6rem;
  }
  
  .product-card h3 {
    font-size: 1.2rem;
  }
  
  .download-section-title {
    font-size: 1.1rem;
    flex-wrap: wrap;
  }
  
  .section-hint {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
  
  .download-card {
    max-width: 100%;
  }
}

/* ===== APP功能卡片样式 ===== */
.app-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
}

.app-feature-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s ease;
}

.app-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.app-feature-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.app-feature-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.app-feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.app-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding: 14px 20px;
  background: var(--bg-alt);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.app-note i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

@media (max-width: 992px) {
  .app-features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .app-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .app-feature-card {
    padding: 24px 20px;
  }
  
  .app-feature-card i {
    font-size: 2rem;
  }
  
  .app-note {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

/* ===== 内测声明条幅 ===== */
.beta-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  z-index: 1100;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.beta-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.beta-banner-content > i:first-child {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.beta-banner-content > span {
  flex: 1;
  text-align: center;
}

.beta-banner-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.beta-banner-close:hover {
  background: rgba(255,255,255,0.3);
}

.beta-banner-close i {
  font-size: 1.1rem;
}

/* 有条幅时调整导航和页面位置 */
body:has(.beta-banner) .navbar,
body.has-beta-banner .navbar {
  top: 44px;
}

body:has(.beta-banner) .page,
body.has-beta-banner .page {
  padding-top: 114px;
}

/* 条幅隐藏时恢复 */
.beta-banner.hidden {
  display: none;
}

body:has(.beta-banner.hidden) .navbar {
  top: 0;
}

body:has(.beta-banner.hidden) .page {
  padding-top: 70px;
}

@media (max-width: 768px) {
  .beta-banner {
    padding: 8px 12px;
  }
  
  .beta-banner-content {
    font-size: 0.8rem;
    gap: 8px;
  }
  
  .beta-banner-content i:first-child {
    font-size: 1rem;
  }
  
  body:has(.beta-banner) .navbar,
  body.has-beta-banner .navbar {
    top: 56px;
  }
  
  body:has(.beta-banner) .page,
  body.has-beta-banner .page {
    padding-top: 126px;
  }
}


/* ===== 悬浮客服按钮 ===== */
.contact-fab {
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  right: calc(30px + env(safe-area-inset-right));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-fab i {
  font-size: 1.6rem;
}

.contact-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(22, 119, 255, 0.5);
}

/* ===== 联系客服弹窗 ===== */
.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
}

.contact-modal.show {
  display: flex;
}

.contact-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--gradient);
  color: white;
}

.contact-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.contact-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.contact-modal-close i {
  font-size: 1.2rem;
}

.contact-modal-body {
  padding: 24px;
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.contact-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: 12px;
  margin-bottom: 12px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.5rem;
}

.contact-item:nth-child(2) .contact-icon {
  background: rgba(7, 193, 96, 0.1);
}

.contact-item:nth-child(2) .contact-icon i {
  color: #07c160;
}

.contact-item:nth-child(3) .contact-icon {
  background: rgba(18, 183, 245, 0.1);
}

.contact-item:nth-child(3) .contact-icon i {
  color: #12b7f5;
}

.contact-item:nth-child(4) .contact-icon {
  background: rgba(22, 119, 255, 0.1);
}

.contact-item:nth-child(4) .contact-icon i {
  color: var(--primary);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.contact-copy {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.contact-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.contact-copy i {
  font-size: 1rem;
}

.contact-modal-footer {
  padding: 16px 24px;
  background: var(--bg-alt);
  text-align: center;
}

.contact-modal-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .contact-fab {
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
    width: 50px;
    height: 50px;
  }
  
  .contact-fab i {
    font-size: 1.4rem;
  }
  
  .contact-modal-content {
    max-width: 100%;
  }
}


/* ===== 下载中心两栏布局 ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.download-column {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.download-column-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.download-product-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
}

.download-column-title h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.download-column-title span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-column-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.download-column .download-card {
  margin-top: 0;
  max-width: 100%;
  padding: 24px;
}

.download-column .product-note {
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .download-grid {
    gap: 24px;
  }
  
  .download-column {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .download-column {
    padding: 20px;
  }
  
  .download-column-header {
    flex-direction: column;
    text-align: center;
  }
  
  .download-product-icon {
    width: 48px;
    height: 48px;
  }
}


/* ===== 内联更新日志样式 ===== */
.changelog-inline {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.changelog-inline h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.changelog-inline h4 i {
  color: var(--primary);
}

.changelog-item-inline {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 16px;
}

.changelog-header-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.changelog-header-inline .changelog-version {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.changelog-header-inline .changelog-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.changelog-header-inline .changelog-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.changelog-content-inline {
  padding-left: 18px;
  margin: 0;
}

.changelog-content-inline li {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 6px 0;
  line-height: 1.5;
}


/* ===== 简化版下载卡片 ===== */
.download-card-simple {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.download-icon-simple {
  font-size: 2.2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.download-info {
  flex: 1;
  min-width: 0;
}

.download-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.download-info .download-version {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 6px;
}

.download-info .download-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.download-card-simple .btn {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .download-card-simple {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .download-card-simple .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ===== 下载按钮组 ===== */
.download-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.download-actions .btn {
  padding: 10px 16px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-doc {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-doc:hover {
  background: var(--primary-light);
}

@media (max-width: 600px) {
  .download-actions {
    width: 100%;
    flex-direction: row;
  }
  
  .download-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
