* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0015 0%, #1a0a2e 50%, #0d1b2a 100%);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 霓虹灯背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(255, 0, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page {
  display: none;
  height: 100vh;
  height: 100dvh;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  display: block;
}
/* 游戏页面禁止滚动 */
#gamePage {
  display: none;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

#gamePage.active {
  display: block;
}


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

/* 霓虹文字 */
.neon-text {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonGlow 2s ease-in-out infinite alternate, gradientShift 3s ease infinite;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5), 0 0 20px rgba(255, 0, 255, 0.3);
}

@keyframes neonGlow {
  from { filter: drop-shadow(0 0 5px #ff00ff) drop-shadow(0 0 10px #ff00ff); }
  to { filter: drop-shadow(0 0 10px #00ffff) drop-shadow(0 0 20px #00ffff); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 登录页 */
.login-container {
  max-width: 400px;
  margin: 60px auto 0;
}

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.subtitle {
  color: #a855f7;
  font-size: 16px;
  margin-top: 10px;
  letter-spacing: 4px;
}

.form-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px 20px;
  border: 1px solid rgba(255, 0, 255, 0.2);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.1);
}

.tab-group {
  display: flex;
  margin-bottom: 25px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s;
}

.tab.active {
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.form {
  display: none;
}

.form.active {
  display: block;
}

.input-group {
  margin-bottom: 15px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

.input-group input:focus {
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.input-group input::placeholder {
  color: #666;
}

.code-group {
  display: flex;
  gap: 10px;
}

.code-group input {
  flex: 1;
}

.btn-code {
  padding: 0 16px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-code:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.code-display {
  text-align: center;
  padding: 10px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  color: #00ffff;
  font-size: 14px;
}

.code-value {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* 按钮 */
.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 255, 0.4);
}

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


.btn-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 0, 255, 0.5), 0 0 60px rgba(139, 92, 246, 0.4);
}

.btn-float:active {
  transform: translateY(-1px) scale(1.02);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-block {
  width: 100%;
  margin-top: 10px;
}

.btn-float {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: auto;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff00ff 0%, #8b5cf6 50%, #00ffff 100%);
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.4), 0 0 40px rgba(139, 92, 246, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.4);
  z-index: 100;
}

/* 头像选择页 */
.avatar-container {
  max-width: 400px;
  margin: 40px auto 0;
}

.page-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 30px;
  color: #fff;
}

.gender-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.gender-tab {
  padding: 10px 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #888;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.gender-tab.active {
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.avatar-item {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.05);
}

.avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-item.selected {
  border-color: #ff00ff;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
  transform: scale(1.1);
}

.nickname-input {
  margin-bottom: 20px;
}

.nickname-input input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 15px;
  text-align: center;
  outline: none;
}

.nickname-input input:focus {
  border-color: #ff00ff;
}

/* 首页 */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

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

.user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.user-nickname {
  font-size: 16px;
  font-weight: 500;
}

.btn-logout {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
}

.section-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-left: 10px;
  border-left: 4px solid #ff00ff;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.game-card.available:hover {
  transform: translateX(5px);
  border-color: rgba(255, 0, 255, 0.3);
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.2);
}

.game-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* 扫雷游戏图标 */
.game-icon.mine-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-icon.mine-icon svg {
  filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.5));
}
.game-icon {
  font-size: 40px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(139, 92, 246, 0.2));
  border-radius: 16px;
}

.game-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.game-info p {
  font-size: 13px;
  color: #888;
}

.game-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.game-tag.coming {
  background: rgba(255, 255, 255, 0.2);
  color: #aaa;
}

/* 页面头部 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 10px 0;
}

.btn-back, .btn-refresh {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header .page-title {
  margin: 0;
  font-size: 20px;
}

/* 房间列表 */
.room-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 80px;
}

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.room-item:hover {
  border-color: rgba(255, 0, 255, 0.3);
}

.room-item-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.room-item-info p {
  font-size: 12px;
  color: #888;
}

.room-item-status {
  text-align: right;
}

