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

:root {
  --primary-dark: #0f172a;
  --secondary-dark: #1e3a8a;
  --accent-lime: #84cc16;
  --accent-lime-hover: #65a30d;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #cbd5e1;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(to bottom right, var(--primary-dark), var(--secondary-dark), var(--primary-dark));
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-700);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, #dcdcdc, #6d8d93);
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.screen-content {
  padding: 2rem 1rem;
}

.card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  border: 1px solid var(--slate-700);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
  padding: 2rem;
}

@media (min-width: 768px) {
  .card {
    padding: 3rem;
  }
}

.welcome-screen .card {
  max-width: 48rem;
  margin: 0 auto;
}

.welcome-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .welcome-title {
    font-size: 3rem;
  }
}

.welcome-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.btn-primary {
  background: linear-gradient(to right, var(--accent-lime), #a3e635);
  color: #111827;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--accent-lime-hover), #65a30d);
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.progress-container {
  margin-bottom: 1.5rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 0.5rem;
  background: var(--slate-700);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-lime), #a3e635);
  transition: width 0.5s ease;
  border-radius: 9999px;
}

.quiz-screen .card {
  max-width: 48rem;
  margin: 0 auto;
}

.question-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .question-title {
    font-size: 2rem;
  }
}

.options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--slate-600);
  background: rgba(52, 65, 84, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.option:not(.disabled):hover {
  border-color: var(--slate-500);
  background: rgba(52, 65, 84, 0.5);
}

.option.selected {
  border-color: var(--accent-lime);
  background: rgba(132, 204, 22, 0.1);
}

.option.disabled {
  cursor: not-allowed;
}

.option.correct {
  border-color: var(--accent-lime);
  background: rgba(132, 204, 22, 0.1);
}

.option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.option-letter {
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.option.selected .option-letter,
.option.correct .option-letter {
  color: var(--accent-lime);
}

.option.incorrect .option-letter {
  color: #ef4444;
}

.option-text {
  flex: 1;
  color: var(--text-secondary);
}

.option.correct .option-text {
  color: #86efac;
  font-weight: 500;
}

.option-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--accent-lime);
  margin-top: 0.125rem;
}

.explanation {
  background: rgba(132, 204, 22, 0.1);
  border: 1px solid rgba(132, 204, 22, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.4s ease-out;
}

.explanation-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.explanation-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--accent-lime);
  margin-top: 0.125rem;
}

.explanation-title {
  color: #86efac;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.explanation-text {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.results-screen .card {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.trophy-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--accent-lime), #a3e635);
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.results-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.results-text {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.results-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.countdown-container {
  background: rgba(52, 65, 84, 0.5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.countdown-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(132, 204, 22, 0.2);
  border-top-color: var(--accent-lime);
  border-radius: 100%;
  animation: spin 1s linear infinite;
}

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

.countdown-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-lime);
}

.results-footer {
  font-size: 0.875rem;
  color: var(--slate-400);
}

/* Mobile Styles */
@media (max-width: 767px) {
  .card {
    padding: 1.25rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-icon {
    padding: 0.375rem;
  }

  .logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .welcome-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .welcome-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .question-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .option {
    padding: 0.75rem;
  }

  .option-letter {
    font-size: 1rem;
  }

  .option-text {
    font-size: 0.95rem;
  }

  .explanation {
    padding: 1rem;
  }

  .explanation-title {
    font-size: 0.95rem;
  }

  .explanation-text {
    font-size: 0.9rem;
  }

  .btn-primary {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .btn-icon {
    width: 1rem;
    height: 1rem;
  }

  .trophy-icon {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .results-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .results-text {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .results-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .countdown-container {
    padding: 1rem;
  }

  .countdown-number {
    font-size: 2.5rem;
  }

  .countdown-label span {
    font-size: 0.875rem;
  }

  .results-footer {
    font-size: 0.8rem;
  }
}
