:root {
  color-scheme: light;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  pad: 0;
  height: 100vh;
  width: 100vw;
  font-family: sans-serif;
}

body {
  background: radial-gradient(ellipse at top, #1a1a3e 0%, #0f0f1a 55%);
  color: #f5f6fa;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.screen {
  width: min(480px, 92vw);
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  box-sizing: border-box;
}

.game-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
  background: linear-gradient(135deg, #6c5ce7, #00cec9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle, .welcome, .hint {
  text-align: center;
  color: #a0a0b8;
  margin: 0 0 1rem;
}

.screen-title {
  text-align: center;
  margin: 0 0 1rem;
}

.card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}
.field input {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #2d2d44;
  background: #12121f;
  color: #f5f6fa;
  font-size: 1rem;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn.primary {
  background: linear-gradient(135deg, #6c5ce7, #5a4bd1);
  color: white;
}
.btn.secondary {
  background: linear-gradient(135deg, #0984e3, #00cec9);
  color: white;
}
.btn.ghost {
  background: transparent;
  border: 1px solid #3d3d5c;
  color: #f5f6fa;
}
.btn.danger {
  color: #e17055;
}
.btn.large {
  padding: 1rem;
  font-size: 1.1rem;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.error {
  color: #e17055;
  font-size: 0.9rem;
  min-height: 1.2em;
  text-align: center;
}

.google-btn {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.code-input {
  text-align: center;
  font-size: 1.5rem !important;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.room-code {
  text-align: center;
  font-size: 1.25rem;
}
.room-code strong {
  font-family: monospace;
  font-size: 1.75rem;
  letter-spacing: 0.2em;
  color: #00cec9;
}

.lobby-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shape-preview {
  display: block;
  margin: 0 auto 1rem;
  background: #12121f;
  border-radius: 12px;
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.shape-btn {
  font-size: 0.8rem;
  padding: 0.5rem;
  width: auto;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #2d2d44;
  cursor: pointer;
  padding: 0;
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #12121f;
  border-radius: 10px;
}

.edition-screen .card h3 {
  margin: 0 0 0.35rem;
}

.edition-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.edition-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: #12121f;
  border-radius: 10px;
}

.edition-label {
  flex: 1;
  font-size: 0.95rem;
}

.edition-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.edition-select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #2d2d44;
  background: #12121f;
  color: #f5f6fa;
  font-size: 1rem;
}

.edition-add {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2d2d44;
}

.shape-preview.small {
  width: 48px;
  height: 48px;
  margin: 0;
}

.small-btn {
  width: auto;
  padding: 0.45rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
}

.status-line {
  min-height: 1.2em;
  color: #00cec9;
}