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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.screen {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none !important;
}

.screen.hidden {
  display: none !important;
}

.tab-content.hidden {
  display: none !important;
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 1rem;
}

h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

input[type="text"] {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

button {
  background: #3498db;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  width: 100%;
}

button:hover {
  background: #2980b9;
}

.question {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 5px;
}

.question h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.radio-group {
  margin: 0.5rem 0;
}

.radio-group label {
  margin-left: 0.5rem;
}

.result-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 5px;
}

.correct {
  color: #27ae60;
  font-weight: bold;
}

.incorrect {
  color: #e74c3c;
  font-weight: bold;
}

/* Loading Animation */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loadingScreen {
  text-align: center;
}

.settings-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 5px;
}

.settings-group {
  margin-bottom: 1rem;
}

.timer-display {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
  color: #e74c3c;
}

.slide-container {
  position: relative;
  min-height: 300px;
}

.slide-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.nav-button {
  width: auto;
  margin: 0 0.5rem;
}

input[type="number"] {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.tab-container {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid #ddd;
}

.tab-button {
  background: none;
  border: none;
  padding: 1rem 2rem;
  margin-right: 0.5rem;
  color: #666;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  width: auto;
}

.tab-button:hover {
  background: #f0f0f0;
}

.tab-button.active {
  background: #3498db;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.challenge-content {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.challenge-view {
  margin-top: 1rem;
}

.challenge-view.hidden {
  display: none !important;
}

.challenge-view.active {
  display: block !important;
}

.no-challenge {
  text-align: center;
  color: #666;
  padding: 1rem;
  font-style: italic;
}

#challengeBoard, #challengeAdmin {
  margin-top: 1.5rem;
}

.challenge-header {
  margin-bottom: 1.5rem;
}

.challenge-select {
  width: 200px;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  background: white;
}

.admin-error {
  background: #ffebee;
  color: #c62828;
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
  text-align: center;
}

.admin-error.hidden {
  display: none !important;
}

#leaderboard {
  margin-top: 2rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.leaderboard-number {
  font-weight: bold;
  margin-right: 1rem;
  color: #3498db;
}

#newChallengeButton {
  margin-bottom: 2rem;
}

.user-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.no-completions {
  text-align: center;
  color: #666;
  padding: 1rem;
}

.challenge-date {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Progress View Styles */
.progress-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-indicators {
  margin-top: 1rem;
}

.status {
  padding: 0.8rem;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
}

.status.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.in-progress {
  background: #fff3e0;
  color: #f57c00;
}

.status.not-started {
  background: #f5f5f5;
  color: #616161;
}

.quiz-history-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quiz-entry {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.quiz-entry:last-child {
  border-bottom: none;
}

.quiz-date {
  color: #666;
  font-size: 0.9rem;
}

.no-quizzes {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 1rem;
}