/* ========================================
   掉分车队 - 赛博朋克风格样式表
   深色暗系 + 霓虹蓝紫渐变 + 玻璃拟态
   ======================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --bg-deep: #06060d;
  --bg-base: #0a0a14;
  --bg-card: rgba(18, 18, 32, 0.72);
  --bg-card-hover: rgba(28, 28, 48, 0.85);
  --neon-blue: #00e5ff;
  --neon-purple: #b14fff;
  --neon-pink: #ff2e9a;
  --text-primary: #e8e8f0;
  --text-secondary: #8888a8;
  --text-dim: #555568;
  --border-glow: rgba(0, 229, 255, 0.25);
  --border-glow-purple: rgba(177, 79, 255, 0.25);
  --gradient-main: linear-gradient(135deg, #00e5ff 0%, #b14fff 100%);
  --gradient-accent: linear-gradient(135deg, #b14fff 0%, #ff2e9a 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 基础重置 ---------- */
* {
  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-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- 背景粒子画布 ---------- */
#particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 背景渐变光晕 */
body::before {
  content: "";
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -30%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(177, 79, 255, 0.08) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(12px);
  background: rgba(6, 6, 13, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-domain {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 20px;
  transition: var(--transition-fast);
}

.topbar-domain:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.1);
}

.topbar-domain-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-admin {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-admin:hover {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(177, 79, 255, 0.2);
  transform: rotate(60deg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.logo:hover {
  opacity: 0.85;
}

.logo-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 6px var(--neon-blue));
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-back {
  background: none;
  border: 1px solid var(--border-glow);
  color: var(--neon-blue);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-back:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

/* ---------- 视图切换 ---------- */
.view {
  display: none;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  padding: 40px 24px;
  animation: viewFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

/* ---------- 主页 Hero ---------- */
.hero-text {
  text-align: center;
  margin-bottom: 40px;
  margin-top: 40px;
}

.hero-text h1 {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  letter-spacing: 4px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-shadow: 0 0 60px rgba(0, 229, 255, 0.3);
}

/* Glitch 效果 */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.glitch::before {
  animation: glitchTop 3s infinite linear alternate-reverse;
  color: var(--neon-blue);
  -webkit-text-fill-color: var(--neon-blue);
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  opacity: 0.7;
}

.glitch::after {
  animation: glitchBottom 3s infinite linear alternate-reverse;
  color: var(--neon-pink);
  -webkit-text-fill-color: var(--neon-pink);
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  opacity: 0.7;
}

@keyframes glitchTop {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, -2px); }
  94% { transform: translate(3px, 1px); }
  96% { transform: translate(-2px, 2px); }
}

@keyframes glitchBottom {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, 2px); }
  94% { transform: translate(-3px, -1px); }
  96% { transform: translate(2px, -2px); }
}

.subtitle {
  margin-top: 16px;
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-secondary);
  letter-spacing: 2px;
}

/* ---------- 域名徽章 ---------- */
.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 18px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 24px;
  transition: var(--transition-base);
}

.domain-badge:hover {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}

.domain-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}

.domain-link {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: var(--transition-fast);
}

.domain-badge:hover .domain-link {
  filter: brightness(1.2);
}

/* ---------- 主页卡片入口 ---------- */
.home-cards {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

.home-card {
  position: relative;
  width: 320px;
  height: 280px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-bounce);
}

.home-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--border-glow);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.15),
              0 0 0 1px rgba(0, 229, 255, 0.2);
}

.home-card:active {
  transform: translateY(-4px) scale(1.0);
}

/* 卡片光晕效果 */
.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(0, 229, 255, 0.12) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition-base);
}

.home-card:hover .card-glow {
  opacity: 1;
}

.home-card:nth-child(2):hover {
  border-color: var(--border-glow-purple);
  box-shadow: 0 12px 40px rgba(177, 79, 255, 0.15),
              0 0 0 1px rgba(177, 79, 255, 0.2);
}

.home-card:nth-child(2) .card-glow {
  background: radial-gradient(circle at 50% 50%,
    rgba(177, 79, 255, 0.12) 0%, transparent 60%);
}

.card-icon {
  font-size: 52px;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
  transition: var(--transition-bounce);
}

.home-card:nth-child(2) .card-icon {
  filter: drop-shadow(0 0 12px rgba(177, 79, 255, 0.4));
}

.home-card:hover .card-icon {
  transform: scale(1.15) rotate(5deg);
}

.home-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.home-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

.card-arrow {
  position: absolute;
  bottom: 24px;
  right: 28px;
  font-size: 24px;
  color: var(--neon-blue);
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition-base);
}

.home-card:nth-child(2) .card-arrow {
  color: var(--neon-purple);
}

