/* ============================================
   AI Mock Test Series - Frontend Styles
   Modern, Professional, Responsive Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --amts-primary: #4F46E5;
  --amts-primary-light: #6366F1;
  --amts-primary-dark: #3730A3;
  --amts-accent: #06B6D4;
  --amts-success: #10B981;
  --amts-warning: #F59E0B;
  --amts-danger: #EF4444;
  --amts-purple: #8B5CF6;
  --amts-bg: #F8FAFC;
  --amts-surface: #FFFFFF;
  --amts-border: #E2E8F0;
  --amts-text: #0F172A;
  --amts-text-muted: #64748B;
  --amts-text-light: #94A3B8;
  --amts-radius: 16px;
  --amts-radius-sm: 10px;
  --amts-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --amts-shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --amts-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --amts-font-mono: 'Space Grotesk', monospace;
}

.amts-courses-section,
.amts-single-course,
.amts-portal-container {
  font-family: var(--amts-font);
  color: var(--amts-text);
  line-height: 1.6;
}

/* ============================================
   COURSES GRID
   ============================================ */

.amts-courses-header {
  text-align: center;
  margin-bottom: 48px;
}

.amts-section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px;
}

.amts-section-subtitle {
  font-size: 17px;
  color: var(--amts-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.amts-courses-grid {
  display: grid;
  gap: 28px;
}

.amts-grid-3 { grid-template-columns: repeat(3, 1fr); }
.amts-grid-2 { grid-template-columns: repeat(2, 1fr); }
.amts-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .amts-grid-3,
  .amts-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .amts-grid-3,
  .amts-grid-4,
  .amts-grid-2 { grid-template-columns: 1fr; }
}

.amts-course-card {
  background: var(--amts-surface);
  border-radius: var(--amts-radius);
  overflow: hidden;
  box-shadow: var(--amts-shadow);
  border: 1px solid var(--amts-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.amts-course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--amts-shadow-lg);
}

.amts-course-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.amts-course-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-accent));
}

.amts-course-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.amts-course-card:hover .amts-course-thumbnail img {
  transform: scale(1.05);
}

.amts-thumb-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.amts-exam-chip {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.amts-course-body {
  padding: 22px;
}

.amts-course-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--amts-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.amts-course-desc {
  font-size: 14px;
  color: var(--amts-text-muted);
  margin: 0 0 16px;
}

.amts-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--amts-border);
}

.amts-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--amts-text-muted);
}

.amts-meta-icon { font-size: 14px; }

.amts-course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.amts-price-block {
  display: flex;
  flex-direction: column;
}

.amts-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--amts-primary);
  font-family: var(--amts-font-mono);
}

.amts-price-free {
  color: var(--amts-success);
  font-size: 20px;
}

.amts-validity {
  font-size: 12px;
  color: var(--amts-text-light);
}

/* ============================================
   BUTTONS
   ============================================ */

.amts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--amts-radius-sm);
  font-family: var(--amts-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.amts-btn-primary {
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(79,70,229,0.3);
}

.amts-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(79,70,229,0.4);
  color: white;
  text-decoration: none;
}

.amts-btn-outline {
  background: transparent;
  color: var(--amts-primary);
  border: 2px solid var(--amts-primary);
}

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

.amts-btn-warning {
  background: linear-gradient(135deg, var(--amts-warning), #F97316);
  color: white;
}

.amts-btn-danger {
  background: linear-gradient(135deg, var(--amts-danger), #DC2626);
  color: white;
}

.amts-btn-xl {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
  width: 100%;
}

.amts-btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.amts-btn-enroll {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  box-shadow: 0 8px 30px rgba(79,70,229,0.4);
}

.amts-btn-enroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(79,70,229,0.5);
  color: white;
}

/* ============================================
   SINGLE COURSE - HERO
   ============================================ */

.amts-course-hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
  padding: 48px 0;
  background: linear-gradient(135deg, #F0F4FF 0%, #EEF2FF 100%);
  border-radius: 24px;
  padding: 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.amts-course-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.amts-hero-chip {
  display: inline-block;
  background: rgba(79,70,229,0.12);
  color: var(--amts-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.amts-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.amts-hero-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--amts-text);
  margin: 0 0 16px;
}

.amts-hero-desc {
  font-size: 16px;
  color: var(--amts-text-muted);
  margin: 0 0 28px;
  line-height: 1.7;
}

.amts-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.amts-hstat {
  display: flex;
  flex-direction: column;
}

.amts-hstat strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--amts-primary);
  font-family: var(--amts-font-mono);
  line-height: 1;
}

