/* ============================================
   ACADEMY (LEARN) PAGE STYLES
   Zvonalitik — Sales Academy Educational Platform
   ============================================ */

/* === Academy Page Layout === */
.academy-page {
  min-height: 100vh;
  background: var(--bg-alt);
}

/* === Academy Header === */
.academy-header {
  background: var(--dark);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.academy-header__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.academy-header__content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.academy-header__title {
  font-size: clamp(36px, 5vw, 56px);
  color: white;
  margin-bottom: 16px;
}

.academy-header__subtitle {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.academy-header__stats {
  display: flex;
  gap: 32px;
}

.academy-header__stat {
  text-align: center;
}

.academy-header__stat-value {
  font-size: 32px;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}

.academy-header__stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* === User Progress Card (Header) === */
.user-progress-card {
  background: var(--dark-alt);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: 24px;
  min-width: 280px;
}

.user-progress-card__level {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.user-progress-card__badge {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
}

.user-progress-card__badge i {
  width: 28px;
  height: 28px;
  color: white;
}

.user-progress-card__info h4 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.user-progress-card__info span {
  font-size: 14px;
  color: var(--text-muted);
}

.user-progress-card__xp {
  margin-bottom: 16px;
}

.user-progress-card__xp-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.user-progress-card__xp-current {
  font-weight: 600;
  color: var(--primary);
}

.user-progress-card__xp-bar {
  height: 8px;
  background: var(--dark-lighter);
  border-radius: 4px;
  overflow: hidden;
}

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

.user-progress-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dark);
}

.user-progress-card__stat {
  text-align: center;
}

.user-progress-card__stat-value {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.user-progress-card__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Streak Badge === */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warning);
}

.streak-badge i {
  width: 16px;
  height: 16px;
}

/* === Academy Content Layout === */
.academy-content {
  padding: 40px 0 80px;
}

.academy-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* === Academy Sidebar === */
.academy-sidebar {
  position: sticky;
  top: 100px;
}

