.mode-selection-overlay {
  position: fixed;
  inset: 0;
  top: 32px;
  z-index: 550;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease both;
}
.mode-selection-card {
  background: #111;
  border: 2px solid #222;
  border-radius: 18px;
  padding: 40px 48px;
  max-width: 480px;
  width: 100%;
  animation: modalSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.mode-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.mode-selection-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: center;
}
.mode-selection-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 8px;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.mode-selection-close:hover {
  background: #1a1a1a;
  border-color: #555;
  color: #aaa;
}
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mode-btn {
  padding: 18px 24px;
  background: #1a1a1a;
  border: 2px solid #2a2a2a;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.mode-btn-icon {
  font-size: 24px;
}
.mode-btn:hover {
  background: #222;
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}
.mode-btn:active {
  transform: scale(0.98);
}
.online-players-overlay {
  position: fixed;
  inset: 0;
  top: 32px;
  z-index: 550;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease both;
}
.online-players-card {
  background: #111;
  border: 2px solid #222;
  border-radius: 18px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.online-players-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.online-players-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.online-players-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 8px;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.online-players-close:hover {
  background: #1a1a1a;
  border-color: #555;
  color: #aaa;
}
.online-players-search {
  margin-bottom: 16px;
}
.online-players-search input {
  width: 100%;
  background: #0d0d0d;
  border: 2px solid #222;
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.online-players-search input:focus {
  border-color: #2563eb;
}
.online-players-search input::placeholder {
  color: #444;
}
.online-players-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
}
.online-players-list::-webkit-scrollbar {
  width: 6px;
}
.online-players-list::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 3px;
}
.online-player-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.online-player-card:hover {
  background: #222;
  border-color: #333;
}
.online-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2563eb;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.online-player-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0d0d0d;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #555;
  flex-shrink: 0;
}
.online-player-info {
  flex: 1;
  min-width: 0;
}
.online-player-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.online-player-status {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.online-player-status.online {
  color: #4ade80;
}
.online-player-status.ingame {
  color: #f59e0b;
}
.online-player-status.away {
  color: #666;
}
.online-player-status.offline {
  color: #444;
}
.online-player-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.online-player-invite-btn {
  padding: 8px 18px;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}
.online-player-invite-btn:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}
.online-player-invite-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
  opacity: 0.4;
}
.online-player-invite-btn:disabled:hover {
  background: #333;
  transform: none;
}
.duel-invitation-overlay {
  position: fixed;
  inset: 0;
  top: 32px;
  z-index: 600;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease both;
}
.duel-invitation-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #2563eb;
  border-radius: 20px;
  padding: 36px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: duelInviteIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
  box-shadow: 0 20px 60px rgba(37,99,235,0.4);
}
@keyframes duelInviteIn {
  from { opacity: 0; transform: scale(0.8) translateY(-30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.duel-invitation-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2563eb;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(37,99,235,0.6);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.duel-invitation-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.duel-invitation-text {
  font-size: 15px;
  color: #93c5fd;
  margin-bottom: 24px;
  line-height: 1.6;
}
.duel-invitation-timer {
  font-size: 32px;
  font-weight: 900;
  color: #60a5fa;
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}
.duel-invitation-buttons {
  display: flex;
  gap: 12px;
}
.duel-invitation-accept {
  flex: 1;
  padding: 14px;
  background: #16a34a;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.duel-invitation-accept:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22,163,74,0.4);
}
.duel-invitation-decline {
  flex: 1;
  padding: 14px;
  background: #dc2626;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.duel-invitation-decline:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220,38,38,0.4);
}
.duel-countdown-overlay {
  position: fixed;
  inset: 0;
  top: 32px;
  z-index: 650;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s ease both;
}
.duel-countdown-number {
  font-size: 120px;
  font-weight: 900;
  color: #2563eb;
  text-shadow: 0 0 60px rgba(37,99,235,0.8);
  animation: countdownPulse 1s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes countdownPulse {
  0%   { transform: scale(0.5); opacity: 0; }
  50%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.theme-light .mode-selection-card,
.theme-light .online-players-card {
  background: #fff;
  border-color: #d0ddf0;
}
.theme-light .mode-selection-title,
.theme-light .online-players-title,
.theme-light .online-player-name {
  color: #1a1a40;
}
.theme-light .mode-selection-close,
.theme-light .online-players-close {
  border-color: #d0d8f0;
  color: #888;
}
.theme-light .mode-selection-close:hover,
.theme-light .online-players-close:hover {
  background: #f0f4ff;
  border-color: #b0b8cc;
  color: #444;
}
.theme-light .mode-btn {
  background: #f0f4ff;
  border-color: #c8d0f0;
  color: #1a1a40;
}
.theme-light .mode-btn:hover {
  background: #e0e8ff;
  border-color: #2563eb;
}
.theme-light .online-player-card {
  background: #f8faff;
  border-color: #e0e8f0;
}
.theme-light .online-player-card:hover {
  background: #f0f4ff;
  border-color: #c8d0f0;
}
.theme-light .online-players-search input {
  background: #f8faff;
  border-color: #d0d8f0;
  color: #1a1a40;
}
.theme-light .online-players-search input::placeholder {
  color: #b0b8cc;
}