.room-count {
  font-size: 14px;
  color: #ff00ff;
  margin-bottom: 5px;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.status-waiting {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.status-playing {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.empty-room {
  text-align: center;
  color: #666;
  padding: 60px 0;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a0a2e, #0d1b2a);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 350px;
  border: 1px solid rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
}

.modal-content h3 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
}

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

.modal-actions .btn {
  flex: 1;
}

/* 游戏页面 */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.room-info {
  text-align: center;
}

.room-name {
  font-size: 16px;
  font-weight: 500;
  display: block;
}

.room-id {
  font-size: 12px;
  color: #888;
}

.btn-share {
  padding: 8px 16px;
  background: linear-gradient(135deg, #00ffff, #0080ff);
  border: none;
  border-radius: 20px;
  color: #000;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sound {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-sound:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn-sound.muted {
  opacity: 0.5;
}

/* 玩家条 */
.players-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.players-strip::-webkit-scrollbar {
  display: none;
}

.player-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: all 0.3s;
}

.player-chip .avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.player-chip.active .avatar {
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.player-chip .nickname {
  font-size: 11px;
  color: #aaa;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-chip .score {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.player-chip.owner::after {
  content: '房主';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: bold;
}

/* 游戏区域 */
.game-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 20px;
  padding: 10px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  width: 280px;
  height: 380px;
  margin-top: 10px;
}

.card {
  aspect-ratio: 2/3;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}

.card.face-down {
  background: linear-gradient(135deg, #8b5cf6, #ff00ff);
  box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
  color: transparent;
}

.card.face-down::after {
  content: '?';
  font-size: 40px;
  color: rgba(255, 255, 255, 0.3);
}

.card.face-up {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #000000;
}

.card.center-card {
  grid-column: 2;
  grid-row: 2;
}

.card .card-value {
  font-size: 24px;
}

.card .card-suit {
  font-size: 30px;
  margin-top: 5px;
}


/* 新牌出现动画 - 从中间放大覆盖 */
.card.new-card {
  animation: cardDealIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center center;
}

@keyframes cardDealIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-20px);
    z-index: 100;
  }
  60% {
    transform: scale(1.15) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 1;
  }
}

/* 牌被选中的高亮效果 */
.card.highlight {
  animation: cardPulse 0.6s ease-in-out infinite alternate;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
  border-color: #ffd700 !important;
  z-index: 10;
}

@keyframes cardPulse {
  from {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
  }
  to {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 80px rgba(255, 215, 0, 0.5);
  }
}

/* 跑马灯点亮效果 */
.card.spin-light {
  box-shadow: 0 0 25px rgba(255, 0, 255, 0.8), 0 0 50px rgba(0, 255, 255, 0.5);
  border-color: #ff00ff !important;
  z-index: 5;
  transform: scale(1.05);
  transition: all 0.1s ease;
}

/* 牌被选中的效果 */
.card.selected {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}
.card.red {
  color: #dc2626;
}

.card.black {
  color: #000000;
}

.card.selectable:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: #8b5cf6;
}

.card.selected {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
  border-color: #00ffff;
}

.card.new-card {
  animation: dealCard 0.5s ease;
}