.home-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- 视图标题 ---------- */
.view-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 创建表单 ---------- */
.form-container {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
  width: 100%;
  background: rgba(10, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  transition: var(--transition-fast);
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

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

/* 几人等几人 行布局 */
.form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.form-row > div:first-child,
.form-row > div:last-child {
  flex: 1;
}

.form-separator {
  font-size: 18px;
  color: var(--neon-blue);
  padding-bottom: 12px;
  font-weight: 600;
}

/* ---------- 段位选择器 ---------- */
.rank-selector {
  position: relative;
}

.rank-display {
  background: rgba(10, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.rank-display:hover {
  border-color: var(--neon-purple);
}

.rank-display.open {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(177, 79, 255, 0.12);
}

#rank-selected-badge {
  font-size: 15px;
  color: var(--text-dim);
}

.rank-display.open #rank-selected-badge,
.rank-display:not(.open) #rank-selected-badge[data-selected="true"] {
  color: var(--text-primary);
}

.rank-arrow {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.rank-display.open .rank-arrow {
  transform: rotate(180deg);
}

.rank-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(14, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.rank-dropdown.show {
  display: block;
  animation: dropdownIn 0.2s ease;
}

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

.rank-option {
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-option:hover {
  background: rgba(177, 79, 255, 0.1);
}

/* 段位徽章颜色 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rank-badge[data-rank="下三"]      { background: rgba(120,120,130,0.2); color: #aaaab4; border: 1px solid rgba(120,120,130,0.3); }
.rank-badge[data-rank="白银-黄金"]  { background: rgba(255,215,0,0.12); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.rank-badge[data-rank="黄金-铂金"]  { background: rgba(255,180,50,0.12); color: #ffb432; border: 1px solid rgba(255,180,50,0.3); }
.rank-badge[data-rank="铂金-钻石"]  { background: rgba(0,229,209,0.12); color: #00e5d1; border: 1px solid rgba(0,229,209,0.3); }
.rank-badge[data-rank="钻石-超凡"]  { background: rgba(0,191,255,0.12); color: #00bfff; border: 1px solid rgba(0,191,255,0.3); }
.rank-badge[data-rank="超凡以上"]   { background: rgba(255,46,154,0.12); color: #ff2e9a; border: 1px solid rgba(255,46,154,0.3); }

/* ---------- 提交按钮 ---------- */
.btn-submit {
  width: 100%;
  position: relative;
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #06060d;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-bounce);
  font-family: inherit;
  margin-top: 8px;
}

.btn-submit:hover {
  transform: scale(1.02);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.4),
              0 0 48px rgba(177, 79, 255, 0.2);
}

.btn-submit:active {
  transform: scale(0.98);
}

/* 按钮微光扫过 */
.btn-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.btn-submit:hover::before {
  left: 100%;
}

.rate-limit-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
}

.rate-limit-hint.warn {
  color: var(--neon-pink);
}

/* ---------- 标题选择器 ---------- */
.title-selector {
  position: relative;
}

.title-display {
  background: rgba(10, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
  font-size: 15px;
  color: var(--text-dim);
}

.title-display:hover {
  border-color: var(--neon-blue);
}

.title-display.open {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
  color: var(--text-primary);
}

.title-display.selected {
  color: var(--text-primary);
}

#f-title-custom {
  width: 100%;
  background: rgba(10, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  margin-top: 8px;
  font-family: inherit;
  transition: var(--transition-fast);
}

#f-title-custom:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

#f-title-custom::placeholder {
  color: var(--text-dim);
}

.title-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(14, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  z-index: 100;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.title-dropdown.show {
  display: block;
  animation: dropdownIn 0.2s ease;
}

.title-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 15px;
  color: var(--text-primary);
}

.title-option:hover {
  background: rgba(0, 229, 255, 0.1);
}

.title-option.custom-option {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--neon-blue);
}

/* ---------- 字段提示 ---------- */
.field-hint {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 4px;
}

/* ---------- 组队大厅 ---------- */
.lobby-header {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lobby-header .view-title {
  margin-bottom: 0;
}

.lobby-stats {
  font-size: 14px;
  color: var(--text-secondary);
}

.lobby-stats span {
  color: var(--neon-blue);
  font-weight: 700;
  font-size: 18px;
}

/* 筛选按钮 */
.lobby-filters {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  background: rgba(18, 18, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gradient-main);
  border-color: transparent;
  color: #06060d;
  font-weight: 600;
}

/* ---------- 队伍列表 ---------- */
.team-list {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* 队伍卡片 */
.team-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition-base);
  animation: cardAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.team-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.1);
  transform: translateY(-3px);
}

/* 卡片消失动画 */
.team-card.removing {
  animation: cardRemove 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardRemove {
  to { opacity: 0; transform: scale(0.8) translateY(-20px); }
}

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

.team-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.team-card-time {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 12px;
}

.team-card-room {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
}

.team-card-room label {
  font-size: 12px;
  color: var(--text-secondary);
}

.team-card-room code {
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-blue);
  letter-spacing: 1px;
}

.team-card-slogan {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-style: italic;
  line-height: 1.5;
}

.team-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.team-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.team-count .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  margin: 0 2px;
}

