/**
 * AURA IQ TEST ENGINE — EXTREME UI v5.0 (MINIMAL LUXURY THEME)
 * Clean, modern colorways with a premium focus on contrast and user delight.
 */

/* ==========================================
   1. GLOBAL RESET + PREMIUM COLORWAY
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #4f46e5;          /* Electric Royal Blue */
  --accent-glow: #10b981;      /* Energetic Emerald */
  --bg-dark: #090d16;          /* Deep Luxury Obsidian */
  --card: #ffffff;             /* Crisp Modern White Core */
  --text: #0f172a;             /* Deep Slate Text */
  --muted: #64748b;            /* Soft Charcoal Muted */
  --success: #10b981;          /* Crisp Green */
  --danger: #ef4444;           /* Coral Red */
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  --radius-lg: 20px;
  --radius-md: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  /* Premium radial gradients mimicking modern UI dashboard glow */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 90px 20px 40px; /* Optimized layout clearance padding */
  color: var(--text);
  overflow-x: hidden;
}


/* ==========================================
   2. MAIN APPLICATION CONTAINER
   ========================================== */
.container {
  width: min(850px, 100%);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   3. TYPOGRAPHY SYSTEM
   ========================================== */
h1 {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 6px;
}

.tagline {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 24px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 30px;
}

/* Info Subsections inside Start Box */
.info-section {
  margin-top: 40px;
  text-align: left;
  border-top: 1px solid #e2e8f0;
  padding-top: 30px;
  width: 100%;
}

.info-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px 0;
}

.info-section p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

.info-section ul {
  padding-left: 20px;
  color: var(--muted);
}

.info-section li {
  font-size: 15px;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* ==========================================
   4. START EXAM BOX (CLEANED AND ELEVATED)
   ========================================== */
.start-screen {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Redesigned grid panel configuration for initial information */
.test-info {
  margin: 30px auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 26px;
  width: 100%;
  max-width: 460px;
  text-align: left;
}

.test-info p {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin: 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================
   5. BUTTON ENGINE + START HIGHLIGHT
   ========================================== */
.btn, #restartBtn {
  border: none;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn:hover, #restartBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.btn:active, #restartBtn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--text);
  color: white;
}
.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #059669;
}

/* 🔥 THE EYE-CATCHING START BUTTON HIGHLIGHT */
.start-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 44px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
  margin-top: 20px;
  width: 100%;
  max-width: 340px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: subtlePulse 2.5s infinite ease-in-out;
}

.start-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.455);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 35px;
  flex-wrap: wrap;
}

/* ==========================================
   6. EXAM IN-TEST WORKSPACE
   ========================================== */
#qNo {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

#question {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
  line-height: 1.5;
  text-align: center;
}

#options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #334155;
  text-align: left;
}

.option:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  transform: translateX(3px);
}

.option.selected {
  background: var(--text) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

/* ==========================================
   6B. PREMIUM MONETIZATION AD WRAPPERS
   ========================================== */
.ad-box {
  margin: 25px auto;
  padding: 15px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  max-width: 100%;
}

/* ==========================================
   7. LIVE STATUS ELEMENTS (TIMER)
   ========================================== */
.timer-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  max-width: max-content;
  margin: 0 auto 25px auto;
  align-items: center;
}

.timer-urgent {
  animation: urgentShake 0.5s infinite alternate;
  background: #fef2f2;
  border-color: #fee2e2;
  color: var(--danger);
}

/* ==========================================
   8. RESULTS VIEW SYSTEM
   ========================================== */
#result {
  margin-top: 10px;
  animation: slideUpFade 0.4s ease-out;
}

.result-summary {
  background: #0f172a;
  color: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.result-summary h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 25px;
}

