/* Admin Management Styles */

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* Recent Activity */
.recent-activity {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.activity-meta {
  font-size: 0.875rem;
  opacity: 0.7;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-filters input,
.search-filters select {
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

/* Lists */
.rooms-list,
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.room-item,
.question-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.room-item:hover,
.question-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.room-item.selected,
.question-item.selected {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.room-header,
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.room-info,
.question-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.room-actions,
.question-actions {
  display: flex;
  gap: 0.5rem;
}

.room-content,
.question-content {
  margin-top: 1rem;
}

.room-meta,
.question-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Stats */
.room-stats,
.question-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.7;
}

.stat-value {
  font-weight: bold;
}

/* Question Options */
.question-options {
  margin: 1rem 0;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.correct-option {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.option-letter {
  font-weight: bold;
  min-width: 20px;
}

.correct-marker {
  color: #22c55e;
  font-weight: bold;
}

/* Tags */
.question-tags {
  margin: 1rem 0;
}

.tag {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Badges */
.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge.open {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge.playing {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.badge.closed {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

.badge.private {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.badge.draft {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

.badge.pending_validation {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.badge.approved {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.badge.live {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge.type {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.badge.difficulty {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.badge.difficulty.easy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge.difficulty.medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.badge.difficulty.hard {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Success Rate Classes */
.success-high {
  color: #22c55e;
}

.success-medium {
  color: #f59e0b;
}

.success-low {
  color: #f97316;
}

.success-very-low {
  color: #ef4444;
}

/* Modal */
.modal-overlay {
  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;
  padding: 1rem;
}

.modal-content {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1rem;
}

/* Detail Sections */
.detail-section {
  margin-bottom: 2rem;
}

.detail-section h4 {
  margin-bottom: 1rem;
  color: #3b82f6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.detail-grid > div {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Lists in Modal */
.players-list,
.questions-list,
.answers-list,
.validations-list {
  max-height: 300px;
  overflow-y: auto;
}

.player-item,
.question-item,
.answer-item,
.validation-item {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-item:last-child,
.question-item:last-child,
.answer-item:last-child,
.validation-item:last-child {
  border-bottom: none;
}

.player-info,
.question-info,
.answer-info,
.validation-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.player-meta,
.question-meta,
.answer-meta,
.validation-meta {
  font-size: 0.875rem;
  opacity: 0.7;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Answer Results */
.answer-result {
  font-weight: bold;
  font-size: 1.2rem;
}

.answer-result.correct {
  color: #22c55e;
}

.answer-result.incorrect {
  color: #ef4444;
}

/* Validation Votes */
.validation-vote {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.validation-vote.approve {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.validation-vote.reject {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  opacity: 0.7;
}

.empty-state h4 {
  margin-bottom: 0.5rem;
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .analytics-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filters {
    justify-content: center;
  }
  
  .bulk-actions {
    justify-content: center;
  }
  
  .room-header,
  .question-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .room-actions,
  .question-actions {
    justify-content: center;
  }
  
  .room-stats,
  .question-stats {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95vw;
    margin: 1rem;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