.amts-hstat span {
  font-size: 13px;
  color: var(--amts-text-muted);
  margin-top: 2px;
}

.amts-hero-card {
  position: sticky;
  top: 20px;
}

.amts-hero-thumb {
  border-radius: 16px;
  overflow: hidden;
  height: 200px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-accent));
}

.amts-hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amts-enroll-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--amts-shadow-lg);
  border: 1px solid var(--amts-border);
}

.amts-price-display {
  text-align: center;
  margin-bottom: 20px;
}

.amts-big-price {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--amts-primary);
  font-family: var(--amts-font-mono);
  line-height: 1;
}

.amts-price-note {
  font-size: 13px;
  color: var(--amts-text-muted);
  margin-top: 4px;
  display: block;
}

.amts-enroll-features {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.amts-ef {
  font-size: 13px;
  color: var(--amts-text-muted);
  font-weight: 500;
}

.amts-enrolled-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.amts-enrolled-icon {
  width: 44px;
  height: 44px;
  background: var(--amts-success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.amts-enrolled-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #065F46;
}

.amts-enrolled-text span {
  font-size: 13px;
  color: #047857;
}

.amts-progress-summary {
  text-align: center;
  font-size: 13px;
  color: var(--amts-text-muted);
}

.amts-progress-bar-wrap {
  background: var(--amts-border);
  border-radius: 100px;
  height: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.amts-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amts-primary), var(--amts-accent));
  border-radius: 100px;
  transition: width 1s ease;
}

@media (max-width: 900px) {
  .amts-course-hero {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
  .amts-hero-card { position: static; }
}

/* ============================================
   TABS
   ============================================ */

.amts-course-tabs {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--amts-shadow);
  border: 1px solid var(--amts-border);
}

.amts-tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--amts-border);
  background: var(--amts-bg);
  overflow-x: auto;
}

.amts-tab-btn {
  padding: 16px 24px;
  background: none;
  border: none;
  font-family: var(--amts-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--amts-text-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.amts-tab-btn.active {
  color: var(--amts-primary);
}

.amts-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amts-primary);
  border-radius: 2px 2px 0 0;
}

.amts-tab-content {
  display: none;
  padding: 32px;
}

.amts-tab-content.active {
  display: block;
  animation: amtsFadeIn 0.3s ease;
}

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

/* ============================================
   OVERVIEW TAB
   ============================================ */

.amts-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.amts-overview-card {
  background: var(--amts-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--amts-border);
}

.amts-overview-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

.amts-structure-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.amts-structure-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--amts-border);
  font-size: 14px;
}

.amts-structure-list li:last-child { border-bottom: none; }
.amts-structure-list li span { color: var(--amts-text-muted); }
.amts-structure-list li strong { font-weight: 600; }

.amts-ai-card {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border-color: #C7D2FE;
  text-align: center;
}

.amts-ai-icon { font-size: 40px; margin-bottom: 12px; }
.amts-ai-card h3 { font-size: 18px; color: var(--amts-primary-dark); }
.amts-ai-card p { font-size: 14px; color: var(--amts-text-muted); margin-bottom: 16px; }

.amts-ai-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.amts-ai-features div {
  font-size: 13px;
  font-weight: 500;
  color: var(--amts-primary-dark);
}

@media (max-width: 640px) {
  .amts-overview-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SYLLABUS TAB
   ============================================ */

.amts-syllabus-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.amts-syllabus-topic {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--amts-bg);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid var(--amts-border);
}

