:root {
  --bg: #0b1929;
  --card-bg: #102840;
  --accent: #00c853;
  --accent-soft: rgba(0, 200, 83, 0.15);
  --text-main: #ffffff;
  --text-sub: #9fb3c8;
  --danger: #ff5252;
  --border: #1e3452;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.35);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'SimHei', 'Heiti SC', 'Microsoft YaHei', 'PingFang SC', 'STHeiti', 'WenQuanYi Micro Hei', sans-serif;
  background: radial-gradient(circle at top, #12385c 0, #050b12 55%, #000000 100%);
  color: var(--text-main);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px 10px;
  background: linear-gradient(to bottom, rgba(5, 11, 18, 0.95), rgba(5, 11, 18, 0.7));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top-bar h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.back-btn {
  position: absolute;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  background: rgba(11, 25, 41, 0.9);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

.card {
  background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.14), rgba(8, 22, 36, 0.95));
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card h2 {
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.card-toggle-btn {
  font-size: 18px;
  color: var(--text-sub);
  transition: transform 0.3s ease, color 0.2s ease;
  padding: 4px;
  line-height: 1;
}

.card-toggle-btn:hover {
  color: var(--text-main);
}

.card-toggle-btn.collapsed {
  transform: rotate(-90deg);
}

.card-content {
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  max-height: 10000px;
  opacity: 1;
}

.card-content.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.nav-card {
  text-align: center;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  text-decoration: none;
  min-height: 90px;
  transition: all 0.2s ease;
  background: rgba(16, 40, 64, 0.6);
  position: relative;
  overflow: hidden;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(0, 200, 83, 0.05));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-btn:hover::before {
  opacity: 1;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3);
  border-color: rgba(0, 200, 83, 0.4);
}

.nav-btn:active {
  transform: translateY(0);
}

.nav-btn .nav-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}

.nav-btn .nav-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  position: relative;
  z-index: 1;
}

.nav-btn.primary {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #02120a;
  border-color: rgba(0, 200, 83, 0.4);
  font-weight: 600;
}

.nav-btn.primary::before {
  background: linear-gradient(135deg, rgba(0, 232, 118, 0.2), rgba(0, 200, 83, 0.1));
}

.nav-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.5);
}

.nav-btn.primary .nav-icon,
.nav-btn.primary .nav-text {
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #1f6fff;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(9, 109, 255, 0.45);
}

.btn.full {
  width: 100%;
}

.btn.primary {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #02120a;
  box-shadow: 0 8px 18px rgba(0, 200, 83, 0.6);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  gap: 4px;
}

.field span {
  font-size: 13px;
  color: var(--text-sub);
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.field.inline span {
  min-width: 70px;
}

/* 比赛信息表单横向布局 */
#tournament-form .field {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#tournament-form .field span {
  min-width: 90px;
  flex-shrink: 0;
  font-size: 14px;
}

#tournament-form .field input,
#tournament-form .field select,
#tournament-form .field textarea {
  flex: 1;
  min-width: 0;
}

#tournament-form .field textarea {
  min-height: 60px;
  resize: vertical;
}

input,
textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 16, 27, 0.9);
  color: var(--text-main);
  font-size: 14px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 200, 83, 0.5);
}

/* 历史记录选择按钮 */
.history-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 16, 27, 0.9);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.history-btn:hover {
  background: rgba(31, 111, 255, 0.3);
  border-color: var(--accent);
  transform: scale(1.05);
}

.history-btn:active {
  transform: scale(0.95);
}

/* 历史记录选择下拉列表 */
.history-dropdown {
  position: absolute;
  z-index: 1000;
  background: rgba(5, 16, 27, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
  min-width: 200px;
}

.history-dropdown-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
  font-size: 14px;
}

.history-dropdown-item:hover {
  background: rgba(31, 111, 255, 0.2);
}

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

/* 日期输入框样式优化 */
input[type="date"] {
  position: relative;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.7;
  padding: 4px;
  margin-left: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* 确保日期输入框在移动端显示正常 */
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
  display: none;
}

/* 下拉框样式 */
select {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 16, 27, 0.9);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: 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='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 200, 83, 0.5);
}

/* 状态标签样式 */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.status-registration {
  background: rgba(33, 150, 243, 0.2);
  color: #2196f3;
  border: 1px solid rgba(33, 150, 243, 0.4);
}

.status-ongoing {
  background: rgba(0, 200, 83, 0.2);
  color: var(--accent);
  border: 1px solid rgba(0, 200, 83, 0.4);
}

.status-completed {
  background: rgba(159, 179, 200, 0.15);
  color: var(--text-sub);
  border: 1px solid rgba(159, 179, 200, 0.3);
}

.player-count-section {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 200, 83, 0.05);
  border: 1px solid rgba(0, 200, 83, 0.2);
  border-radius: var(--radius-md);
}

.player-count-section .field {
  margin-bottom: 12px;
}

.player-count-section .field input {
  font-size: 16px;
  text-align: center;
  font-weight: 500;
}

.player-row {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 10px 10px;
  margin-bottom: 8px;
  background: linear-gradient(145deg, rgba(12, 30, 50, 0.92), rgba(5, 14, 24, 0.98));
}

.player-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.player-row-header span {
  font-size: 14px;
}