@keyframes dealCard {
  from {
    transform: translateY(-100px) rotate(10deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}

/* 回合指示器 */
.turn-indicator {
  margin-top: 30px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 14px;
  color: #aaa;
  line-height: 1.4;
  text-align: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.turn-indicator.my-turn {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(139, 92, 246, 0.2));
  color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* 倒计时 */
.countdown {
  position: absolute;
  top: -50px;
  right: 5px;
  width: 42px;
  height: 42px;
  display: none;
  z-index: 10;
}

.countdown.visible {
  display: block;
}

.countdown-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#countdownProgress {
  -webkit-transition: stroke-dashoffset 1s linear;
  transition: stroke-dashoffset 1s linear;

}

.countdown.urgent #countdownProgress {
  stroke: #ff0000;
  -webkit-animation: urgentPulse 0.5s infinite alternate;
  animation: urgentPulse 0.5s infinite alternate;
}

@-webkit-keyframes urgentPulse {
  from { -webkit-filter: drop-shadow(0 0 2px #ff0000); filter: drop-shadow(0 0 2px #ff0000); }
  to { -webkit-filter: drop-shadow(0 0 8px #ff0000); filter: drop-shadow(0 0 8px #ff0000); }
}

@keyframes urgentPulse {
  from { filter: drop-shadow(0 0 2px #ff0000); }
  to { filter: drop-shadow(0 0 8px #ff0000); }
}

#countdownText {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  z-index: 1;
  color: #fff;
  line-height: 1;
  width: auto;
  text-align: center;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.countdown.urgent #countdownText {
  color: #ff0000;
  text-align: center;
  color: #ff0000;
}

/* 开始游戏按钮 */
.btn-start-game {
  display: block;
  margin: 20px auto;
  padding: 16px 60px;
  font-size: 18px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

/* 聊天区 */
.chat-area {
  position: fixed;
  bottom: 60px;
  left: 20px;
  right: 20px;
  max-height: 150px;
  overflow-y: auto;
  pointer-events: none;
  scrollbar-width: none;
}

.chat-area::-webkit-scrollbar {
  display: none;
}

.chat-msg {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 5px;
  max-width: 70%;
  animation: chatIn 0.3s ease;
}

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

.chat-msg .chat-name {
  color: #ff00ff;
  margin-right: 5px;
  font-weight: 500;
}

.chat-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  outline: none;
}

.chat-input-bar button {
  padding: 0 20px;
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

/* 开奖弹窗 */
.bonus-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.bonus-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.bonus-content {
  text-align: center;
  animation: bonusPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bonusPop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.bonus-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffd700, #ff00ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 2s ease infinite;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.bonus-card {
  width: 120px;
  height: 170px;
  margin: 0 auto 30px;
  border-radius: 15px;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 3px solid #ffd700;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 0, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: cardSpin 1s ease;
}

@keyframes cardSpin {
  0% { transform: rotateY(180deg) scale(0.5); }
  100% { transform: rotateY(0) scale(1); }
}

.bonus-card .card-value {
  font-size: 36px;
  color: #ffd700;
}

.bonus-card .card-suit {
  font-size: 50px;
  margin-top: 10px;
}

.bonus-score {
  font-size: 48px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  margin-bottom: 10px;
  animation: scoreBounce 0.5s ease infinite alternate;
}

@keyframes scoreBounce {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.bonus-player {
  font-size: 18px;
  color: #fff;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  padding: 15px 30px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 12px;
  font-size: 15px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  border: 1px solid rgba(255, 0, 255, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast.success {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.toast.error {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* 跑马灯效果 */
.marquee-lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1500;
  overflow: hidden;
}

.marquee-light {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  animation: lightFlash 0.5s ease infinite alternate;
}

@keyframes lightFlash {
  from { opacity: 1; box-shadow: 0 0 10px currentColor; }
  to { opacity: 0.3; box-shadow: 0 0 2px currentColor; }
}

/* 响应式 */
@media (max-width: 480px) {
  .neon-text {
    font-size: 36px;
  }
  
  .card-grid {
    width: 240px;
    height: 330px;
    gap: 8px;
  }
  
  .card .card-value {
    font-size: 20px;
  }
  
  .card .card-suit {
    font-size: 24px;
  }
}

/* 聊天区域暂时隐藏 */
.chat-area, .chat-input-bar {
  display: none !important;
}
/* 回合结束弹窗 */
.round-end-modal .round-end-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #e94560;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 0 40px rgba(233, 69, 96, 0.3);
}

.round-end-title {
  font-size: 28px;
  font-weight: bold;
  color: #e94560;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.round-end-reason {
  color: #aaa;
  margin-bottom: 25px;
  font-size: 14px;
}

.round-end-ranking {
  margin-bottom: 30px;
  max-height: 300px;
  overflow-y: auto;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.ranking-item:nth-child(1) {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.ranking-item:nth-child(2) {
  background: rgba(192, 192, 192, 0.1);
  border: 1px solid rgba(192, 192, 192, 0.2);
}

.ranking-item:nth-child(3) {
  background: rgba(205, 127, 50, 0.1);
  border: 1px solid rgba(205, 127, 50, 0.2);
}

.ranking-medal {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

.ranking-avatar {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin: 0 10px;
.ranking-avatar-img {  width: 100%;  height: 100%;  object-fit: cover;  border-radius: 50%;}
}

.ranking-name {
  flex: 1;
  text-align: left;
  color: #fff;
  font-size: 15px;
}

.ranking-score {
  color: #ffd700;
  font-weight: bold;
  font-size: 16px;
}

.restart-btn {
  width: 100%;
  padding: 14px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

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

/* 规则按钮 */

/* 规则按钮 */

/* 规则按钮 */
.btn-rule {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(255, 0, 255, 0.4);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-rule:hover {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(139, 92, 246, 0.3));
  transform: scale(1.05);
}

/* 规则弹窗 */
.rule-modal .rule-content {
  background: linear-gradient(135deg, #1a0a2e, #2d1b4e);
  border-radius: 20px;
  padding: 24px;
  max-width: 360px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.2);
}

.rule-title {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rule-body {
  color: #ddd;
}

.rule-section {
  margin-bottom: 18px;
}

.rule-section h4 {
  margin: 0 0 8px 0;
  color: #fff;
  font-size: 15px;
}

.rule-section p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #bbb;
}

.rule-section ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #bbb;
}

.rule-section li strong {
  color: #fff;
}


/* 规则标签切换 */
.rule-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
}

.rule-tab {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #888;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.rule-tab.active {
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 255, 0.3));
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 0, 255, 0.2);
}

.rule-tab:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.rule-panel {
  display: none;
}

.rule-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.rule-close-btn {
  width: 100%;
  margin-top: 10px;
}

/* 返回/刷新按钮图标优化 */
.btn-back, .btn-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.btn-back:hover, .btn-refresh:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.btn-back svg, .btn-refresh svg {
  display: block;
}

/* 音量按钮优化 */
.btn-sound {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.btn-sound:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sound svg {
  display: block;
}

.btn-sound.muted .icon-sound-on {
  display: none;
}

.btn-sound.muted .icon-sound-off {
  display: block !important;
  color: #888;
}

.btn-sound.muted {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.05);
}

/* 创建房间浮动按钮 - 叠加优化 */
.btn-float {
  position: fixed !important;
  bottom: 30px !important;
  right: 20px !important;
  box-shadow: 0 4px 25px rgba(255, 0, 255, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(10px);
  border: none;
}

.btn-float::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
  border-radius: 26px;
}

.btn-float:active {
  transform: scale(0.95);
  box-shadow: 0 2px 15px rgba(255, 0, 255, 0.3);
}

/* 玩家头像优化 - 确保完全圆形无方块 */
.player-chip {
  background: transparent;
  border-radius: 50%;
  overflow: visible;
}

.player-chip .avatar {
  width: 45px;
  height: 45px;
  object-fit: cover;
  object-position: center;
  background: transparent !important;
  border-radius: 50%;
  display: block;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  /* 强制圆形裁剪 */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(circle, black 100%, transparent 100%);
  /* 防止边框产生方形感 */
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* 当前玩家头像发光效果 - 使用外层光晕而非box-shadow避免方形感 */
.player-chip.active {
  position: relative;
}

.player-chip.active::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.6) 0%, transparent 70%);
  z-index: -1;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.player-chip.active .avatar {
  border-color: #ff00ff;
  box-shadow: none;
  animation: pulse-scale 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 0.6;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes pulse-scale {
  0%, 100% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.05);
  }
}

/* 确保房主标签和分数标签也是圆角的 */
.player-chip.owner::after {
  border-radius: 8px;
}

.player-chip .score {
  border-radius: 10px;
}

/* ========== 数字扫雷游戏样式 ========== */
.minesweeper-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.mine-range-display {
  text-align: center;
  margin-bottom: 30px;
}

.range-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  display: block;
}

.range-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 32px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.range-separator {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.4);
}

.mine-slider-container {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
}

.mine-slider-track {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 15px;
  cursor: pointer;
}

.mine-slider-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  border-radius: 4px;
  width: 50%;
  transition: width 0.1s ease;
}

.mine-slider-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  cursor: grab;
  transition: left 0.1s ease;
}

.mine-slider-thumb:active {
  cursor: grabbing;
  width: 28px;
  height: 28px;
}

.mine-number-display {
  text-align: center;
  font-size: 48px;
  font-weight: bold;
  color: #ff00ff;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.mine-turn-info {
  text-align: center;
  margin-bottom: 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.btn-confirm-guess {
  width: 200px;
  padding: 14px;
  font-size: 16px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 0, 255, 0.4);
  transition: all 0.3s ease;
}

.btn-confirm-guess:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 0, 255, 0.6);
}

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

.btn-confirm-guess:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mine-setup-area {
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.setup-title {
  font-size: 18px;
  color: #00ffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.mine-number-input {
  margin-bottom: 15px;
}

.mine-number-input input {
  width: 100%;
  padding: 12px 16px;
  font-size: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  outline: none;
}

.mine-number-input input:focus {
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.btn-edit-punishments {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit-punishments:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 踩雷弹窗 */
.mine-hit-modal .mine-hit-content {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 100%);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  border: 2px solid #ff0066;
  box-shadow: 0 0 40px rgba(255, 0, 102, 0.4);
  animation: mineHitShake 0.5s ease;
}

@keyframes mineHitShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.mine-hit-title {
  font-size: 28px;
  font-weight: bold;
  color: #ff0066;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(255, 0, 102, 0.6);
}

.mine-hit-player {
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
}

.mine-hit-number {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.mine-hit-number span {
  font-size: 24px;
  color: #ff0066;
  font-weight: bold;
}

.mine-select-punishment {
  margin-top: 20px;
}

.punishment-title {
  font-size: 16px;
  color: #00ffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.punishment-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.punishment-item {
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  word-wrap: break-word;
  word-break: break-all;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.punishment-item:hover {
  background: rgba(255, 0, 255, 0.2);
  border-color: #ff00ff;
}

.punishment-item.selected {
  background: rgba(255, 0, 255, 0.3);
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
}

/* 惩罚相关滚动条样式 */
.punishment-list::-webkit-scrollbar,
.punishment-show-text::-webkit-scrollbar,
.punishment-edit-list::-webkit-scrollbar {
  width: 6px;
}

.punishment-list::-webkit-scrollbar-track,
.punishment-show-text::-webkit-scrollbar-track,
.punishment-edit-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.punishment-list::-webkit-scrollbar-thumb,
.punishment-show-text::-webkit-scrollbar-thumb,
.punishment-edit-list::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 255, 0.3);
  border-radius: 3px;
}

.punishment-list::-webkit-scrollbar-thumb:hover,
.punishment-show-text::-webkit-scrollbar-thumb:hover,
.punishment-edit-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 0, 255, 0.5);
}


/* 惩罚展示弹窗 */
.punishment-show-modal .punishment-show-content {
  background: linear-gradient(135deg, #0a1a2e 0%, #1b3d5e 100%);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  border: 2px solid #00ffff;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.4);
}

.punishment-show-title {
  font-size: 24px;
  font-weight: bold;
  color: #00ffff;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.punishment-show-player {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.punishment-show-text {
  font-size: 22px;
  font-weight: bold;
  color: #ff00ff;
  padding: 25px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
  word-wrap: break-word;
  word-break: break-all;
  line-height: 1.5;
  max-height: 200px;
  overflow-y: auto;
}

.btn-close-punishment,
.btn-next-round {
  width: 200px;
  padding: 14px;
  font-size: 16px;
  border-radius: 30px;
  background: linear-gradient(135deg, #00ffff, #ff00ff);
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  margin: 0 auto;
  display: block;
}

/* 编辑惩罚弹窗 */
.edit-punishment-modal .edit-punishment-content {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 100%);
  border-radius: 20px;
  padding: 25px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  max-width: 350px;
  width: 90%;
}

.edit-punishment-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 20px;
  text-align: center;
}

.punishment-edit-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.punishment-edit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
}

.punishment-edit-item input {
  flex: 1;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.punishment-edit-item input:focus {
  border-color: #00ffff;
}

.btn-delete-punishment {
  padding: 6px 12px;
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.4);
  border-radius: 6px;
  color: #ff6666;
  cursor: pointer;
  font-size: 12px;
}

.add-punishment {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-punishment input {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.add-punishment input:focus {
  border-color: #00ffff;
}

.add-punishment button {
  padding: 10px 16px;
  background: linear-gradient(135deg, #00ffff, #ff00ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

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

.modal-actions .btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.modal-actions .btn:hover {
  transform: translateY(-2px);
}

.modal-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modal-actions .btn-primary {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
}

.modal-actions .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 0, 255, 0.4);
}

/* 响应式 */
@media (max-width: 480px) {
  .range-numbers {
    font-size: 24px;
  }
  
  .mine-number-display {
    font-size: 36px;
  }
  
  .punishment-list {
    grid-template-columns: 1fr;
  }
}

/* 玩家列表 - 扫雷游戏共用 */
.player-strip-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: all 0.3s;
}
.player-avatar {
  position: relative;
}

.player-avatar img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.player-strip-item.current-turn .player-avatar img {
  border-color: #ff00ff;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.5), 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: pulse 1s infinite;
}

.player-name {
  font-size: 11px;
  color: #aaa;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.owner-badge {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2;
}
}


/* 临时用户弹窗 */
.guest-modal .modal-content {
  width: 90%;
  max-width: 350px;
}

.guest-avatar-section {
  margin: 20px 0;
}

.guest-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.guest-avatar-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.05);
}

