/* Vardhya Education - Next-Gen Cognitive Assessment UI */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f172a 40%, #030712 100%);
  --surface-glass: rgba(15, 23, 42, 0.75);
  --surface-card: #0f172a;
  --surface-card-inner: rgba(30, 41, 59, 0.5);
  --surface-card-hover: rgba(51, 65, 85, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Glass Header */
.app-navbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-symbol {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Layout Containers */
.main-content {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

.briefing-box {
  max-width: 680px;
  margin: 0 auto;
}

/* Glass Card */
.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Chips & Badges */
.pill-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
}

.pill-indigo { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.3); }
.pill-cyan { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border-color: rgba(6, 182, 212, 0.3); }
.pill-emerald { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
.pill-amber { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }

/* Buttons */
.btn-modern {
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  user-select: none;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary-glow:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
}

.btn-glass {
  background: var(--surface-card-inner);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}
.btn-glass:hover {
  background: var(--surface-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-success-glow {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.3);
}
.btn-success-glow:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
}

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

/* Inputs */
.modern-input, .modern-select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: var(--surface-card-inner);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.modern-input:focus, .modern-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(30, 41, 59, 0.8);
}

/* 30-Item Jump Matrix */
.matrix-container {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.85rem;
}

@media (min-width: 640px) {
  .matrix-container { grid-template-columns: repeat(15, minmax(0, 1fr)); }
}

.matrix-pill {
  position: relative;
  height: 2.25rem;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--surface-card-inner);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-1px);
}

.matrix-pill.current {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 12px var(--primary-glow);
  font-weight: 800;
}

.matrix-pill.answered {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.matrix-pill .flag-pin {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
}

/* Interactive Option Cards */
.options-deck {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 640px) {
  .options-deck { grid-template-columns: 1fr 1fr; }
}

.option-tile {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--surface-card-inner);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.option-tile:hover {
  background: var(--surface-card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.option-tile.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
  color: white;
}

.option-tile.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}

.opt-letter {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.option-tile.selected .opt-letter {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Score Hero Display on Results */
.score-hero-badge {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 2px solid rgba(99, 102, 241, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.25);
}

.score-hero-val {
  font-size: 4.25rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.4);
}

.hidden { display: none !important; }

/* Print Mode */
@media print {
  .app-navbar, .no-print, .matrix-container { display: none !important; }
  body { background: white !important; color: #0f172a !important; }
  .glass-panel { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; color: #0f172a !important; box-shadow: none !important; }
  * { color: #0f172a !important; }
}
