:root {
  --quiz-primary: #ff7755;
  --quiz-secondary: #0088ff;
  --quiz-bg: #f4f7fc;
  --quiz-text: #243248;
  --quiz-muted: #6b7280;
  --quiz-border: #d8e2ef;
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(0, 136, 255, 0.12), transparent 28%),
    radial-gradient(
      circle at 92% 12%,
      rgba(255, 119, 85, 0.12),
      transparent 26%
    ),
    var(--quiz-bg);
  color: var(--quiz-text);
}

.quiz-header {
  box-shadow: 0 8px 24px rgba(20, 34, 66, 0.08);
}

.quiz-navbar {
  padding: 0.85rem 0;
  gap: 1rem;
}

.quiz-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
}

.quiz-brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--quiz-primary),
    var(--quiz-secondary)
  );
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 136, 255, 0.26);
}

.quiz-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.quiz-brand-name {
  font-weight: 800;
  color: #0f172a;
  font-size: 1rem;
}

.quiz-brand-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.quiz-wrapper {
  min-height: calc(100vh - 86px);
  padding: 2rem 0;
}

.quiz-wrapper > .container {
  max-width: 860px;
}

.quiz-card {
  background: #fff;
  border-radius: 26px;
  border: 1px solid #ecf1f8;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2vw + 0.8rem, 2.7rem);
  animation: fadeIn 0.45s ease;
}

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

.intro-section {
  text-align: center;
}

.intro-icon {
  font-size: 3.4rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.intro-title {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: #102542;
}

.intro-description {
  font-size: 0.99rem;
  color: #586174;
  margin-bottom: 0.65rem;
  line-height: 1.85;
}

.intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin: 1.8rem 0;
}

.feature-item {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid #e9f0fa;
  transition: 0.25s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.feature-icon {
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.feature-title {
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #1f2937;
}

.feature-text {
  font-size: 0.84rem;
  color: #667085;
}

.btn-start,
.btn-nav {
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-start {
  background: linear-gradient(
    135deg,
    var(--quiz-primary),
    var(--quiz-secondary)
  );
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 12px 24px rgba(0, 136, 255, 0.24);
}

.btn-start:hover {
  transform: translateY(-2px);
}

.btn-arrow {
  font-size: 1.1rem;
}

.btn-nav {
  background: #ebf3fb;
  color: #31435d;
}

.btn-next {
  background: linear-gradient(135deg, var(--quiz-primary), #3ea2ff);
  color: #fff;
}

.btn-prev {
  background: #f1f5f9;
  color: #334155;
}

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

.btn-nav:hover:not(:disabled) {
  transform: translateY(-1px);
}

.quiz-main-header {
  margin-bottom: 1.6rem;
}

.quiz-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #14213d;
}

.quiz-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.progress {
  height: 9px;
  background: #e5ebf3;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.9rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--quiz-primary),
    var(--quiz-secondary)
  );
  transition: width 0.3s ease;
}

.question-text {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #1e293b;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.option-btn {
  background: #f8fbff;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 1px solid #e2ebf5;
}

.option-btn:hover {
  background: #f0f7ff;
  border-color: #c8ddf6;
}

.option-btn.selected {
  background: #eaf4ff;
  border-color: var(--quiz-primary);
  color: #0b3f86;
  font-weight: 600;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.navigation-buttons .btn-nav {
  min-width: 110px;
}

.form-section {
  animation: fadeIn 0.4s ease;
}

.success-header {
  text-align: center;
  margin-bottom: 1.3rem;
}

.success-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f2748;
}

.success-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  margin-top: 0.3rem;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-control {
  border-radius: 11px;
  padding: 0.78rem 0.85rem;
  border: 1px solid var(--quiz-border);
  font-size: 0.94rem;
}

.form-control:focus {
  border-color: #8ac3f6;
  box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.11);
}

.otp-section {
  margin-top: 1rem;
  background: linear-gradient(180deg, #f9fcff 0%, #f2f8ff 100%);
  border: 1px solid #deebfb;
  border-radius: 14px;
  padding: 0.9rem;
}

.otp-section #quizOtp {
  letter-spacing: 0.18rem;
  font-weight: 700;
  font-size: 1.03rem;
}

.otp-submit-btn {
  background: linear-gradient(135deg, var(--quiz-secondary), #ff977f);
}

.result-section {
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.result-section h3 {
  font-weight: 800;
  color: #0f2748;
}

.result-score {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--quiz-primary);
}

.result-level {
  font-size: 1.06rem;
  margin-bottom: 0.8rem;
}

.result-level strong {
  color: var(--quiz-secondary);
}

.result-message {
  color: #64748b;
  margin-bottom: 1.6rem;
  line-height: 1.75;
}

@media (max-width: 767.98px) {
  .quiz-navbar {
    justify-content: space-between;
  }

  .quiz-brand-name {
    font-size: 0.95rem;
  }

  .quiz-brand-subtitle {
    font-size: 0.74rem;
  }

  .quiz-wrapper {
    padding: 1rem 0 1.25rem;
  }

  .quiz-card {
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }

  .intro-features {
    grid-template-columns: 1fr;
  }

  .navigation-buttons {
    flex-direction: column;
  }

  .navigation-buttons .btn-nav,
  .btn-start,
  .form-section .btn-nav {
    width: 100%;
    justify-content: center;
  }

  .quiz-title {
    font-size: 1.12rem;
  }
}