.amts-syllabus-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amts-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.amts-syllabus-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.amts-syllabus-info p {
  font-size: 13px;
  color: var(--amts-text-muted);
  margin: 0;
}

/* ============================================
   TESTS GRID
   ============================================ */

.amts-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.amts-test-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 2px solid var(--amts-border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.amts-test-card:hover {
  border-color: var(--amts-primary);
  box-shadow: 0 4px 20px rgba(79,70,229,0.15);
  transform: translateY(-2px);
}

.amts-test-card.completed {
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  border-color: #86EFAC;
}

.amts-test-card.in-progress {
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-color: #FCD34D;
}

.amts-tc-num {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  font-family: var(--amts-font-mono);
}

.amts-test-card.completed .amts-tc-num {
  background: linear-gradient(135deg, var(--amts-success), #059669);
}

.amts-test-card.in-progress .amts-tc-num {
  background: linear-gradient(135deg, var(--amts-warning), #D97706);
}

.amts-tc-check {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: white;
  color: var(--amts-success);
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.amts-tc-info {
  flex: 1;
  min-width: 0;
}

.amts-tc-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
}

.amts-tc-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--amts-text-muted);
  margin-bottom: 6px;
}

.amts-tc-score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amts-score-num {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--amts-font-mono);
}

.amts-score-num.good { color: var(--amts-success); }
.amts-score-num.poor { color: var(--amts-danger); }

.amts-score-marks {
  font-size: 12px;
  color: var(--amts-text-muted);
}

.amts-tc-action { flex-shrink: 0; }

/* ============================================
   RESULTS TABLE
   ============================================ */

.amts-results-table-wrap { overflow-x: auto; }

.amts-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.amts-results-table th {
  background: var(--amts-bg);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--amts-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.amts-results-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--amts-border);
  vertical-align: middle;
}

.amts-results-table tr:hover td {
  background: var(--amts-bg);
}

.amts-percent-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--amts-font-mono);
}

.amts-percent-badge.pass {
  background: #D1FAE5;
  color: #065F46;
}

.amts-percent-badge.fail {
  background: #FEE2E2;
  color: #991B1B;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.amts-empty-state,
.amts-empty-results {
  text-align: center;
  padding: 60px 20px;
}

.amts-empty-icon { font-size: 56px; margin-bottom: 16px; display: block; }

.amts-empty-state h3,
.amts-empty-results h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.amts-empty-state p,
.amts-empty-results p {
  color: var(--amts-text-muted);
  margin: 0 0 24px;
}

/* ============================================
   MODALS
   ============================================ */

.amts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: amtsModalIn 0.2s ease;
}

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

.amts-modal {
  background: white;
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,0.25);
  animation: amtsModalSlide 0.3s ease;
}

@keyframes amtsModalSlide {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.amts-modal-header {
  padding: 28px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.amts-modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.amts-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amts-bg);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.amts-modal-close:hover { background: var(--amts-border); }

.amts-modal-body {
  padding: 20px 28px 28px;
}

/* Loader Modal */
.amts-modal-loader {
  text-align: center;
  padding: 40px 28px;
}

.amts-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--amts-border);
  border-top-color: var(--amts-primary);
  border-radius: 50%;
  animation: amtsSpin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.amts-modal-loader h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.amts-modal-loader p {
  color: var(--amts-text-muted);
  font-size: 14px;
  margin: 0;
}

.amts-ai-generating-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--amts-primary);
  font-weight: 500;
}

.amts-ai-dot {
  width: 8px;
  height: 8px;
  background: var(--amts-primary);
  border-radius: 50%;
  animation: amtsPulse 1.4s ease-in-out infinite;
}

.amts-ai-dot:nth-child(2) { animation-delay: 0.2s; }
.amts-ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes amtsPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%           { transform: scale(1); opacity: 1; }
}

/* ============================================
   TEST PORTAL (EXAM INTERFACE)
   ============================================ */

.amts-portal-container {
  min-height: 100vh;
  background: var(--amts-bg);
}

.amts-portal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.amts-portal-loader {
  text-align: center;
}