input[readonly] {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sub);
  cursor: not-allowed;
}

.link-btn {
  border: none;
  background: none;
  color: var(--text-sub);
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 999px;
}

.link-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

.note {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 8px;
}

.list-card {
  padding: 6px 6px 8px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.09), rgba(11, 25, 41, 0.98));
  margin-bottom: 6px;
}

.list-main {
  flex: 1;
  min-width: 0;
}

.list-main .title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-extra {
  text-align: right;
  font-size: 12px;
  color: var(--text-sub);
  margin-left: 10px;
}

.list-extra .sub {
  font-size: 11px;
}

/* 左滑删除样式 */
.swipe-item {
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  width: 100%;
}

.swipe-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: stretch;
}

.swipe-content {
  width: 100%;
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease;
  /* 确保背景不透明，完全遮挡删除按钮 */
  background: rgba(11, 25, 41, 1);
  background-image: radial-gradient(circle at top left, rgba(0, 200, 83, 0.09), rgba(11, 25, 41, 1));
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* 确保内容区域有足够的高度 */
  display: flex;
  align-items: center;
}

.swipe-item.swiped .swipe-content {
  transform: translateX(-80px);
  /* 滑动时移除右侧圆角，让删除按钮的圆角显示 */
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}

/* 垃圾桶页面的滑动操作区域（更宽，包含两个按钮） */
.trash-action {
  width: 160px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.swipe-action {
  position: absolute;
  right: 0;
  top: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.95), rgba(198, 40, 40, 0.95));
  z-index: 1;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-sizing: border-box;
  /* 高度由 JavaScript 动态设置，确保与内容一致 */
  overflow: hidden;
  /* 确保与滑动层无缝连接，移除左侧边框 */
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* 确保高度精确匹配 */
  margin: 0;
  padding: 0;
}

.delete-tournament-btn {
  width: 60px;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* 垃圾桶页面的恢复和删除按钮样式 */
.restore-tournament-btn,
.permanent-delete-tournament-btn {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  min-height: 100%;
  height: 100%;
  align-self: stretch;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restore-tournament-btn {
  background: rgba(76, 175, 80, 0.8);
  border-radius: 0;
  position: relative;
}

.restore-tournament-btn::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.restore-tournament-btn:hover {
  background: rgba(76, 175, 80, 1);
}

.restore-tournament-btn:active {
  background: rgba(56, 142, 60, 1);
}

.permanent-delete-tournament-btn {
  background: rgba(244, 67, 54, 0.8);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.permanent-delete-tournament-btn:hover {
  background: rgba(244, 67, 54, 1);
}

.permanent-delete-tournament-btn:active {
  background: rgba(198, 40, 40, 1);
}

.delete-tournament-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.delete-tournament-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.25);
}

.empty {
  text-align: center;
  color: var(--text-sub);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
  color: var(--text-sub);
  font-weight: 500;
}

.data-table a {
  color: #64ffda;
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

/* 开关样式 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #ff9800;
  border-color: #ff9800;
}

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

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.toggle-label-text {
  font-weight: 500;
  font-size: 15px;
}

/* 标题栏保存按钮样式 */
.header-save-btn {
  transition: all 0.2s;
}

.header-save-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 200, 83, 0.6);
}

.header-save-btn:active {
  transform: translateY(1px) scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 200, 83, 0.5);
}

/* Toast 通知样式 */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 90%;
  width: 320px;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(5, 16, 27, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toast.success {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.15), rgba(5, 16, 27, 0.98));
}

.toast.error {
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.15), rgba(5, 16, 27, 0.98));
}

.toast.warning {
  border-left: 4px solid #ff9800;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(5, 16, 27, 0.98));
}

.toast.info {
  border-left: 4px solid #1f6fff;
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.15), rgba(5, 16, 27, 0.98));
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
  white-space: pre-line;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

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

.toast.fade-out {
  animation: toastSlideOut 0.3s ease-in forwards;
}

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

/* 确认对话框样式 */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
  background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.14), rgba(8, 22, 36, 0.98));
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: dialogSlideIn 0.3s ease-out;
}

.confirm-dialog-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-main);
}

.confirm-dialog-message {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}

.confirm-dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.confirm-dialog-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-dialog-btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.confirm-dialog-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.confirm-dialog-btn.confirm {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #02120a;
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
}

.confirm-dialog-btn.confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 200, 83, 0.5);
}

.confirm-dialog-btn.danger {
  background: linear-gradient(135deg, #ff5252, #ff6f6f);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
}

.confirm-dialog-btn.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 82, 82, 0.5);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 报名弹窗样式 */
.register-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.register-modal {
  background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.14), rgba(8, 22, 36, 0.98));
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: dialogSlideIn 0.3s ease-out;
}

.register-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.register-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.register-modal-close {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.register-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.register-modal-body {
  padding: 20px;
}

.register-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.register-modal-buttons .btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.register-modal-buttons .btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.register-modal-buttons .btn.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.register-modal-buttons .btn.primary {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #02120a;
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
}

.register-modal-buttons .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 200, 83, 0.5);
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (min-width: 768px) {
  .top-bar h1 {
    font-size: 20px;
  }

  .card {
    padding: 16px 18px 18px;
    margin-bottom: 14px;
  }
  
  .toast-container {
    width: 400px;
  }
}