/* 卡片底部操作区 */
.team-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-join {
  flex: 1;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neon-blue);
  cursor: pointer;
  transition: var(--transition-bounce);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn-join:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

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

.btn-join.full {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  cursor: not-allowed;
}

.btn-join.full:hover {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.03);
}

.btn-mark {
  width: 42px;
  height: 42px;
  background: rgba(255, 46, 154, 0.08);
  border: 1px solid rgba(255, 46, 154, 0.2);
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-mark:hover {
  background: rgba(255, 46, 154, 0.2);
  box-shadow: 0 0 12px rgba(255, 46, 154, 0.2);
  transform: scale(1.1) rotate(90deg);
}

.btn-mark:active {
  transform: scale(0.85);
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 14px !important;
  color: var(--text-dim) !important;
}

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(14, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: 15px;
  color: var(--text-primary);
  z-index: 1000;
  transition: var(--transition-bounce);
  opacity: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.15);
}

.toast.error {
  border-color: rgba(255, 46, 154, 0.4);
  box-shadow: 0 8px 32px rgba(255, 46, 154, 0.15);
}

/* ---------- Modal 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: viewFadeIn 0.2s ease;
}

.modal-box {
  background: rgba(14, 14, 26, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(0, 229, 255, 0.1);
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-box input {
  width: 100%;
  background: rgba(10, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition-fast);
}

.modal-box input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-modal-cancel,
.btn-modal-confirm {
  flex: 1;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  font-family: inherit;
}

.btn-modal-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-modal-confirm {
  background: var(--gradient-main);
  border: none;
  color: #06060d;
}

.btn-modal-confirm:hover {
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

.btn-modal-confirm:active {
  transform: scale(0.98);
}

/* ---------- Admin 管理面板 ---------- */
.admin-container {
  width: 100%;
  max-width: 900px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-stats {
  font-size: 14px;
  color: var(--text-secondary);
}

.admin-stats span {
  color: var(--neon-blue);
  font-weight: 700;
  font-size: 18px;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.btn-admin-refresh,
.btn-admin-clear,
.btn-admin-exit {
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  font-family: inherit;
}

.btn-admin-refresh {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--neon-blue);
}

.btn-admin-refresh:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.btn-admin-clear {
  background: rgba(255, 46, 154, 0.1);
  border: 1px solid rgba(255, 46, 154, 0.25);
  color: var(--neon-pink);
}

.btn-admin-clear:hover {
  background: rgba(255, 46, 154, 0.2);
  box-shadow: 0 0 10px rgba(255, 46, 154, 0.15);
}

.btn-admin-exit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.btn-admin-exit:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Admin 队伍列表 */
.admin-team-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: var(--transition-fast);
}

.admin-team-item:hover {
  border-color: rgba(255, 46, 154, 0.2);
}

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

.admin-team-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.admin-team-title-row .team-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-team-title-row .team-room {
  font-size: 13px;
  color: var(--neon-blue);
  font-weight: 600;
  font-family: monospace;
}

.admin-team-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.admin-team-meta-row .expired-tag {
  color: var(--neon-pink);
  font-weight: 600;
}

.btn-admin-delete {
  background: rgba(255, 46, 154, 0.1);
  border: 1px solid rgba(255, 46, 154, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-pink);
  cursor: pointer;
  transition: var(--transition-bounce);
  font-family: inherit;
  flex-shrink: 0;
  margin-left: 12px;
}

.btn-admin-delete:hover {
  background: rgba(255, 46, 154, 0.2);
  box-shadow: 0 0 10px rgba(255, 46, 154, 0.15);
  transform: scale(1.05);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .topbar {
    padding: 14px 18px;
  }

  .view {
    padding: 24px 16px;
  }

  .hero-text {
    margin-top: 20px;
    margin-bottom: 40px;
  }

  .home-cards {
    gap: 20px;
  }

  .home-card {
    width: 100%;
    max-width: 360px;
    height: 240px;
  }

  .form-container {
    padding: 28px 20px;
  }

  .lobby-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .team-list {
    grid-template-columns: 1fr;
  }

  .filter-btn {
    font-size: 12px;
    padding: 5px 12px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .topbar-domain-text {
    font-size: 12px;
  }

  .topbar-domain {
    padding: 4px 10px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions {
    flex-wrap: wrap;
  }

  .admin-team-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .btn-admin-delete {
    margin-left: 0;
    align-self: flex-end;
  }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
}

/* 选中文字颜色 */
::selection {
  background: rgba(0, 229, 255, 0.25);
  color: var(--text-primary);
}
