:root {
  --primary: #ff9900;
  --primary-hover: #ec8c00;
  --secondary: #232f3e;
  --dark-bg: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #3b82f6;
  --success: #10b981;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Background Animations */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: blur(80px);
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background-color: var(--primary);
  top: -100px;
  right: -100px;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background-color: var(--accent);
  bottom: -50px;
  left: -50px;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background-color: var(--success);
  top: 40%;
  left: 20%;
}

/* Header */
header {
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.logo span {
  color: var(--primary);
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-right: 12px;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.stats {
  display: flex;
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-item .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-item .value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
  margin-top: 40px;
}

.hero-content {
  text-align: center;
}

.hero-content h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.feature {
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Quiz UI */
.quiz-container {
  margin-top: 20px;
}

.quiz-header {
  margin-bottom: 24px;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #feb47b);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.q-nav span {
  font-weight: 600;
  color: var(--text-secondary);
}

.tag {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 30px;
  color: #fff;
}

.question-image {
  margin-bottom: 30px;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  padding: 10px;
}

.question-image img {
  max-width: 100%;
  max-height: 400px;
}

.options-grid {
  display: grid;
  gap: 16px;
}

.option {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  padding: 18px 24px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 16px;
}

.option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.option.selected {
  border-color: var(--primary);
  background: rgba(255, 153, 0, 0.1);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.option.selected .option-letter {
  background: var(--primary);
  color: white;
}

/* Feedback Styles */
.option.correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.option.correct .option-letter {
  background: var(--success);
  color: white;
}

.option.wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.option.wrong .option-letter {
  background: var(--danger);
  color: white;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.quiz-finish-row {
  text-align: center;
  margin-top: 20px;
  padding-bottom: 40px;
}

.center-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

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

/* Result Screen */
.result-header {
  text-align: center;
  margin-bottom: 40px;
}

.score-circle {
  width: 200px;
  margin: 24px auto;
}

.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 3;
}

.circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
  stroke: var(--primary);
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.percentage {
  fill: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.5rem;
  text-anchor: middle;
  font-weight: 700;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.result-stat {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
}

.result-stat .label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.result-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
}

.result-stat .value.success {
  color: var(--success);
}

.result-actions {
  text-align: center;
}

footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.card.active,
.quiz-container {
  animation: fadeIn 0.5s ease forwards;
}

@media (max-width: 768px) {
  .features-grid,
  .result-stats {
    grid-template-columns: 1fr;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

  .quiz-footer {
    flex-direction: column;
    gap: 16px;
  }

  .center-actions {
    width: 100%;
  }

  .center-actions button {
    flex: 1;
  }
}