.amts-loader-ring {
  width: 64px;
  height: 64px;
  border: 5px solid var(--amts-border);
  border-top-color: var(--amts-primary);
  border-radius: 50%;
  animation: amtsSpin 0.8s linear infinite;
  margin: 0 auto 20px;
}

/* Exam Header */
.amts-exam-header {
  background: white;
  border-bottom: 2px solid var(--amts-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.amts-exam-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.amts-exam-title-wrap h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--amts-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amts-exam-title-wrap span {
  font-size: 12px;
  color: var(--amts-text-muted);
}

/* Timer */
.amts-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--amts-bg);
  border: 2px solid var(--amts-border);
  border-radius: 12px;
  padding: 8px 16px;
  font-family: var(--amts-font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--amts-text);
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
}

.amts-timer.warning { color: var(--amts-warning); border-color: var(--amts-warning); }
.amts-timer.danger  { color: var(--amts-danger); border-color: var(--amts-danger); animation: amtsTimerPulse 1s ease-in-out infinite; }

@keyframes amtsTimerPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.03); }
}

/* Exam Body */
.amts-exam-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* Question Panel */
.amts-question-panel {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--amts-shadow);
  border: 1px solid var(--amts-border);
}

.amts-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.amts-question-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--amts-text-muted);
}

.amts-question-topic {
  background: rgba(79,70,229,0.1);
  color: var(--amts-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.amts-question-marks {
  background: var(--amts-bg);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--amts-text-muted);
}

.amts-question-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--amts-text);
  margin-bottom: 28px;
}

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

.amts-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 2px solid var(--amts-border);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
  background: white;
}

.amts-option:hover {
  border-color: var(--amts-primary);
  background: rgba(79,70,229,0.04);
}

.amts-option.selected {
  border-color: var(--amts-primary);
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(99,102,241,0.05));
}

.amts-option-label {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--amts-bg);
  border: 2px solid var(--amts-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.amts-option.selected .amts-option-label {
  background: var(--amts-primary);
  border-color: var(--amts-primary);
  color: white;
}

.amts-question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--amts-border);
  gap: 12px;
  flex-wrap: wrap;
}

.amts-question-nav-actions {
  display: flex;
  gap: 10px;
}

/* Question Panel Right */
.amts-exam-sidebar {
  position: sticky;
  top: 88px;
}

.amts-sidebar-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--amts-shadow);
  border: 1px solid var(--amts-border);
  margin-bottom: 16px;
}

.amts-sidebar-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--amts-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.amts-question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.amts-qgrid-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--amts-border);
  background: var(--amts-bg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  color: var(--amts-text-muted);
}

.amts-qgrid-btn:hover { border-color: var(--amts-primary); }
.amts-qgrid-btn.current { border-color: var(--amts-primary); background: rgba(79,70,229,0.1); color: var(--amts-primary); }
.amts-qgrid-btn.answered { background: var(--amts-primary); border-color: var(--amts-primary); color: white; }
.amts-qgrid-btn.marked { background: var(--amts-purple); border-color: var(--amts-purple); color: white; }
.amts-qgrid-btn.skipped { border-color: var(--amts-danger); }

.amts-sidebar-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amts-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--amts-text-muted);
}

.amts-legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.amts-legend-dot.answered { background: var(--amts-primary); }
.amts-legend-dot.current  { background: var(--amts-bg); border: 2px solid var(--amts-primary); }
.amts-legend-dot.skipped  { background: var(--amts-bg); border: 2px solid var(--amts-danger); }
.amts-legend-dot.marked   { background: var(--amts-purple); }
.amts-legend-dot.not-visited { background: var(--amts-bg); border: 2px solid var(--amts-border); }

.amts-submit-section {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--amts-shadow);
  border: 1px solid var(--amts-border);
}

.amts-attempt-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.amts-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.amts-summary-row span:first-child { color: var(--amts-text-muted); }
.amts-summary-row span:last-child  { font-weight: 600; }

/* ============================================
   RESULT VIEW
   ============================================ */

