/**
 * Multiplayer Game Styles
 * Newsroom aesthetic - clean, fast, credible
 * Mission: Signal over noise, credibility at speed
 */

/* Lobby */
.multiplayer-lobby {
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
  padding: 32px;
  max-width: 500px;
  margin: 0 auto;
}

.lobby-header {
  text-align: center;
  margin-bottom: 32px;
}

.lobby-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.lobby-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.4);
  color: #4A90E2;
}

.btn-primary:hover:not(:disabled) {
  background: rgba(74, 144, 226, 0.3);
  border-color: rgba(74, 144, 226, 0.6);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.lobby-divider {
  text-align: center;
  position: relative;
  margin: 8px 0;
}

.lobby-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(74, 144, 226, 0.2);
}

.lobby-divider span {
  position: relative;
  background: rgba(15, 15, 35, 0.6);
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.join-room-form {
  display: flex;
  gap: 8px;
}

.room-id-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.room-id-input:focus {
  outline: none;
  border-color: rgba(74, 144, 226, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.room-id-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Waiting Room */
.multiplayer-waiting-room {
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.waiting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.waiting-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin: 0;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.room-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(74, 144, 226, 0.05);
  border-radius: 6px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4A90E2;
}

.players-list {
  margin-bottom: 24px;
}

.players-list h4 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0 0 12px 0;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.player-item {
  padding: 12px;
  background: rgba(74, 144, 226, 0.05);
  border: 1px solid rgba(74, 144, 226, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.player-item.current-player {
  background: rgba(74, 144, 226, 0.15);
  border-color: #4A90E2;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.4);
  border-radius: 4px;
  color: #4A90E2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.waiting-actions {
  text-align: center;
}

.waiting-hint {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 8px 0 0 0;
}

.waiting-message {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
}

/* Starting State */
.multiplayer-starting {
  text-align: center;
  padding: 60px 20px;
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
}

.multiplayer-starting h3 {
  font-size: 1.5rem;
  color: white;
  margin: 0 0 12px 0;
}

.multiplayer-starting p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Game State */
.multiplayer-game {
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.game-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.time-left {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #4A90E2;
  font-size: 1.1rem;
}

.players-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.player-status {
  padding: 6px 12px;
  background: rgba(74, 144, 226, 0.05);
  border: 1px solid rgba(74, 144, 226, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.player-status.current {
  background: rgba(74, 144, 226, 0.15);
  border-color: #4A90E2;
}

.player-status .player-name {
  color: rgba(255, 255, 255, 0.9);
}

.player-status .player-score {
  color: #4A90E2;
  font-weight: 700;
}

.question-card {
  background: rgba(74, 144, 226, 0.05);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.question-header {
  margin-bottom: 12px;
}

.question-header .source {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-headline {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  line-height: 1.4;
  margin: 0;
}

.answer-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.btn-fact {
  flex: 1;
  padding: 16px 32px;
  background: rgba(46, 204, 113, 0.1);
  border: 2px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-fact:hover:not(:disabled) {
  background: rgba(46, 204, 113, 0.2);
  border-color: rgba(46, 204, 113, 0.5);
}

.btn-fact.selected {
  background: rgba(46, 204, 113, 0.3);
  border-color: #2ecc71;
}

.btn-fake {
  flex: 1;
  padding: 16px 32px;
  background: rgba(231, 76, 60, 0.1);
  border: 2px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-fake:hover:not(:disabled) {
  background: rgba(231, 76, 60, 0.2);
  border-color: rgba(231, 76, 60, 0.5);
}

.btn-fake.selected {
  background: rgba(231, 76, 60, 0.3);
  border-color: #e74c3c;
}

.answer-submitted {
  text-align: center;
  padding: 16px;
  background: rgba(74, 144, 226, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* Finished State */
.multiplayer-finished {
  background: rgba(15, 15, 35, 0.6);
  border: 1px solid rgba(74, 144, 226, 0.2);
  border-radius: 8px;
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.multiplayer-finished h3 {
  font-size: 1.5rem;
  color: white;
  margin: 0 0 24px 0;
}

.final-scores {
  margin-bottom: 24px;
  text-align: left;
}

.final-scores h4 {
  font-size: 1.1rem;
  color: white;
  margin: 0 0 16px 0;
  text-align: center;
}

.score-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(74, 144, 226, 0.05);
  border: 1px solid rgba(74, 144, 226, 0.1);
  border-radius: 6px;
  align-items: center;
}

.score-item.current-player {
  background: rgba(74, 144, 226, 0.15);
  border-color: #4A90E2;
}

.score-item .rank {
  font-weight: 700;
  color: #4A90E2;
  text-align: center;
}

.score-item .name {
  color: white;
  font-weight: 500;
}

.score-item .score {
  font-weight: 700;
  color: #4A90E2;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  .multiplayer-lobby,
  .multiplayer-waiting-room,
  .multiplayer-game,
  .multiplayer-finished {
    padding: 20px;
  }

  .room-settings {
    grid-template-columns: 1fr;
  }

  .players-grid {
    grid-template-columns: 1fr;
  }

  .answer-buttons {
    flex-direction: column;
  }

  .join-room-form {
    flex-direction: column;
  }
}