/* Crisp Clean Performance Grid Metrics Box */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.metrics-grid p {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metrics-grid p b {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
}

/* Status Labels */
.pass { color: #10b981 !important; }
.fail { color: #f87171 !important; }

/* Dynamic Aura Segment */
.aura-identity {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
  padding-top: 25px;
}

.aura-identity h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

#restartBtn {
  margin-top: 30px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  width: auto;
}

#restartBtn:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

/* ==========================================
   9. CORRECTION AND REVIEW CARDS
   ========================================== */
.review-container {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.review-container::-webkit-scrollbar { width: 6px; }
.review-container::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.review-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 24px;
  border-left: 5px solid #cbd5e1;
}

.review-card.border-success { border-left-color: var(--success); }
.review-card.border-danger { border-left-color: var(--danger); }

.review-card h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.review-q-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.review-card p {
  font-size: 14px;
  margin: 6px 0;
  color: #475569;
}

.correct { color: var(--success); font-weight: 700; }
.wrong { color: var(--danger); font-weight: 700; }
.unanswered { color: #94a3b8; font-style: italic; }

/* ==========================================
   10. INTERACTION KEYFRAMES
   ========================================== */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes subtlePulse {
  0% { box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 12px 35px rgba(16, 185, 129, 0.55); transform: translateY(-1px); }
  100% { box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3); }
}

@keyframes urgentShake {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

/* ==========================================
   11. MOBILE EXPERIENCE PARITY ACCORD
   ========================================== */
@media (max-width: 768px){

  body{
    padding: 130px 0 0 0; /* Clear room safely for stacked dynamic links header */
    margin:0;
  }

  .container{
    width:100%;
    min-height: auto; /* Fixes artificial desktop box overflow layout scrolling issues */
    border-radius:0;
    padding:25px 18px;
  }

  h1{
    font-size:1.9rem;
    line-height:1.2;
  }

  .tagline{
    font-size:10px;
    letter-spacing:3px;
  }

  #question{
    font-size:1.1rem;
    line-height:1.6;
    word-wrap:break-word;
  }

  .test-info{
    width:100%;
    max-width:100%;
    padding:20px;
  }

  .test-info p{
    font-size:13px;
  }

  .option{
    padding:16px;
    font-size:14px;
  }

  .buttons{
    flex-direction:column;
    gap:10px;
  }

  .buttons button{
    width:100%;
  }

  .start-btn{
    width:100%;
    max-width:100%;
  }

  .metrics-grid{
    grid-template-columns:1fr;
  }

  .result-summary{
    padding:25px 18px;
  }

  .result-summary h2{
    font-size:1.7rem;
  }

  .review-card{
    padding:18px;
  }

  .review-q-text{
    font-size:15px;
  }

  .info-section{
    text-align:left;
    margin-top:25px;
  }

  .info-section h2{
    font-size:1.1rem;
  }

  .info-section p,
  .info-section li{
    font-size:14px;
  }

  /* Optimized Mobile Navbar Core Structure Rules */
  .navbar{
    padding:12px;
  }

  .nav-container{
    flex-direction:column;
    gap:12px;
    text-align:center;
  }

  .nav-links{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:12px;
  }

  .nav-score{
    font-size:11px;
    padding:6px 12px;
  }

  .footer{
    padding:20px 10px;
  }

  .footer-links{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:10px;
  }

  .footer-links a{
    margin:0;
  }

}

@media (max-width:480px){

  body {
    padding-top: 150px; /* Accounts for tight links wrapping on tiny screens */
  }

  h1{
    font-size:1.7rem;
  }

  #question{
    font-size:1rem;
  }

  .timer-badge{
    width:100%;
    justify-content:center;
  }

  .option{
    font-size:13px;
  }

  .metrics-grid p b{
    font-size:18px;
  }

}

/* ==========================================
   12. FOOTER STYLING
   ========================================== */
.footer{
  margin-top:40px;
  padding:25px;
  text-align:center;
  color:#94a3b8;
}

.footer-links{
  margin-top:10px;
}

.footer-links a{
  color:var(--primary);
  text-decoration:none;
  margin:0 10px;
  font-weight:500;
}

.footer-links a:hover{
  text-decoration:underline;
}

/* ==========================================
   13. STICKY PREMIUM NAVIGATION BAR
   ========================================== */
.navbar {
  width: 100%;
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 16px 24px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

/* 🔥 LIVE HIGHLIGHT SCORE BADGE */
.nav-score {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #f8fafc;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  white-space: nowrap; /* Prevents structural breaking on text splits */
}

#liveScore {
  color: var(--accent-glow);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