.amts-result-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.amts-result-hero {
  background: linear-gradient(135deg, var(--amts-primary), var(--amts-purple));
  border-radius: 24px;
  padding: 40px;
  color: white;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.amts-result-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.amts-result-emoji { font-size: 56px; display: block; margin-bottom: 8px; }
.amts-result-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.amts-result-subtitle { opacity: 0.85; font-size: 15px; margin: 0 0 28px; }

.amts-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 4px solid rgba(255,255,255,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.amts-score-circle .amts-pct {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.amts-score-circle .amts-pct-label { font-size: 12px; opacity: 0.85; }

.amts-result-stats-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.amts-rstat {
  text-align: center;
}

.amts-rstat-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.amts-rstat-label {
  font-size: 12px;
  opacity: 0.8;
}

/* Question Review */
.amts-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.amts-review-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.amts-review-filters {
  display: flex;
  gap: 8px;
}

.amts-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid var(--amts-border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.amts-filter-btn.active {
  background: var(--amts-primary);
  border-color: var(--amts-primary);
  color: white;
}

.amts-review-questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.amts-review-question {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 2px solid var(--amts-border);
  box-shadow: var(--amts-shadow);
}

.amts-review-question.correct  { border-color: var(--amts-success); }
.amts-review-question.incorrect { border-color: var(--amts-danger); }
.amts-review-question.skipped  { border-color: var(--amts-text-light); }

.amts-rq-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.amts-rq-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.correct .amts-rq-status  { background: var(--amts-success); color: white; }
.incorrect .amts-rq-status { background: var(--amts-danger); color: white; }
.skipped .amts-rq-status  { background: var(--amts-text-light); color: white; }

.amts-rq-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.5;
}

.amts-rq-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.amts-rq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  border: 1.5px solid var(--amts-border);
}

.amts-rq-option.opt-correct { background: #D1FAE5; border-color: #6EE7B7; color: #065F46; }
.amts-rq-option.opt-wrong   { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }

.amts-rq-key {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: white;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.amts-explanation-box {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--amts-primary);
}

.amts-explanation-box strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--amts-primary-dark);
  margin-bottom: 4px;
}

.amts-explanation-box p {
  font-size: 14px;
  color: var(--amts-text-muted);
  margin: 0;
  line-height: 1.6;
}

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

@media (max-width: 900px) {
  .amts-exam-body {
    grid-template-columns: 1fr;
  }
  .amts-exam-sidebar {
    position: static;
    order: -1;
  }
  .amts-question-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 640px) {
  .amts-course-hero { padding: 24px 16px; }
  .amts-tab-content { padding: 20px 16px; }
  .amts-question-panel { padding: 20px 16px; }
  .amts-exam-header-inner { padding: 0 16px; }
  .amts-result-hero { padding: 28px 20px; }
  .amts-tests-grid { grid-template-columns: 1fr; }
  .amts-result-stats-row { gap: 16px; }
  .amts-timer { font-size: 16px; padding: 6px 12px; }
}

/* ============================================
   PAYMENT MODAL
   ============================================ */

.amts-payment-modal .amts-modal-body {
  text-align: center;
}

.amts-payment-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.amts-payment-amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--amts-primary);
  font-family: var(--amts-font-mono);
  margin-bottom: 8px;
}

.amts-payment-course {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.amts-payment-note {
  font-size: 14px;
  color: var(--amts-text-muted);
  margin-bottom: 24px;
}

.amts-razorpay-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--amts-text-light);
  margin-top: 16px;
}

/* Notification Toast */
.amts-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.amts-toast {
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  border-left: 4px solid var(--amts-primary);
  animation: amtsToastIn 0.3s ease;
  pointer-events: all;
}

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

.amts-toast.success { border-color: var(--amts-success); }
.amts-toast.error   { border-color: var(--amts-danger); }
.amts-toast.warning { border-color: var(--amts-warning); }

/* ============================================
   BG GENERATION INDICATOR
   ============================================ */

.amts-bg-gen-indicator {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: white;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--amts-shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--amts-text-muted);
  z-index: 999;
  animation: amtsSlideUp 0.3s ease;
  border: 1px solid var(--amts-border);
}

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