.guest-avatar-item:hover {
  border-color: rgba(255, 0, 255, 0.5);
  transform: scale(1.05);
}

.guest-avatar-item.selected {
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.guest-avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guest-login-tip {
  text-align: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #888;
}

.guest-login-tip .link-btn {
  background: none;
  border: none;
  color: #ff00ff;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin-left: 5px;
  text-decoration: underline;
}

.guest-login-tip .link-btn:hover {
  color: #ff66ff;
}

/* 首页登录按钮 */
.btn-login {
  padding: 8px 20px;
  background: linear-gradient(135deg, #ff00ff, #8b5cf6);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 255, 0.4);
}

/* 首页用户信息 */
.home-header .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-header .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ff00ff;
}

.home-header .user-nickname {
  font-size: 14px;
  color: white;
}

/* 房主设置区优化 */
.setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.setup-header .setup-title {
  margin-bottom: 0;
  font-size: 16px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s ease;
  padding: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn-icon.btn-edit-punishments {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 16px;
  border-radius: 50%;
}

/* 惩罚列表编号 */
.punishment-number {
  color: #00ffff;
  font-weight: bold;
  margin-right: 8px;
  min-width: 20px;
  display: inline-block;
}

.punishment-edit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.punishment-edit-item .punishment-edit-input {
  flex: 1;
}

/* 扫雷房主观战模式 */
.mine-owner-view {
  text-align: center;
  padding: 20px;
}

.mine-owner-view .owner-status {
  font-size: 16px;
  color: #ffd700;
  margin-bottom: 15px;
}

.mine-owner-view .mine-info {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.mine-owner-view .mine-number {
  font-size: 32px;
  font-weight: bold;
  color: #ffd700;
}

.mine-owner-view .mine-range {
  font-size: 14px;
  color: #aaa;
  margin-top: 5px;
}

/* 惩罚列表长文本优化 */
.punishment-item {
  word-wrap: break-word;
  word-break: break-all;
  line-height: 1.5;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.punishment-show-text {
  word-wrap: break-word;
  word-break: break-all;
  line-height: 1.6;
  font-size: 22px;
  padding: 20px;
}

/* 惩罚列表滚动优化 */
#punishmentList {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

#punishmentList::-webkit-scrollbar {
  width: 6px;
}

#punishmentList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

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

#punishmentList::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}


/* 断线重连遮罩 */
.disconnect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.disconnect-overlay.active {
  opacity: 1;
  visibility: visible;
}

.disconnect-content {
  text-align: center;
  color: white;
}

.disconnect-icon {
  margin-bottom: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.disconnect-content p {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #ff6b6b;
}

.disconnect-content span {
  font-size: 14px;
  color: #999;
}
