/* Online Bingo Specific Styles */

/* Host Room View */
.host-room-container {
  max-width: 1200px;
  margin: 0 auto;
}

.room-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}

.room-code-display {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.3rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  border-radius: 12px;
  display: inline-block;
  margin: 1rem 0;
}

.room-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.room-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

/* Game Controls */
.game-controls {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.category-selector {
  margin-bottom: 1.5rem;
}

.category-selector label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--accent);
}

.category-selector select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}

.song-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--glass);
  border-radius: 8px;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.song-item:hover {
  transform: scale(1.02);
}

.song-item.marked {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #764ba2;
}

.song-item input[type="checkbox"] {
  cursor: pointer;
}

/* Players List */
.players-section {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.players-section h3 {
  margin-top: 0;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.player-card {
  background: var(--glass);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.player-card.winner {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-color: #f5576c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: white;
}

.player-status {
  font-size: 1.5rem;
}

/* Player Bingo Card */
.player-card-container {
  max-width: 800px;
  margin: 0 auto;
}

.bingo-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.bingo-card-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--glass);
}

.bingo-card-header h2 {
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.bingo-cell {
  background: white;
  border: 3px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bingo-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bingo-cell.marked {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #764ba2;
  font-weight: 700;
}

.bingo-cell.active {
  border-color: var(--accent);
  animation: highlight 0.5s ease;
}

@keyframes highlight {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.song-title {
  font-size: 0.9rem;
  word-break: break-word;
  line-height: 1.3;
}

/* Bingo Button */
.bingo-button-container {
  text-align: center;
  margin-top: 2rem;
}

.bingo-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1.5rem 3rem;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(245, 87, 108, 0.3);
}

.bingo-button:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(245, 87, 108, 0.4);
}

.bingo-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Waiting Room */
.waiting-room {
  text-align: center;
  padding: 3rem 1rem;
}

.waiting-animation {
  font-size: 4rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.waiting-room h2 {
  color: var(--accent);
  margin: 1rem 0;
}

.waiting-room p {
  color: var(--muted);
  font-size: 1.1rem;
}

.share-section {
  background: var(--glass);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 400px;
}

.share-code {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: var(--accent);
  margin: 1rem 0;
}

/* Progress Indicator */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

/* Winner Modal */
.winner-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.winner-content {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  animation: slideUp 0.5s;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.winner-content h2 {
  color: var(--accent);
  font-size: 3rem;
  margin: 0 0 1rem;
}

.winner-emoji {
  font-size: 6rem;
  animation: rotate 1s ease-in-out;
}

@keyframes rotate {
  from { transform: rotate(0deg) scale(0); }
  to { transform: rotate(360deg) scale(1); }
}

/* Responsive */
@media (max-width: 900px) {
  .room-code-display {
    font-size: 2rem;
    padding: 0.8rem 1.5rem;
  }

  .bingo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .song-selection {
    grid-template-columns: 1fr;
  }

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

  .bingo-button {
    font-size: 1.5rem;
    padding: 1rem 2rem;
  }
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
}

/* Error Message */
.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid #c62828;
}

/* Success Message */
.success-message {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid #2e7d32;
}

/* Copy Button */
.copy-button {
  background: var(--accent-2);
  color: #2b1212;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  margin-left: 0.5rem;
}

.copy-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-button.copied {
  background: #4caf50;
  color: white;
}

/* Stats Display */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-box {
  background: var(--glass);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
