/* ==========================================================================
   SHARED STYLES & CORE DESIGN SYSTEM
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@500;700;900&display=swap');

/* --- Custom Variables & Theme Tokens --- */
:root {
  /* System Defaults */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-serif: 'Noto Serif SC', "Georgia", serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 25px rgba(58, 134, 255, 0.35);
}

/* --- Global Reset & Basics --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

/* --- Layout Wrappers --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.2rem;
  }
}



/* ==========================================================================
   ADMISSION TEST MODAL SYSTEM
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 17, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  background: #131c35;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  position: relative;
  color: #fff;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}



.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition-fast);
  z-index: 10;
}



.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}



/* Modal Body */
.modal-body {
  padding: 2.5rem;
}

@media (max-width: 576px) {
  .modal-body {
    padding: 1.5rem;
  }
}

.modal-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.progress-dot {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: var(--transition-normal);
}



.progress-dot.active {
  background: #3a86ff;
  box-shadow: 0 0 10px rgba(58, 134, 255, 0.5);
}

.progress-dot.passed {
  background: #10b981;
}

/* Quiz Steps */
.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: fadeInStep 0.4s ease-out;
}

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

.quiz-question-num {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #3a86ff;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.quiz-question-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

/* Quiz Option Cards */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-card {
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 1rem;
}



.option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}



.option-card.selected {
  background: rgba(58, 134, 255, 0.15);
  border-color: #3a86ff;
}



.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}



.option-card.selected .option-indicator {
  border-color: #3a86ff;
  background: #3a86ff;
}



.option-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: scale(0);
  transition: var(--transition-fast);
}

.option-card.selected .option-indicator::after {
  transform: scale(1);
}

.option-text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Navigation Buttons inside Modal */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}

.modal-btn {
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary {
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}



.btn-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}



.btn-primary {
  background: #3a86ff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(58, 134, 255, 0.4);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Results Step styling */
.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 50%;
  font-size: 2rem;
  margin-bottom: 1.2rem;
  border: 2px solid rgba(16, 185, 129, 0.3);
  animation: popBadge 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popBadge {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-sans);
}



.result-score {
  font-size: 0.95rem;
  color: #3a86ff;
  font-weight: 700;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-analysis {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}



.analysis-para {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}



.analysis-para:last-child {
  margin-bottom: 0;
}

.analysis-highlight {
  font-weight: 700;
  color: #f59e0b;
}

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

.result-cta .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}
