:root {
  --bg-deep: #16120e;
  --bg-warm: #1f1813;
  --bg-glow: radial-gradient(circle at 50% 50%, rgba(196, 151, 59, 0.15) 0%, transparent 70%);

  --square-light: #e6d3ba;
  --square-dark: #8b6142;
  --square-light-hover: #fcf1df;
  --square-dark-hover: #a67551;

  --accent-gold: #c4973b;
  --accent-gold-dim: rgba(196, 151, 59, 0.35);
  --accent-gold-glow: rgba(196, 151, 59, 0.5);
  --accent-red: #c44b3b;
  --accent-red-glow: rgba(196, 75, 59, 0.45);

  --text-primary: #f0e6d3;
  --text-secondary: #dcd0bf;
  --text-muted: #7a6b58;

  --glass-bg: rgba(42, 32, 24, 0.65);
  --glass-border: rgba(196, 151, 59, 0.15);
  --glass-highlight: rgba(240, 230, 211, 0.06);

  --frame-color: #2a2018;
  --frame-light: #3d2f23;
  --frame-shadow: rgba(0, 0, 0, 0.7);

  --board-size: min(85vw, calc(100vh - 120px), 560px);
  --square-size: calc(var(--board-size) / 8);

  --font-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-body: 'Cinzel', serif;

  --transition-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(196, 151, 59, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 97, 66, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(26, 20, 16, 0.85) 0%, var(--bg-deep) 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
}

.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2rem;
  gap: 1rem;
}

.app-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--text-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow:
    0 0 30px rgba(196, 151, 59, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.icon-btn {
  position: absolute;
  right: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition-smooth);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.icon-btn:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
  background: rgba(196, 151, 59, 0.1);
  transform: rotate(45deg);
}

.app-main {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0 2rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 var(--glass-highlight);
}

.side-panel {
  width: 200px;
  flex-shrink: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 1rem;
}

.turn-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.5s var(--transition-smooth);
}

.turn-indicator.white-turn {
  border-left: 3px solid var(--text-primary);
}

.turn-indicator.black-turn {
  border-left: 3px solid var(--text-muted);
}

.turn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.5s var(--transition-smooth);
  flex-shrink: 0;
}

.white-turn .turn-dot {
  background: var(--text-primary);
  box-shadow: 0 0 10px rgba(240, 230, 211, 0.4);
}

.black-turn .turn-dot {
  background: var(--text-muted);
  box-shadow: 0 0 10px rgba(122, 107, 88, 0.3);
}

.turn-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.captured-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.captured-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.captured-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 28px;
}

.captured-piece {
  width: 24px;
  height: 24px;
  opacity: 0.75;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  animation: capturedIn 0.35s var(--transition-spring) both;
}

@keyframes capturedIn {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(-8px);
  }
  to {
    opacity: 0.75;
    transform: scale(1) translateY(0);
  }
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  transition: all 0.3s var(--transition-smooth);
}

.glass-btn {
  background: rgba(196, 151, 59, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-btn:hover {
  background: rgba(196, 151, 59, 0.18);
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 151, 59, 0.15);
}

.glass-btn:active {
  transform: translateY(0);
}

.board-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-frame {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--frame-light), var(--frame-color));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 var(--frame-shadow);
  border: 1px solid rgba(60, 48, 37, 0.6);
}

.board {
  display: grid;
  grid-template-columns: repeat(8, var(--square-size));
  grid-template-rows: repeat(8, var(--square-size));
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.85s var(--transition-smooth);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.board.rotated {
  transform: rotate(180deg);
}

.square {
  width: var(--square-size);
  height: var(--square-size);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.square.light {
  background-color: var(--square-light);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}

.square.dark {
  background-color: var(--square-dark);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

.square.light::before,
.square.dark::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 64px 64px;
  pointer-events: none;
}

.square.selected {
  background-color: rgba(196, 151, 59, 0.45) !important;
  box-shadow: inset 0 0 12px rgba(196, 151, 59, 0.3);
}

.square.valid-move::after {
  content: '';
  position: absolute;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(196, 151, 59, 0.45);
  box-shadow: 0 0 10px var(--accent-gold-glow);
  pointer-events: none;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.square.valid-capture {
  box-shadow: inset 0 0 0 3px var(--accent-gold-dim) !important;
}

.square.valid-capture::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2.5px solid var(--accent-gold-dim);
  pointer-events: none;
  animation: ringPulse 1.5s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

.square.last-move-from,
.square.last-move-to {
  background-color: rgba(196, 151, 59, 0.22) !important;
}

.square.in-check {
  animation: checkPulse 1s ease-in-out infinite;
}

@keyframes checkPulse {
  0%, 100% {
    box-shadow: inset 0 0 12px var(--accent-red-glow), inset 0 0 4px var(--accent-red-glow);
  }
  50% {
    box-shadow: inset 0 0 24px var(--accent-red-glow), inset 0 0 8px rgba(196, 75, 59, 0.6);
  }
}

.piece {
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s var(--transition-spring), filter 0.2s ease;
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 2;
}

.square.selected .piece {
  transform: rotate(0deg) scale(1.1) !important;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px var(--accent-gold-glow));
}

.rank-label,
.file-label {
  position: absolute;
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  line-height: 1;
  transition: transform 0.85s var(--transition-smooth);
}

.rank-label {
  top: 3px;
  left: 4px;
}

.file-label {
  bottom: 3px;
  right: 4px;
}

.square.light .rank-label,
.square.light .file-label {
  color: var(--square-dark);
  opacity: 0.7;
}

.square.dark .rank-label,
.square.dark .file-label {
  color: var(--square-light);
  opacity: 0.7;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--transition-smooth);
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 320px;
  height: 100vh;
  z-index: 60;
  padding: 2rem 1.5rem;
  border-radius: 16px 0 0 16px;
  transition: right 0.45s var(--transition-smooth);
  overflow-y: auto;
}

.settings-panel.visible {
  right: 0;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.settings-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.settings-header .icon-btn {
  position: static;
}

.settings-header .icon-btn:hover {
  transform: rotate(0deg) scale(1.1);
}

.settings-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.piece-set-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.piece-set-option {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  font-family: var(--font-body);
  color: var(--text-secondary);
  text-align: left;
}

.piece-set-option:hover {
  background: rgba(196, 151, 59, 0.08);
  border-color: var(--glass-border);
}

.piece-set-option.active {
  border-color: var(--accent-gold-dim);
  background: rgba(196, 151, 59, 0.12);
  box-shadow: 0 0 20px rgba(196, 151, 59, 0.08);
}

.set-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.piece-set-option.active .set-name {
  color: var(--accent-gold);
}

.piece-preview {
  display: flex;
  gap: 6px;
}

.piece-preview img {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.promotion-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  z-index: 60;
  padding: 1.5rem 2rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--transition-spring);
}

.promotion-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.promotion-pieces {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.promotion-choice {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  padding: 8px;
  transition: all 0.25s var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.promotion-choice img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.promotion-choice:hover {
  background: rgba(196, 151, 59, 0.15);
  border-color: var(--accent-gold-dim);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(196, 151, 59, 0.15);
}

.game-over-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--transition-smooth);
}

.game-over-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.game-over-content {
  text-align: center;
  padding: 2.5rem 3rem;
  max-width: 380px;
  animation: gameOverIn 0.5s var(--transition-spring) both;
}

@keyframes gameOverIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.game-over-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(196, 151, 59, 0.3);
}

