/* Duolingo-style Educational App */
:root {
  --primary: #58cc02;
  --primary-dark: #46a302;
  --secondary: #ce82ff;
  --accent: #ff9600;
  --danger: #ea2b2b;
  --success: #58cc02;
  --warning: #ffc800;
  --text: #3c3c3c;
  --text-light: #777;
  --bg: #f7f7f7;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text);
}

/* Screen Management */
.screen {
  display: none !important;
  width: 100%;
  max-width: 400px;
  min-height: 600px;
  opacity: 0;
  visibility: hidden;
}

.screen.active {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

/* Welcome Screen */
.welcome-content {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.bunny-large {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.welcome-content h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 30px;
  font-weight: 600;
}

.welcome-text {
  margin-bottom: 30px;
}

.welcome-text p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.start-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: var(--border-radius);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(88, 204, 2, 0.3);
  margin-bottom: 30px;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 204, 2, 0.4);
}

.progress-preview {
  background: var(--bg);
  border-radius: var(--border-radius-sm);
  padding: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Question Screen */
.question-container {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--bg);
}

.lesson-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.question-counter {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.progress-bar {
  flex: 1;
  margin: 0 20px;
}

.stars-display {
  font-size: 18px;
  font-weight: 700;
  color: var(--warning);
}

.question-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.question-card {
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: var(--transition);
  max-width: 320px;
  width: 100%;
}

.question-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.question-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 30px;
  line-height: 1.3;
}

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

.option-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.option-btn:hover {
  border-color: var(--primary);
  background: rgba(88, 204, 2, 0.05);
  transform: translateY(-1px);
}

.option-btn.correct {
  background: var(--success);
  border-color: var(--success);
  color: white;
  animation: correctPulse 0.6s ease;
}

.option-btn.incorrect {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  animation: incorrectShake 0.6s ease;
}

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

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.navigation {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.nav-btn {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid;
}

.nav-btn.secondary {
  background: white;
  border-color: #e0e0e0;
  color: var(--text-light);
}

.nav-btn.secondary:hover {
  border-color: var(--text);
  background: var(--bg);
}

.nav-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.nav-btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

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

/* Results Screen */
.results-content {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.celebration {
  margin-bottom: 40px;
}

.fireworks {
  font-size: 60px;
  margin-bottom: 20px;
  animation: celebrate 2s infinite;
}

@keyframes celebrate {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(5deg); }
  50% { transform: scale(1.2) rotate(0deg); }
  75% { transform: scale(1.1) rotate(-5deg); }
}

.celebration h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.result-message {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 40px;
}

.final-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.star-collection {
  margin-bottom: 40px;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.action-btn {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid;
}

.action-btn.secondary {
  background: white;
  border-color: #e0e0e0;
  color: var(--text-light);
}

.action-btn.secondary:hover {
  border-color: var(--text);
  background: var(--bg);
}

.action-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.action-btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .screen {
    max-width: 100%;
  }

  .welcome-content,
  .question-container,
  .results-content {
    padding: 30px 20px;
  }

  .question-card {
    padding: 30px 20px;
  }

  .final-stats {
    flex-direction: column;
    gap: 20px;
  }
}