.academy-nav {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.academy-nav__header {
  padding: 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.academy-nav__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.academy-nav__list {
  padding: 8px;
}

.academy-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.academy-nav__item:hover {
  background: var(--bg-alt);
}

.academy-nav__item--active {
  background: var(--primary-light);
}

.academy-nav__item--active .academy-nav__item-title {
  color: var(--primary);
  font-weight: 600;
}

.academy-nav__item--completed .academy-nav__item-icon {
  background: var(--success);
  color: white;
}

.academy-nav__item--locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.academy-nav__item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.academy-nav__item-icon i {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.academy-nav__item-content {
  flex: 1;
  min-width: 0;
}

.academy-nav__item-title {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.academy-nav__item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.academy-nav__item-progress {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* === Module Cards Grid === */
.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === Module Card === */
.module-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.module-card--locked {
  opacity: 0.6;
}

.module-card--locked:hover {
  box-shadow: none;
  border-color: var(--border);
}

.module-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  cursor: pointer;
  user-select: none;
}

.module-card__left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.module-card__number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  font-size: 20px;
  font-weight: 800;
  color: white;
}

.module-card--completed .module-card__number {
  background: var(--success);
}

.module-card--completed .module-card__number::after {
  content: '';
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/contain no-repeat;
}

.module-card--locked .module-card__number {
  background: var(--bg-alt);
  color: var(--text-muted);
}

.module-card__info {
  flex: 1;
}

.module-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.module-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.module-card__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-card__meta i {
  width: 16px;
  height: 16px;
}

.module-card__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.module-card__progress-bar {
  width: 120px;
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}

.module-card__progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.module-card__progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 40px;
}

.module-card__toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.module-card__toggle i {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.module-card--open .module-card__toggle {
  background: var(--primary-light);
  color: var(--primary);
}

.module-card--open .module-card__toggle i {
  transform: rotate(180deg);
}

/* Module Body (Lessons List) */
.module-card__body {
  display: none;
  padding: 0 24px 24px;
}

.module-card--open .module-card__body {
  display: block;
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* === Lesson Item === */
.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.lesson-item:hover {
  background: var(--primary-light);
}

.lesson-item--completed {
  background: var(--success-light);
}

.lesson-item--current {
  background: var(--primary-light);
  border: 2px solid var(--primary);
}

.lesson-item--locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.lesson-item--locked:hover {
  background: var(--bg-alt);
}

.lesson-item__status {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.lesson-item--completed .lesson-item__status {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.lesson-item--completed .lesson-item__status i {
  width: 14px;
  height: 14px;
}

.lesson-item--current .lesson-item__status {
  border-color: var(--primary);
  color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

.lesson-item__content {
  flex: 1;
}

.lesson-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.lesson-item__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.lesson-item__arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.lesson-item:hover .lesson-item__arrow {
  transform: translateX(4px);
  color: var(--primary);
}


/* ============================================
   LESSON PAGE STYLES
   ============================================ */

.lesson-page {
  min-height: 100vh;
  background: var(--bg-white);
}

.lesson-header {
  background: var(--dark);
  padding: 100px 0 40px;
}

.lesson-header__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.lesson-header__breadcrumbs a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.lesson-header__breadcrumbs a:hover {
  color: white;
}

.lesson-header__breadcrumbs span {
  color: var(--text-muted);
  opacity: 0.5;
}

.lesson-header__breadcrumbs strong {
  color: white;
}

.lesson-header__title {
  font-size: clamp(28px, 4vw, 40px);
  color: white;
  margin-bottom: 16px;
}

.lesson-header__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.lesson-header__meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-header__meta i {
  width: 16px;
  height: 16px;
}

/* Lesson Header Number */
.lesson-header__number {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 12px;
}

/* === Lesson Header with Hero === */
.lesson-header--with-hero {
  padding: 100px 0 0;
  overflow: hidden;
}

.lesson-header__layout {
  display: flex;
  align-items: center;
  gap: 40px;
}

.lesson-header--with-hero .lesson-header__layout {
  min-height: 280px;
}

.lesson-header__text {
  flex: 1;
  min-width: 0;
  padding-bottom: 40px;
}

.lesson-header__hero {
  flex: 0 0 400px;
  max-width: 400px;
  position: relative;
  align-self: flex-end;
}

.lesson-header__hero svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
}

/* Hero SVG Animations */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

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

@keyframes heroDrawLine {
  from {
    stroke-dashoffset: 200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.lesson-header__hero svg {
  animation: heroFadeIn 0.6s ease-out;
}

/* Animated elements inside hero SVG */
.lesson-header__hero .hero-card {
  animation: heroFadeIn 0.5s ease-out backwards;
}

.lesson-header__hero .hero-card:nth-child(1) { animation-delay: 0.1s; }
.lesson-header__hero .hero-card:nth-child(2) { animation-delay: 0.2s; }
.lesson-header__hero .hero-card:nth-child(3) { animation-delay: 0.3s; }

.lesson-header__hero .hero-pulse {
  animation: heroPulse 2s ease-in-out infinite;
}

.lesson-header__hero .hero-float {
  animation: heroFloat 3s ease-in-out infinite;
}

.lesson-header__hero .hero-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: heroDrawLine 1s ease-out 0.5s forwards;
}

/* Responsive */
@media (max-width: 900px) {
  .lesson-header__layout {
    flex-direction: column;
    gap: 24px;
  }

  .lesson-header--with-hero {
    padding: 100px 0 0;
  }

  .lesson-header__text {
    padding-bottom: 24px;
    text-align: center;
  }

  .lesson-header__hero {
    flex: none;
    max-width: 320px;
    width: 100%;
  }

  .lesson-header__breadcrumbs {
    justify-content: center;
  }
}

/* Lesson Content */
.lesson-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  box-sizing: border-box;
}

/* Wide elements: limit width to viewport and enable internal scroll */
.lesson-content .svg-timeline,
.lesson-content .article-table,
.lesson-content .svg-infographic {
  max-width: calc(100vw - 48px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  .lesson-content .svg-timeline,
  .lesson-content .article-table,
  .lesson-content .svg-infographic {
    max-width: calc(100vw - 32px);
  }
}

.lesson-content h2 {
  font-size: 28px;
  margin: 48px 0 24px;
  color: var(--text-primary);
}

.lesson-content h3 {
  font-size: 22px;
  margin: 36px 0 16px;
  color: var(--text-primary);
}

.lesson-content p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.lesson-content ul,
.lesson-content ol {
  margin: 24px 0;
  padding-left: 32px;
}

.lesson-content ul {
  list-style-type: disc;
}

.lesson-content ol {
  list-style-type: decimal;
}

.lesson-content li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.lesson-content blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
}

.lesson-content blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-primary);
}

/* Tip Box */
.tip-box {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  margin: 32px 0;
}

.tip-box--warning {
  background: var(--warning-light);
}

.tip-box--success {
  background: var(--success-light);
}

.tip-box__icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.tip-box--warning .tip-box__icon {
  color: var(--warning);
}

.tip-box--success .tip-box__icon {
  color: var(--success);
}

.tip-box__content p {
  margin: 0;
  font-size: 15px;
  color: var(--text-primary);
}

/* Summary Box - Key Takeaways Section */
.summary-box {
  margin: 32px 0;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--bg-alt) 0%, #f0f4f8 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.summary-box h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-box h4::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.summary-box ul {
  margin: 0;
  padding-left: 24px;
  list-style-type: disc;
}

.summary-box li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.summary-box li:last-child {
  margin-bottom: 0;
}

.summary-box li::marker {
  color: var(--primary);
}


/* ============================================
   TEST/QUIZ STYLES
   ============================================ */

.lesson-test {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}

.lesson-test__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.lesson-test__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.lesson-test__title i {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.lesson-test__progress {
  font-size: 14px;
  color: var(--text-muted);
}

/* Test Result Card */
.lesson-test__result {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  background: var(--success-light);
  border: 2px solid var(--success);
  border-radius: var(--radius-xl);
}

.lesson-test__result-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}

.lesson-test__result-icon i {
  width: 28px;
  height: 28px;
  color: white;
}

.lesson-test__result-icon--failed {
  background: var(--error);
}

.lesson-test__result-content {
  flex: 1;
}

.lesson-test__result-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.lesson-test__result-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.lesson-test__result .btn--outline {
  background: white;
  border-color: var(--success);
  color: var(--success);
}

.lesson-test__result .btn--outline:hover {
  background: var(--success);
  color: white;
}

/* Question Card */
.question-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
}

.question-card--answered {
  border-color: var(--success);
  background: var(--success-light);
}

.question-card--wrong {
  border-color: var(--error);
  background: var(--error-light);
}

.question-card__number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.question-card__text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.4;
}

/* Answer Options */
.answers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.answer-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.answer-option--selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.answer-option--correct {
  border-color: var(--success);
  background: var(--success-light);
}

.answer-option--wrong {
  border-color: var(--error);
  background: var(--error-light);
}

.answer-option--disabled {
  pointer-events: none;
}

.answer-option__radio {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.answer-option--selected .answer-option__radio,
.answer-option--correct .answer-option__radio,
.answer-option--wrong .answer-option__radio {
  border-color: currentColor;
}

.answer-option--selected .answer-option__radio {
  border-color: var(--primary);
  background: var(--primary);
}

.answer-option--correct .answer-option__radio {
  border-color: var(--success);
  background: var(--success);
}

.answer-option--wrong .answer-option__radio {
  border-color: var(--error);
  background: var(--error);
}

.answer-option__radio i {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
}

.answer-option--selected .answer-option__radio i,
.answer-option--correct .answer-option__radio i,
.answer-option--wrong .answer-option__radio i {
  opacity: 1;
}

/* Checkbox variant */
.answer-option--checkbox .answer-option__radio {
  border-radius: var(--radius-sm);
}

.answer-option__text {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Answer Feedback */
.answer-feedback {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.answer-feedback__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.answer-feedback--correct .answer-feedback__icon {
  color: var(--success);
}

.answer-feedback--wrong .answer-feedback__icon {
  color: var(--error);
}

.answer-feedback__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Test Actions */
.test-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

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

/* ============================================
   ORDER QUESTIONS (drag-and-drop sorting)
   ============================================ */

.test-order {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-order__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: grab;
  transition: all var(--transition-fast);
  user-select: none;
}

.test-order__item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.test-order__item:active,
.test-order__item.dragging {
  cursor: grabbing;
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.test-order__handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  flex-shrink: 0;
  opacity: 0.7;
}

.test-order__handle i {
  width: 16px;
  height: 16px;
}

.test-order__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
}

.test-order__text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Order question states */
.test-order__item--correct {
  border-color: var(--success);
  background: var(--success-light);
}

.test-order__item--correct .test-order__number {
  background: var(--success);
}

.test-order__item--wrong {
  border-color: var(--error);
  background: var(--error-light);
}

.test-order__item--wrong .test-order__number {
  background: var(--error);
}

/* Order drag states */
.test-order__item--dragging {
  opacity: 0.5;
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.test-order__item--drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ============================================
   MATCH QUESTIONS (matching pairs)
   ============================================ */

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

.test-match__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.test-match__left {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
}

.test-match__select {
  flex: 1;
  padding: 12px 16px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.test-match__select:hover,
.test-match__select:focus {
  border-color: var(--primary);
  outline: none;
}

/* ============================================
   FILL QUESTIONS (text input)
   ============================================ */

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

.test-fill__template {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.test-fill__input {
  width: 100%;
  padding: 14px 16px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.test-fill__input:hover {
  border-color: var(--text-tertiary);
}

.test-fill__input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.test-fill__input::placeholder {
  color: var(--text-tertiary);
}


/* ============================================
   XP NOTIFICATION
   ============================================ */

.xp-notification {
  position: fixed;
  top: 100px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.xp-notification__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-md);
}

.xp-notification__icon i {
  width: 20px;
  height: 20px;
  color: white;
}

.xp-notification__content strong {
  display: block;
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 2px;
}

.xp-notification__content span {
  font-size: 14px;
  color: var(--text-muted);
}


/* ============================================
   ACHIEVEMENT NOTIFICATION
   ============================================ */

.achievement-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 48px;
  background: var(--dark);
  border: 2px solid var(--warning);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 100px rgba(245, 158, 11, 0.3);
  z-index: 1001;
  animation: achievementPop 0.5s ease;
}

@keyframes achievementPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.achievement-notification__badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

.achievement-notification__badge i {
  width: 40px;
  height: 40px;
  color: var(--dark);
}

.achievement-notification__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.achievement-notification__name {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.achievement-notification__desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.achievement-notification__xp {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}


/* ============================================
   LESSON COMPLETION
   ============================================ */

.lesson-complete {
  text-align: center;
  padding: 60px 40px;
  background: var(--success-light);
  border: 2px solid var(--success);
  border-radius: var(--radius-xl);
  margin-top: 40px;
}

.lesson-complete__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success);
  border-radius: 50%;
}

.lesson-complete__icon i {
  width: 40px;
  height: 40px;
  color: white;
}

.lesson-complete__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.lesson-complete__stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.lesson-complete__stat {
  text-align: center;
}

.lesson-complete__stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--success);
  line-height: 1;
  margin-bottom: 4px;
}

.lesson-complete__stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.lesson-complete__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}


/* ============================================
   LESSON NAVIGATION
   ============================================ */

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.lesson-nav__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-fast);
  flex: 1;
  max-width: 320px;
}

