/* 统一徽章与标签：全黑白灰极简素雅风格，消除杂色 */
.badge-u {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
  padding: 1px 8px;
  min-width: 28px;
  height: 20px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: middle;
  line-height: 1;
  box-sizing: border-box;
}

.badge-u.orange,
.badge-u.cyan {
  border-color: #cbd5e1;
  color: #334155;
  background: #f8fafc;
}

/* 通用标签徽章（全部统一为灰度素色） */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  vertical-align: middle;
}

.badge-success,
.badge-warning,
.badge-danger,
.badge-info {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

/* 统一按钮设计：纯净黑灰沉稳风格，拒绝彩色花哨 */
.btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-primary,
.btn-cyan,
.btn-dark {
  background: #1e293b !important;
  border: 1px solid #1e293b !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-cyan:hover,
.btn-dark:hover {
  background: #0f172a !important;
  border-color: #0f172a !important;
}

/* 赛事组别选择胶囊与高亮激活态 */
.btn-group-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-group-pill:hover {
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  background: #f8fafc !important;
}

.btn-group-pill.active {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25) !important;
  transform: translateY(-1px);
}

/* 统一通用分栏选项卡 Tab (如赛事项目分类、子面板切换等) */
.login-tab-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  user-select: none;
}

.login-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.login-tab:hover:not(.active) {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.login-tab.active {
  background: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25) !important;
  transform: translateY(-1px);
}

.personnel-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.personnel-menu-item.active {
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-weight: 700;
}

/* 弹出框 */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
  z-index: 150;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 500px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* 微信小程序模拟器 */
.mobile-simulator-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  width: 100%;
}

.simulator-frame {
  width: 350px;
  height: 670px;
  background: #ffffff;
  border: 10px solid #0f172a;
  border-radius: 36px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.simulator-notch {
  width: 100px;
  height: 18px;
  background: #000000;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
}

.simulator-camera {
  width: 5px;
  height: 5px;
  background: #1e293b;
  border-radius: 50%;
}

.simulator-content {
  flex: 1;
  background: #f8fafc;
  padding-top: 0;
  padding-bottom: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* 微信小程序模拟器外层自适应缩放（保障在低高度屏幕下不截断） */
@media (max-height: 780px) {
  .simulator-frame {
    transform: scale(0.9);
    transform-origin: center center;
    margin: -30px 0;
  }
}

@media (max-height: 700px) {
  .simulator-frame {
    transform: scale(0.85);
    margin: -45px 0;
  }
}

/* 表单输入框 */
.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  font-size: 12.5px;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--accent-blue);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.25s ease;
  border-radius: 24px;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.switch input:checked + .slider {
  background-color: #1e293b;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.cert-preview-card {
  width: 100%;
  height: 190px;
  background-image: linear-gradient(135deg, #fffefc, #faf3e5);
  border-radius: 8px;
  position: relative;
  padding: 16px;
  color: #5c4013;
  border: 1.5px solid #dfc593;
}

.cert-title {
  font-size: 15px;
  font-weight: 700;
  color: #8c6828;
}

.cert-body {
  margin-top: 12px;
  font-size: 10px;
  line-height: 1.6;
}

.cert-seal {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 45px;
  height: 45px;
  border: 2px dashed #b91c1c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b91c1c;
  font-size: 7.5px;
  font-weight: 700;
  transform: rotate(-15deg);
  opacity: 0.8;
}

.mini-point-card {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.05), rgba(0, 188, 212, 0.05));
  border-radius: 8px;
  padding: 12px;
  margin: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-point-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-orange);
}

.mini-tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  position: sticky;
  bottom: 0;
  padding: 6px 0;
  z-index: 5;
}

.mini-tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
}

.mini-tabbar-item.active {
  color: var(--accent-orange);
}

.mini-tabbar-item i {
  font-size: 14px;
  margin-bottom: 2px;
}



/* 对阵图样式 - 100% 跑酷赛事系统 (TournamentBracket / FlatBracket) 标准 */
.bracket-tree-container {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  padding: 40px 20px;
  min-width: max-content;
  transform-origin: top left;
}
.bracket-node {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  position: relative;
}
.bracket-match-wrapper {
  z-index: 2;
  margin: 10px 0;
  position: relative;
}
.bracket-player-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 16px;
  width: 190px;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(148, 163, 184, 0.04);
  transition: all 0.2s;
  position: relative;
  box-sizing: border-box;
}
.bracket-node:not(.bracket-root) .bracket-player-card::after {
  content: "";
  position: absolute;
  right: -40px;
  width: 40px;
  height: 2px;
  background: #cbd5e1;
  top: 50%;
  transform: translateY(-50%);
}
.bracket-player-card.winner {
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15) !important;
}
.bracket-player-card.empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 13px;
  justify-content: center;
}
.bracket-player-card:not(.empty):hover {
  border-color: #1e4ed8;
  box-shadow: 0 4px 12px rgba(30, 78, 216, 0.08);
}
.bracket-children {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 80px;
  position: relative;
}
.bracket-left-line {
  position: absolute;
  left: -40px;
  width: 40px;
  height: 2px;
  background: #cbd5e1;
  top: 50%;
  transform: translateY(-50%);
}
