/* 
 * TRL Design System - Game Lobby Component 
 * Styling for the game show page with player list and add player form
 */

.game-lobby__content {
  padding: 24px;
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.2);
}

/* Scrollbar styling for Webkit browsers */
.game-lobby__content::-webkit-scrollbar {
  width: 6px;
}

.game-lobby__content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.game-lobby__content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.game-lobby__content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Player list styling */
.player-list {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 24px;
}

.player-list__header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-list__title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.player-list__count {
  background-color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.player-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.player-list__item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.player-list__item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.player-list__item-enter {
  animation: playerEnter 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes playerEnter {
  0% {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
    background-color: rgba(255, 255, 0, 0.2);
  }
  50% {
    opacity: 1;
    transform: translateX(5px) scale(1.02);
    background-color: rgba(255, 255, 0, 0.1);
  }
  100% {
    transform: translateX(0) scale(1);
    background-color: transparent;
  }
}

.player-list__item:last-child {
  border-bottom: none;
}

.player-list__avatar {
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.player-list__name {
  font-weight: 500;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-list__host-badge {
  background-color: var(--trl-accent);
  color: var(--trl-black);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-list__empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.player-list__waiting {
  padding: 16px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-list__host {
  font-weight: 700;
  color: var(--trl-accent);
}

/* Add player form styling */
.add-player-form {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.add-player-form__header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
}

.add-player-form__title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.add-player-form__content {
  padding: 16px;
}

.add-player-form__input-group {
  margin-bottom: 16px;
}

.add-player-form__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.add-player-form__input {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
  color: #ffffff;
  transition: all 0.3s;
}

.add-player-form__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.add-player-form__input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 8px rgba(0, 164, 228, 0.3);
}

.add-player-form__submit {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-player-form__submit:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.add-player-form__submit:active {
  transform: translateY(1px);
}

/* Start game button styling */
.start-game-button {
  width: 100%;
  background-color: var(--trl-accent);
  color: var(--trl-black);
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  text-align: center;
  display: block;
  margin-bottom: 16px;
}

.start-game-button:hover {
  background-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.3);
}

.start-game-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.start-game-button:focus {
  outline: none;
}

/* Game completed styling */
.game-completed {
  text-align: center;
  padding: 24px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.2);
}

.game-completed::-webkit-scrollbar {
  width: 6px;
}

.game-completed::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.game-completed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.game-completed::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.game-completed__title {
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 24px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.winner-card {
  background: linear-gradient(to right, #ffd700, #ffcc00);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  color: #111111;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.winner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.05'%3E%3Cpath d='M0 0h20v20H0V0zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm20 0a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM10 37a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm10-17h20v20H20V20zm10 17a7 7 0 1 0 0-14 7 7 0 0 0 0 14z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
  z-index: 0;
}

.winner-card__label {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 1px;
  color: #111111;
}

.winner-card__trophy {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.winner-card__name {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.winner-card__score {
  font-size: 20px;
  font-weight: 700;
  color: #111111;
  opacity: 0.8;
}

.leaderboard {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.leaderboard__header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  text-align: center;
}

.leaderboard__title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.leaderboard__table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard__table-header {
  background-color: rgba(0, 0, 0, 0.2);
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.leaderboard__table-header th {
  padding: 10px 16px;
  font-weight: 600;
}

.leaderboard__table-cell {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard__empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.leaderboard__rank {
  font-weight: 700;
  width: 40px;
}

.leaderboard__player {
  display: flex;
  align-items: center;
}

.leaderboard__avatar {
  width: 28px;
  height: 28px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.leaderboard__first-place {
  background: linear-gradient(to right, rgba(255, 221, 0, 0.2), rgba(255, 255, 255, 0.05));
}

.leaderboard__score {
  font-weight: 700;
  color: var(--trl-accent);
  text-align: right;
}

.game-completed__action {
  margin-top: 24px;
}

.new-game-button {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  text-decoration: none;
}

.new-game-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.new-game-button:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .game-lobby {
    max-width: 100%;
    border-radius: 0;
    height: 100vh;
    max-height: none;
  }

  .game-lobby__title {
    font-size: 24px;
  }

  .game-lobby__content {
    padding: 16px;
  }

  .player-list__item {
    padding: 10px 12px;
  }

  .winner-card {
    padding: 20px;
    border-radius: 8px;
  }

  .winner-card__trophy {
    font-size: 40px;
  }

  .winner-card__name {
    font-size: 20px;
  }

  .leaderboard__table-cell {
    padding: 10px 12px;
  }

  .add-player-form,
  .player-list,
  .leaderboard {
    border-radius: 8px;
  }
}