.lesson-nav__link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.lesson-nav__link--prev {
  text-align: left;
}

.lesson-nav__link--next {
  text-align: right;
  flex-direction: row-reverse;
  margin-left: auto;
}

.lesson-nav__link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  color: var(--primary);
  flex-shrink: 0;
}

.lesson-nav__link-icon i {
  width: 20px;
  height: 20px;
}

.lesson-nav__link-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.lesson-nav__link-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}


/* ============================================
   CERTIFICATE VIEW
   ============================================ */

.certificate-card {
  background: white;
  border: 3px solid var(--warning);
  border-radius: var(--radius-xl);
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.certificate-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.certificate-card__badge {
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
}

.certificate-card__badge i {
  width: 48px;
  height: 48px;
  color: var(--dark);
}

.certificate-card__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.certificate-card__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.certificate-card__user {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.certificate-card__course {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.certificate-card__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 32px;
}

.certificate-card__stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.certificate-card__stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.certificate-card__date {
  font-size: 14px;
  color: var(--text-muted);
}


/* ============================================
   ACHIEVEMENTS PAGE
   ============================================ */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.achievement-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.achievement-card:hover {
  box-shadow: var(--shadow-md);
}

.achievement-card--locked {
  opacity: 0.5;
}

.achievement-card--unlocked {
  border-color: var(--warning);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, white 100%);
}

.achievement-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 50%;
}