.game-over-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  letter-spacing: 0.03em;
}

@media (max-width: 750px) {
  .app-main {
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem 1.5rem;
  }

  .side-panel {
    width: 100%;
    max-width: var(--board-size);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: static;
    padding: 1rem;
  }

  .turn-indicator {
    flex: 1;
    min-width: 140px;
  }

  .captured-section {
    flex: 1;
    flex-direction: row;
    gap: 0.75rem;
    min-width: 140px;
  }

  .controls {
    flex-direction: row;
    width: 100%;
  }

  .controls .btn {
    flex: 1;
  }

  .app-header {
    padding: 1rem 1.5rem;
  }

  .board-frame {
    padding: 8px;
  }

  .settings-panel {
    width: 280px;
  }
}

@media (max-width: 400px) {
  :root {
    --board-size: min(92vw, 92vh, 560px);
  }

  .app-title {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  .icon-btn {
    right: 1rem;
  }
}


.lobby-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--transition-smooth);
}

.lobby-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 40% 30%, rgba(196, 151, 59, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 70%, rgba(139, 97, 66, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.lobby-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.lobby-content,
.lobby-content-temp {
  position: relative;
  text-align: center;
  z-index: 1;
  animation: lobbyFadeIn 0.6s var(--transition-smooth) both;
}

@keyframes lobbyFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}.lobby-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(196, 151, 59, 0.2), 0 2px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.lobby-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.lobby-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.lobby-btn {
  min-width: 220px;
  padding: 0.9rem 2rem;
  font-size: 0.85rem;
}

.room-screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.room-card {
  padding: 2.5rem 2.5rem;
  text-align: center;
  max-width: 360px;
  width: 90vw;
  animation: lobbyFadeIn 0.4s var(--transition-smooth) both;
}

.room-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.room-code-display {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.code-digit-display {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--accent-gold-dim);
  border-radius: 10px;
  width: 56px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 12px rgba(196, 151, 59, 0.3);
  letter-spacing: 0;
}

.room-code-input {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.code-digit {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  width: 56px;
  height: 68px;
  text-align: center;
  outline: none;
  transition: all 0.3s var(--transition-smooth);
  caret-color: var(--accent-gold);
}

.code-digit:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(196, 151, 59, 0.2);
  background: rgba(196, 151, 59, 0.06);
}

.room-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  min-height: 1.2em;
}

.room-back-btn {
  margin-top: 0.5rem;
  opacity: 0.7;
}

.room-back-btn:hover {
  opacity: 1;
}

.connection-status {
  display: none;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  text-align: center;
}

.connection-status.connected {
  color: #7dcea0;
  background: rgba(125, 206, 160, 0.1);
  border: 1px solid rgba(125, 206, 160, 0.2);
}

.btn-resign {
  display: none;
  color: var(--accent-red);
  border-color: rgba(196, 75, 59, 0.2);
}

.btn-resign:hover {
  background: rgba(196, 75, 59, 0.12);
  border-color: rgba(196, 75, 59, 0.35);
  color: #c44b3b;
  box-shadow: 0 4px 16px rgba(196, 75, 59, 0.12);
}


.disconnect-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--transition-smooth);
}

.disconnect-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.disconnect-content {
  text-align: center;
  padding: 2.5rem 3rem;
  max-width: 380px;
  animation: gameOverIn 0.5s var(--transition-spring) both;
}

@media (max-width: 750px) {
  .lobby-btn {
    min-width: 180px;
  }

  .code-digit-display,
  .code-digit {
    width: 48px;
    height: 58px;
    font-size: 1.8rem;
  }

  .room-card {
    padding: 2rem 1.5rem;
  }
}