/* Admin Styles for Biblia Trivia */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.hero h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tagline {
  color: #666;
  font-size: 1.1rem;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
}

h2 {
  color: #555;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

/* Room Setup */
.room-setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.create-room,
.join-room {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
}

.create-room h2,
.join-room h2 {
  margin-bottom: 10px;
}

.create-room .icon,
.join-room .icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.create-room .description,
.join-room .description {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-form input {
  width: 100%;
}

.join-form .btn-outline {
  background: transparent;
  border: 2px solid #667eea;
  color: #667eea;
}

.join-form .btn-outline:hover {
  background: #667eea;
  color: white;
}

input[type="text"],
input:not([type]) {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

input:focus {
  outline: none;
  border-color: #667eea;
}

.room-id-input {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  text-align: center;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 15px 30px;
  font-size: 1.1rem;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Admin Dashboard */
.admin-dashboard {
  animation: fadeIn 0.5s ease;
}

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

.room-info {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #f8f9fa;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.room-id-display {
  font-size: 1.1rem;
  color: #555;
}

.room-id-display strong {
  color: #667eea;
  font-size: 1.3rem;
  letter-spacing: 2px;
}

/* Current Question */
.current-question {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border-left: 5px solid #667eea;
}

.question-text {
  font-size: 1.3rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 500;
}

.question-options {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin: 8px 0;
  background: #f8f9fa;
  border-radius: 8px;
  transition: background 0.3s;
}

.option:hover {
  background: #e9ecef;
}

.option-key {
  font-weight: bold;
  color: #667eea;
  margin-right: 10px;
  min-width: 25px;
}

.question-ref {
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
}

.question-points {
  color: #764ba2;
  font-weight: bold;
  margin-top: 10px;
}

/* Controls */
.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.controls button {
  flex: 1;
  min-width: 200px;
}

/* Leaderboard */
.leaderboard {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

#leaderboardList {
  list-style: none;
}

#leaderboardList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  margin: 8px 0;
  background: white;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
  border-left: 4px solid transparent;
}

#leaderboardList li.correct {
  border-left-color: #28a745;
  background: #d4edda;
}

#leaderboardList li.wrong {
  border-left-color: #dc3545;
  background: #f8d7da;
}

#leaderboardList li:nth-child(odd) {
  background: #f8f9fa;
}

.player-rank {
  font-weight: bold;
  color: #667eea;
  margin-right: 15px;
  min-width: 30px;
}

.player-score {
  color: #764ba2;
  font-weight: bold;
}

/* Answer Logs */
.answer-logs {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
}

#answerLogsList {
  list-style: none;
}

#answerLogsList li {
  padding: 12px 15px;
  margin: 8px 0;
  background: white;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#answerLogsList li.correct {
  background: #d4edda;
  color: #155724;
}

#answerLogsList li.wrong {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
  .room-setup {
    grid-template-columns: 1fr;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .controls button {
    width: 100%;
  }
  
  .room-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .question-text {
    font-size: 1.1rem;
  }
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #667eea;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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