.achievement-card--unlocked .achievement-card__icon {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.achievement-card__icon i {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
}

.achievement-card--unlocked .achievement-card__icon i {
  color: var(--dark);
}

.achievement-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.achievement-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.achievement-card__xp {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.achievement-card__progress {
  margin-top: 12px;
}

.achievement-card__progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.achievement-card__progress-fill {
  height: 100%;
  background: var(--warning);
  border-radius: 3px;
}

.achievement-card__progress-text {
  font-size: 12px;
  color: var(--text-muted);
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .academy-layout {
    grid-template-columns: 1fr;
  }

  .academy-sidebar {
    position: static;
    order: -1;
  }

  .academy-header__content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .user-progress-card {
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .academy-header {
    padding: 100px 0 40px;
  }

  .academy-header__stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .module-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .module-card__right {
    width: 100%;
    justify-content: space-between;
  }

  .lesson-nav {
    flex-direction: column;
  }

  .lesson-nav__link {
    max-width: none;
  }

  .lesson-nav__link--next {
    flex-direction: row;
    text-align: left;
    margin-left: 0;
  }

  .lesson-complete__stats {
    flex-direction: column;
    gap: 16px;
  }

  .certificate-card {
    padding: 40px 24px;
  }

  .certificate-card__stats {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .user-progress-card__stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .module-card__progress-bar {
    width: 80px;
  }

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

  .achievement-notification {
    padding: 32px 24px;
    margin: 0 16px;
    width: calc(100% - 32px);
  }
}
