/* --- Home view --- */
.home-container {
  text-align: center;
}

.home-container .title {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

#create-btn {
  margin-top: 2rem;
  padding: 1rem 3rem;
  font-size: 1.2rem;
}

.home-divider {
  margin: 1.5rem 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.join-room-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.join-room-form input {
  flex: 1;
  text-align: center;
}

.join-room-form .btn {
  white-space: nowrap;
}

/* --- Lobby view --- */
.lobby-container {
  max-width: 700px;
  width: 90%;
  padding: 2rem 0;
}

.lobby-container .title {
  margin-bottom: 1.5rem;
}

.lobby-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.lobby-card h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

#name-input {
  margin-bottom: 1rem;
}

/* --- Avatar picker --- */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.avatar-btn {
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1.5rem;
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  text-align: center;
}

.avatar-btn:hover {
  border-color: var(--text-dim);
  transform: scale(1.1);
}

.avatar-btn.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* --- Room link bar --- */
.room-link-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.room-link-bar span {
  white-space: nowrap;
  color: var(--text-dim);
}

#share-link {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem;
  background: var(--bg);
  cursor: text;
}

/* --- Your identity banner --- */
.my-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.my-avatar-display {
  font-size: 2.8rem;
  line-height: 1;
}

.my-identity-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.my-name-display {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.my-team-display {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.my-team-display.team-left {
  color: var(--team-left);
  font-weight: 600;
}

.my-team-display.team-right {
  color: var(--team-right);
  font-weight: 600;
}

.my-team-display.no-team {
  color: var(--danger);
  font-weight: 600;
}

/* Retro identity — sharp corners, pixel border, 8-bit feel */
.my-identity.identity-retro {
  border-radius: 0;
  border: 3px solid var(--team-left);
  background: rgba(126, 184, 218, 0.08);
  box-shadow: 4px 4px 0 rgba(126, 184, 218, 0.2);
}

.my-identity.identity-retro .my-name-display {
  font-family: "Press Start 2P", monospace;
  font-size: 0.85rem;
  color: var(--team-left);
}

/* Modern identity — extra round, gradient border feel */
.my-identity.identity-fancy {
  border-radius: 24px;
  border: 1px solid var(--team-right);
  background: rgba(212, 175, 55, 0.08);
}

.my-identity.identity-fancy .my-name-display {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--team-right);
}

/* --- Teams --- */
.teams-container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.team-column {
  flex: 1;
  text-align: center;
}

.team-column h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

#team-left-col h3 {
  color: var(--team-left);
  font-family: "Press Start 2P", monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}
#team-right-col h3 {
  color: var(--team-right);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.02em;
  font-size: 1.3rem;
}

.team-column ul {
  list-style: none;
  min-height: 80px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Retro team column — pixel border, pixelated feel */
#team-left-col ul {
  border: 2px solid var(--team-left);
  border-radius: 0;
  background: rgba(126, 184, 218, 0.05);
  image-rendering: pixelated;
}

#team-left-col li {
  font-family: "Press Start 2P", monospace;
  font-size: 0.65rem;
  line-height: 2;
}

/* Modern team column — rounded, gradient border */
#team-right-col ul {
  border: 1px solid var(--team-right);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.05);
}

#team-right-col li {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.02em;
}

.team-column li {
  padding: 0.3rem 0;
  font-size: 0.95rem;
  animation: fadeIn 0.2s ease;
}

.team-column li .player-avatar {
  margin-right: 0.4rem;
}

.team-column li.is-me {
  font-weight: 700;
  color: var(--accent);
}

.team-column li.disconnected {
  opacity: 0.4;
}

.team-divider {
  padding-top: 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dim);
}

.btn-team {
  width: 100%;
  padding: 0.6rem;
}

.btn-team-left {
  background: var(--team-left-dim);
  color: var(--team-left);
  border: 2px solid var(--team-left);
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  border-radius: 0;
  padding: 0.7rem;
  text-transform: uppercase;
}

.btn-team-right {
  background: var(--team-right-dim);
  color: var(--team-right);
  border: 1px solid var(--team-right);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.02em;
  border-radius: 24px;
}

#start-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

#waiting-msg {
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .avatar-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .teams-container {
    flex-direction: column;
  }

  .team-divider {
    padding-top: 0;
    text-align: center;
  }
}
