:root {
  --grid-bg-color: #e8faff;
  --grid-pattern: linear-gradient(#bbc6ff 2px, transparent 2px),
    linear-gradient(90deg, #bbc6ff 2px, transparent 2px);
  --grid-size: 25px 25px;
  --form-bg-color: #f4fdff;
  --form-pattern: linear-gradient(#bbc6ff4d 1px, transparent 1px),
    linear-gradient(90deg, #bbc6ff4d 1px, transparent 1px);
  --form-size: 20px 20px;
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

body, body * {
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

::selection {
  background: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  touch-action: manipulation;
  color: #222;
  background: repeating-linear-gradient(45deg, #fffba6, #fffba6 3.5vw, #fff 3.5vw 4vw, #ffcee7 4vw 7.5vw, #fff 7.5vw 8vw);
  width: 100%;
  height: 100%;
  font-family: Arial Rounded MT Bold, Arial, sans-serif;
  font-size: 16px;
  overflow: hidden;
}

@media (width <= 1200px) {
  html, body {
    font-size: 15px;
  }
}

@media (width <= 900px) {
  html, body {
    font-size: 14px;
  }
}

@media (width <= 600px) {
  html, body {
    font-size: 13px;
  }
}

@media (width <= 480px) {
  html, body {
    font-size: 12px;
  }
}

.lobby-table th:nth-child(4), .lobby-table td:nth-child(4) {
  text-align: right;
}

.lobby-table th:nth-child(2), .lobby-table td:nth-child(2), .lobby-table th:nth-child(3), .lobby-table td:nth-child(3) {
  text-align: center;
}

.container {
  width: 100vw;
  height: 100vh;
  padding: var(--safe-area-inset-top) var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);
  z-index: 2;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  display: flex;
  position: relative;
  overflow: hidden;
}

.container .view, .container .menu, .container .profile, .container .connection-status {
  pointer-events: auto;
}

canvas {
  z-index: 1;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

.view {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

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

.grid-overlay {
  --grid-size: 8vmin;
  --grid-offset: calc(var(--grid-size) / 2);
  background-image: radial-gradient(#00e5ff 15%, #0000 16%), radial-gradient(#a200ff 15%, #0000 16%);
  background-size: var(--grid-size) var(--grid-size);
  background-position: 0 0, var(--grid-offset) var(--grid-offset);
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.title {
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  z-index: 2;
  white-space: nowrap;
  background: #ffea00;
  border: 6px dashed #f39;
  border-radius: 30px;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  margin-bottom: clamp(1rem, 4vh, 2rem);
  padding: clamp(.4rem, 2vw, .5rem) clamp(1rem, 4vw, 2rem);
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.2;
  transition: all .3s;
  display: flex;
  position: relative;
  transform: rotate(-2deg);
}

.title span {
  white-space: nowrap;
  text-shadow: -3px -3px #222, 3px -3px #222, -3px 3px #222, 3px 3px #222, 5px 5px #222;
  line-height: .9;
  display: block;
}

.title span:first-child {
  color: #f39;
  margin-bottom: .2em;
}

.title span:nth-child(2) {
  color: #00e5ff;
}

.menu {
  z-index: 2;
  background-color: #e8faff;
  background-image: linear-gradient(#bbc6ff 2px, #0000 2px), linear-gradient(90deg, #bbc6ff 2px, #0000 2px);
  background-size: 25px 25px;
  border: 6px solid #f39;
  border-radius: 40px;
  flex-direction: column;
  align-items: center;
  width: min(30%, 400px);
  min-width: min(300px, 90vw);
  max-width: 400px;
  margin: 0 1rem;
  padding: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  position: relative;
  box-shadow: 0 14px #222, inset 0 0 0 6px #ffea00;
}

.settings-gear {
  top: calc(1rem + var(--safe-area-inset-top));
  right: calc(1rem + var(--safe-area-inset-right));
  color: #222;
  cursor: pointer;
  z-index: 3;
  background: #ffea00;
  border: 4px solid #222;
  border-radius: 50%;
  width: clamp(52px, 8vmin, 68px);
  height: clamp(52px, 8vmin, 68px);
  font-size: clamp(1.8rem, 5vmin, 2.8rem);
  line-height: 1;
  transition: transform .2s, box-shadow .2s, background .2s;
  position: absolute;
  box-shadow: 0 6px #222;
}

.settings-gear:hover, .settings-gear:focus-visible {
  background: #00e5ff;
  outline: none;
  transform: translateY(3px) rotate(20deg);
  box-shadow: 0 3px #222;
}

.btn {
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #222;
  background: #00e5ff;
  border: 4px solid #222;
  border-radius: 30px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: clamp(.5rem, 1.5vw, 1rem) 0;
  padding: clamp(.8rem, 2.5vw, 1.2rem);
  font-family: Arial Rounded MT Bold, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 900;
  transition: all .2s cubic-bezier(.68, -.55, .265, 1.55);
  display: flex;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px #222;
}

.btn:hover {
  transform: translateY(3px) scale(1.02);
  box-shadow: 0 3px #222;
}

.btn-single {
  color: #fff;
  text-shadow: 2px 2px #222;
  background: #f39;
}

.btn-single-custom {
  color: #fff;
  text-shadow: none;
  background: #f39;
}

.btn-single-custom:hover {
  color: #fff;
  text-shadow: none;
  background: #ff55b3;
}

.btn-multi {
  color: #f39;
  text-shadow: none;
  background: #00e5ff;
}

.btn-multi:hover {
  color: #f39;
  text-shadow: none;
  background: #33ecff;
}

.btn-battle-royale {
  color: #7b1d4f;
  text-shadow: none;
  background: #ffdc35;
}

.btn-battle-royale:hover {
  color: #7b1d4f;
  text-shadow: none;
  background: #ffe76b;
}

.lobby-controls {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  width: 100%;
  margin-bottom: .1rem;
  display: flex;
}

.lobby-controls-left {
  flex: none;
  display: flex;
}

.lobby-controls-right {
  flex: none;
  gap: .8rem;
  display: flex;
}

.lobby-menu {
  background-color: var(--form-bg-color);
  background-image: var(--form-pattern);
  background-size: var(--form-size);
  z-index: 2;
  border: 6px solid #f39;
  border-radius: 40px;
  flex-direction: column;
  align-items: center;
  width: min(90%, 900px);
  max-width: 900px;
  max-height: 80vh;
  margin: 0 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  position: relative;
  box-shadow: 0 15px #f396, inset 0 0 0 6px #ffea00;
}

.lobby-btn {
  white-space: nowrap;
  text-align: center;
  border-radius: 20px;
  flex-shrink: 1;
  flex-basis: auto;
  justify-content: center;
  align-items: center;
  min-width: min(120px, 20vw);
  margin-left: 1px;
  margin-right: 1px;
  padding: clamp(.6rem, 1.5vw, .8rem) clamp(.8rem, 2vw, 1rem);
  font-size: clamp(.8rem, 2vw, 1rem);
  display: flex;
}

.btn-refresh {
  background: #00e5ff;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  display: flex;
}

.btn-refresh.refreshing {
  opacity: .8;
  pointer-events: none;
}

.btn-refresh.refreshing .refresh-icon {
  animation: .5s linear infinite rotate;
}

.btn-back {
  color: #fff;
  background: #f39;
}

.btn-create {
  background: #6f0;
  justify-content: center;
  align-items: center;
  padding: clamp(.6rem, 1.5vw, .8rem) clamp(.8rem, 2vw, 1rem);
  display: flex;
}

.table-container {
  scrollbar-width: auto;
  scrollbar-color: #f39 #fff;
  background: #fff9fc;
  border: 2px solid #22222226;
  border-radius: 20px;
  width: 100%;
  max-height: min(400px, 50vh);
  margin: clamp(.5rem, 1.5vw, 1rem) 0;
  transition: max-height .3s;
  overflow-y: auto;
}

.table-container::-webkit-scrollbar {
  width: 16px;
}

.table-container::-webkit-scrollbar-track {
  background: #fff;
  border-left: 4px solid #00e5ff;
  border-radius: 0 20px 20px 0;
}

.table-container::-webkit-scrollbar-thumb {
  background: #f39;
  border: 3px dotted #ffea00;
  border-radius: 10px;
}

.lobby-table {
  border-collapse: collapse;
  width: 100%;
  transition: all .3s;
}

.lobby-table th {
  color: #f39;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 10;
  background: #ffea00;
  border-bottom: 4px solid #f39;
  padding: clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: 900;
  position: sticky;
  top: 0;
}

.lobby-table td {
  color: #222;
  border-bottom: 1px solid #2222221a;
  padding: clamp(.4rem, 1.2vw, .6rem) clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: bold;
}

.lobby-table tr {
  height: min(32px, 6vw);
}

.lobby-table tr:nth-child(2n) {
  background: #e6ffff;
}

.lobby-table tr:hover {
  background: #ffc;
}

.player-count {
  text-align: center;
}

.password-protected {
  text-align: center;
  font-size: clamp(.9rem, 2.5vw, 1.1rem);
}

.btn-join {
  background: #6f0;
  border: 3px solid #222;
  border-radius: 15px;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: 70px;
  margin: 0 0 0 auto;
  padding: clamp(.3rem, 1vw, .4rem) clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  display: flex;
  box-shadow: 0 4px #222;
}

.btn-join:hover {
  transform: translateY(2px);
  box-shadow: 0 2px #222;
}

.no-lobbies {
  text-align: center;
  color: #f39;
  padding: clamp(1rem, 3vw, 2rem);
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 900;
}

.modal-overlay {
  backdrop-filter: blur(5px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  background: #0009;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: opacity .3s;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.password-modal, .create-modal, .name-modal, .audio-settings-modal, .difficulty-modal {
  background-color: var(--form-bg-color);
  background-image: var(--form-pattern);
  background-size: var(--form-size);
  border: 6px solid #f39;
  border-radius: 40px;
  flex-direction: column;
  width: min(90%, 500px);
  max-width: 500px;
  margin: 0 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  transition: transform .4s cubic-bezier(.68, -.55, .265, 1.55);
  display: flex;
  position: relative;
  transform: translateY(20px) scale(.9);
  box-shadow: 0 15px #ff339980, inset 0 0 0 6px #ffea00;
}

.create-modal, .difficulty-modal {
  max-height: 90vh;
}

.difficulty-modal {
  overflow-y: auto;
}

.create-modal {
  padding: 0;
  overflow: hidden;
}

.create-modal-scroll {
  scrollbar-color: #f39 #fff6a6;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  flex-direction: column;
  width: 100%;
  max-height: calc(90vh - 12px);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  overflow: hidden auto;
}

.create-modal-scroll::-webkit-scrollbar {
  width: 14px;
}

.create-modal-scroll::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.create-modal-scroll::-webkit-scrollbar-track {
  background: #fff6a6;
  border-radius: 999px;
  margin-block: 40px;
  box-shadow: inset 0 0 0 2px #00e5ff;
}

.create-modal-scroll::-webkit-scrollbar-thumb {
  background: #f39;
  border: 3px solid #ffea00;
  border-radius: 999px;
}

.create-modal-scroll::-webkit-scrollbar-thumb:hover {
  background: #a200ff;
}

.modal-overlay.active .password-modal, .modal-overlay.active .create-modal, .modal-overlay.active .name-modal, .modal-overlay.active .audio-settings-modal, .modal-overlay.active .difficulty-modal {
  transform: translateY(0) scale(1);
}

.audio-setting {
  color: #222;
  text-transform: uppercase;
  flex-direction: column;
  gap: .65rem;
  margin: .75rem 0;
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 900;
  display: flex;
}

.audio-slider-line {
  align-items: center;
  gap: 1rem;
  display: flex;
}

.audio-volume-slider {
  accent-color: #f39;
  cursor: pointer;
  width: 100%;
}

.audio-slider-line output {
  color: #a200ff;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 4ch;
}

.modal-title {
  color: #f39;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px #ffea00;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 900;
}

.modal-message {
  text-align: center;
  color: #222;
  margin-bottom: clamp(1rem, 3vw, 2rem);
  font-size: clamp(.95rem, 2.4vw, 1.1rem);
  font-weight: bold;
}

.form-group {
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.form-label {
  color: #222;
  text-transform: uppercase;
  margin-bottom: clamp(.3rem, 1vw, .5rem);
  font-size: clamp(.9rem, 2.5vw, 1rem);
  font-weight: 900;
  display: block;
}

.form-select {
  color: #222;
  appearance: none;
  background-color: #fff9;
  background-image: url("data:image/svg+xml;utf8,<svg fill=\"%23222222\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 10l5 5 5-5z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  border: 3px solid #222;
  border-radius: 20px;
  width: 100%;
  padding: clamp(.8rem, 2vw, 1rem) 2.5rem clamp(.8rem, 2vw, 1rem) clamp(.8rem, 2vw, 1rem);
  font-family: Arial Rounded MT Bold, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: bold;
}

.form-select::-ms-expand {
  display: none;
}

.form-input:focus, .form-select:focus {
  border-color: #f39;
  outline: none;
  box-shadow: 0 0 0 4px #ffea00;
}

.form-input::placeholder {
  color: #aaa;
  letter-spacing: 0;
  font-weight: normal;
}

#lobby-password::placeholder, #password-input::placeholder, #player-name-input::placeholder {
  letter-spacing: 0;
  font-size: .92em;
}

input[type="password"].form-input {
  letter-spacing: .04em;
  font-size: clamp(.9rem, 2vw, 1rem);
  line-height: 1.2;
}

.form-hint {
  color: #555;
  margin-top: clamp(.3rem, 1vw, .5rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: bold;
}

.difficulty-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  display: grid;
}

.difficulty-option {
  cursor: pointer;
  display: block;
  position: relative;
}

.difficulty-option input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  position: absolute;
}

.difficulty-card {
  text-align: center;
  background: #ffffffd1;
  border: 4px solid #222;
  border-radius: 20px;
  justify-content: center;
  align-items: center;
  min-height: 92px;
  padding: 1rem;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex;
}

.difficulty-card-title {
  color: #00a7c4;
  text-transform: uppercase;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
}

.difficulty-card[data-difficulty="hard"] .difficulty-card-title {
  color: #d81b60;
}

.difficulty-option input:checked + .difficulty-card {
  border-color: #00a7c4;
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px #ffea00, 0 7px #00a7c459;
}

.difficulty-option input:checked + .difficulty-card[data-difficulty="hard"] {
  border-color: #d81b60;
  box-shadow: 0 0 0 4px #ffea00, 0 7px #d81b6059;
}

.difficulty-option input:focus-visible + .difficulty-card {
  outline-offset: 4px;
  outline: 4px solid #a200ff;
}

.modal-buttons {
  justify-content: center;
  gap: clamp(.5rem, 2vw, 1rem);
  margin-top: auto;
  padding-top: clamp(1rem, 3vw, 1.5rem);
  display: flex;
}

.modal-btn {
  justify-content: center;
  align-items: center;
  min-width: min(120px, 30vw);
  padding: clamp(.6rem, 1.5vw, .8rem) clamp(1rem, 2.5vw, 1.5rem);
  font-size: clamp(.9rem, 2.5vw, 1.1rem);
  display: flex;
}

.btn-cancel {
  color: #222;
  background: #ffea00;
}

.btn-submit {
  background: #6f0;
}

.btn-submit:disabled {
  color: #666;
  cursor: not-allowed;
  background: #ddd;
  border-color: #999;
  box-shadow: 0 4px #999;
}

.btn-submit:disabled:hover {
  transform: none;
  box-shadow: 0 4px #999;
}

.btn-close-modal {
  color: #222;
  cursor: pointer;
  background: #ffea00;
  border: 3px solid #222;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 900;
  transition: transform .3s;
  position: absolute;
  top: clamp(.5rem, 2vw, 1rem);
  right: clamp(.5rem, 2vw, 1rem);
  box-shadow: 0 3px #222;
}

.btn-close-modal:hover {
  color: #fff;
  background: #f39;
  transform: scale(1.1) rotate(90deg);
}

.error-toast {
  color: #f39;
  z-index: 10000;
  opacity: 0;
  text-align: center;
  pointer-events: none;
  background: #ffea00;
  border: 5px dashed #f39;
  border-radius: 30px;
  align-items: center;
  gap: 12px;
  max-width: 85%;
  padding: 18px 30px;
  font-size: 1.1rem;
  transition: all .5s cubic-bezier(.68, -.55, .27, 1.55);
  display: flex;
  position: fixed;
  bottom: 30px;
  left: 50%;
  overflow: hidden;
  transform: translateX(-50%) translateY(100px);
  box-shadow: 0 10px #f396;
}

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

.error-icon {
  flex-shrink: 0;
  font-size: 2rem;
  animation: 1s infinite bounce;
}

.error-message {
  text-shadow: 1px 1px #fff;
  text-transform: uppercase;
  font-weight: 900;
}

.lobby-room {
  background-color: var(--form-bg-color);
  background-image: var(--form-pattern);
  background-size: var(--form-size);
  z-index: 2;
  border: 6px solid #f39;
  border-radius: 40px;
  flex-direction: column;
  align-items: center;
  width: min(90%, 800px);
  max-width: 800px;
  max-height: 80vh;
  margin: 0 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  position: relative;
  box-shadow: 0 15px #f396, inset 0 0 0 6px #ffea00;
}

.lobby-header {
  border-bottom: 4px dashed #00e5ff;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: clamp(.5rem, 1vw, .75rem);
  padding-bottom: clamp(.25rem, .5vw, .4rem);
  display: flex;
}

.lobby-info {
  flex-direction: column;
  flex: 1;
  gap: .5rem;
  min-width: 0;
  display: flex;
}

.lobby-difficulty {
  color: #333;
  text-transform: uppercase;
  align-items: center;
  gap: .55rem;
  font-size: clamp(.75rem, 2vw, .9rem);
  font-weight: 900;
  display: flex;
}

.difficulty-badge {
  color: #00697a;
  background: #c9f8ff;
  border: 2px solid #007f94;
  border-radius: 999px;
  padding: .25rem .65rem;
}

.difficulty-badge[data-difficulty="hard"] {
  color: #9b0d42;
  background: #ffd4e5;
  border-color: #b4114d;
}

.lobby-difficulty[hidden], #lobby-difficulty-group[hidden] {
  display: none;
}

.lobby-player-counter {
  color: #f39;
  text-align: left;
  margin-left: auto;
  font-size: clamp(.7rem, 2.2vw, .9rem);
  font-weight: 900;
}

.lobby-name {
  color: #a200ff;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-transform: uppercase;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  overflow: hidden;
}

.lobby-actions {
  flex-shrink: 0;
  gap: clamp(.5rem, 1vw, .8rem);
  display: flex;
}

.players-container {
  background: #fff9fc;
  border: 2px solid #22222226;
  border-radius: 20px;
  width: 100%;
  max-height: min(400px, 50vh);
  margin: clamp(.5rem, 1.5vw, 1rem) 0;
  overflow-y: auto;
}

.players-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.players-table th {
  color: #f39;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 10;
  background: #ffea00;
  border-bottom: 4px solid #f39;
  padding: clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: 900;
  position: sticky;
  top: 0;
}

.players-table td {
  vertical-align: middle;
  color: #222;
  border-bottom: 1px solid #2222221a;
  padding: clamp(.4rem, 1.2vw, .6rem) clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.8rem, 2vw, .9rem);
  font-weight: bold;
}

.players-table tr:hover {
  background: #ffc;
}

.player-name {
  width: 70%;
}

.player-status {
  width: 30%;
  display: none;
}

.player-actions-cell {
  display: none;
}

.player-is-creator .player-name {
  width: 80%;
}

.player-is-creator .player-status {
  display: none;
}

.player-is-creator .player-actions-cell {
  text-align: right;
  width: 20%;
  display: table-cell;
}

.player-actions {
  justify-content: flex-end;
  gap: 0;
  display: flex;
}

.btn-leave, .btn-start {
  white-space: nowrap;
  border: 3px solid #222;
  border-radius: 15px;
  width: auto;
  padding: clamp(.3rem, 1vw, .4rem) clamp(.6rem, 1.5vw, .8rem);
  font-size: clamp(.7rem, 1.8vw, .8rem);
  box-shadow: 0 4px #222;
}

.btn-kick {
  color: #fff;
  background: #f39;
  border: 2px solid #222;
  border-radius: 10px;
  width: auto;
  min-width: 60px;
  margin: 0;
  padding: clamp(.2rem, .8vw, .3rem) clamp(.4rem, 1.2vw, .6rem);
  font-size: clamp(.6rem, 1.5vw, .7rem);
  box-shadow: 0 3px #222;
}

.btn-leave {
  color: #fff;
  background: #f39;
}

.btn-start {
  background: #00e5ff;
}

@keyframes rotate {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@media (width <= 1024px) {
  .lobby-table th:first-child, .lobby-table th:nth-child(2), .lobby-table th:nth-child(3), .lobby-table th:nth-child(4) {
    width: 25%;
  }
}

@media (width <= 768px) {
  .modal-buttons {
    flex-direction: column;
    gap: .05rem;
  }

  .modal-btn {
    width: 100%;
  }

  .lobby-controls {
    flex-wrap: nowrap;
    padding-bottom: 5px;
    overflow-x: hidden;
  }

  .lobby-controls-left, .lobby-controls-right {
    flex-shrink: 0;
    display: flex;
  }

  .lobby-btn {
    flex-shrink: 1;
    min-width: 0;
    padding: clamp(.5rem, 1.5vw, .8rem) clamp(.6rem, 2vw, 1rem);
    font-size: clamp(.7rem, 2.5vw, 1rem);
  }

  .lobby-header {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .lobby-actions {
    justify-content: flex-end;
    width: auto;
  }

  .lobby-player-counter {
    text-align: center;
  }

  .players-table {
    font-size: .8rem;
  }

  .error-toast {
    gap: 8px;
    max-width: 90%;
    padding: 14px 20px;
    font-size: 1rem;
  }

  .error-icon {
    font-size: 1.5rem;
  }

  .player-name {
    width: 20%;
  }

  .player-status, .player-actions-cell {
    width: 40%;
  }

  .profile {
    padding: 6px 12px 6px 8px;
    top: 10px;
    left: 10px;
  }

  .profile-name {
    max-width: 120px;
    font-size: .9rem;
  }

  .profile-icon {
    font-size: 1.1rem;
  }
}

@media (width <= 480px) {
  .modal-buttons {
    gap: .05rem;
  }

  .lobby-controls {
    gap: .4rem;
  }

  .lobby-btn {
    min-width: 0;
    padding: .4rem .5rem;
    font-size: .7rem;
  }

  .lobby-table {
    font-size: .75rem;
  }

  .lobby-table th, .lobby-table td {
    padding: .3rem;
  }

  .btn-join {
    min-width: 60px;
    padding: .2rem .4rem;
    font-size: .7rem;
  }

  .lobby-header {
    flex-wrap: nowrap;
  }

  .lobby-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .lobby-name {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .lobby-player-counter {
    font-size: .7rem;
  }

  .lobby-actions {
    flex-shrink: 0;
  }

  .players-table th, .players-table td {
    padding: .3rem;
  }

  .btn-leave, .btn-start {
    min-width: 60px;
    padding: .4rem .6rem;
    font-size: .7rem;
  }

  .error-toast {
    text-align: center;
    border-radius: 20px;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    font-size: .9rem;
  }

  .error-icon {
    font-size: 1.3rem;
  }

  .player-name {
    width: 50%;
  }

  .player-status {
    width: 30%;
  }

  .player-actions-cell {
    width: 20%;
  }

  .profile {
    padding: 4px 10px 4px 6px;
  }

  .profile-name {
    max-width: 90px;
    font-size: .8rem;
  }
}

.loading-overlay {
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  background: #ffea00e6;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: opacity .5s;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-overlay.awaiting-audio-unlock {
  cursor: pointer;
}

.loading-overlay.awaiting-audio-unlock .loading-text {
  animation: 1.2s ease-in-out infinite alternate audio-unlock-pulse;
}

@keyframes audio-unlock-pulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

.loading-content {
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
}

.loading-progress-panel {
  width: min(78vw, 560px);
  max-width: 560px;
}

.loading-progress-panel.is-hidden {
  display: none;
}

.loading-progress-track {
  background: #ffffffb8;
  border: 5px solid #f39;
  border-radius: 18px;
  width: 100%;
  height: 30px;
  overflow: hidden;
  box-shadow: 0 5px #0000002e;
}

.loading-progress-fill {
  background: linear-gradient(90deg, #00e5ff, #6f0, #f39);
  border-radius: 12px;
  width: 0;
  height: 100%;
  transition: width .12s linear;
}

.loading-progress-label {
  color: #7d2268;
  text-shadow: 1px 1px #fff;
  margin-top: 12px;
  font-size: 1.35rem;
  font-weight: 900;
}

.loading-text {
  color: #f39;
  text-align: center;
  text-shadow: 2px 2px #fff;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 2.5rem;
  font-weight: 900;
}

@keyframes spin {
  0% {
    transform: rotate(0) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.2);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

.profile {
  cursor: pointer;
  z-index: 200;
  background: #ffea00;
  border: 4px dashed #f39;
  border-radius: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 12px;
  font-family: Arial Rounded MT Bold, Arial, sans-serif;
  transition: all .2s cubic-bezier(.68, -.55, .265, 1.55);
  display: flex;
  position: absolute;
  top: 20px;
  left: 20px;
  box-shadow: 0 6px #222;
}

.profile:hover {
  border-color: #00e5ff;
  transform: translateY(-3px) scale(1.05) rotate(-3deg);
  box-shadow: 0 4px #222;
}

.profile-icon {
  font-size: 1.5rem;
}

.profile-name {
  color: #f39;
  text-shadow: 1px 1px #fff;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  max-width: 150px;
  font-size: 1.2rem;
  font-weight: 900;
  overflow: hidden;
}

.form-input {
  color: #222;
  background-color: #fff9;
  border: 3px solid #222;
  border-radius: 20px;
  width: 100%;
  padding: clamp(.8rem, 2vw, 1rem);
  font-family: Arial Rounded MT Bold, Arial, sans-serif;
  font-size: clamp(.95rem, 2.4vw, 1.1rem);
  font-weight: bold;
  line-height: 1.2;
  transition: all .2s;
}

.connection-status {
  z-index: 1000;
  color: #222;
  background: #ffea00;
  border: 4px dashed #f39;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: .9rem;
  font-weight: 900;
  display: none;
  position: fixed;
  top: 10px;
  right: 10px;
  box-shadow: 0 6px #222;
}

.view-title {
  color: #fff;
  text-shadow: 3px 3px #a200ff, 6px 6px #00e5ff;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
  z-index: 2;
  background: #f39;
  border: 5px dashed #ffea00;
  border-radius: 25px;
  margin-bottom: clamp(1rem, 3vh, 1.5rem);
  padding: .5rem 1.5rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  transform: rotate(-1deg);
  box-shadow: 0 8px #2223;
}

#campaign-view {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 25px;
  width: 100%;
  height: 100%;
  display: none;
}

#campaign-view.active {
  display: flex;
}

.campaign-maps-list {
  text-align: center;
  background-color: var(--form-bg-color);
  background-image: var(--form-pattern);
  background-size: var(--form-size);
  border: 5px solid #00e5ff;
  border-radius: 30px;
  flex-direction: column;
  gap: 18px;
  margin: 30px 0;
  padding: 20px;
  display: flex;
  box-shadow: 0 10px #f39;
}

.campaign-map-item {
  color: #a200ff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 15px;
  padding: 10px;
  font-size: 1.8rem;
  font-weight: 900;
  transition: all .2s cubic-bezier(.68, -.55, .265, 1.55);
}

.campaign-map-item:hover {
  color: #00e5ff;
  transform: scale(1.05) rotate(2deg);
}

.campaign-map-item.selected {
  color: #f39;
  text-shadow: 2px 2px #ffea00;
  background: #ffc;
  border: 3px dashed #f39;
  font-weight: 900;
  transform: scale(1.1);
}

.campaign-actions {
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 15px;
  width: 100%;
  max-width: 280px;
  display: flex;
}

.campaign-actions .btn {
  text-align: center;
  flex: 1;
  width: auto;
  margin: 0;
}
/*# sourceMappingURL=fe.7de29fca.css.map */
