/* Online Exam System – global styles */
:root {
  --oes-primary: #4f46e5;
  --oes-primary-600: #4338ca;
  --oes-accent: #06b6d4;
  --oes-soft: #f5f7fb;
  --oes-card-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
[data-bs-theme="dark"] {
  --oes-soft: #0f172a;
  --oes-card-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

html, body { min-height: 100%; }
body {
  background: var(--oes-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.oes-navbar {
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(15,23,42,.06);
}
[data-bs-theme="dark"] .oes-navbar {
  background: rgba(17,24,39,0.85);
  border-bottom-color: rgba(255,255,255,.08);
}

.navbar-brand i { color: var(--oes-primary); }

.btn-primary {
  background-color: var(--oes-primary);
  border-color: var(--oes-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--oes-primary-600);
  border-color: var(--oes-primary-600);
}

.card { border: 0; box-shadow: var(--oes-card-shadow); border-radius: 14px; }
.card-header { background: transparent; border-bottom: 1px solid rgba(15,23,42,.06); }
[data-bs-theme="dark"] .card-header { border-bottom-color: rgba(255,255,255,.08); }

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(120deg, rgba(79,70,229,.08), rgba(6,182,212,.06));
  border-radius: 28px;
  margin-top: 2rem;
}
.hero h1 { font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero .gradient-text {
  background: linear-gradient(90deg, var(--oes-primary), var(--oes-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feature-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(6,182,212,.12));
  color: var(--oes-primary);
  font-size: 1.4rem;
}

/* Exam card */
.exam-card { transition: transform .15s ease, box-shadow .15s ease; }
.exam-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.exam-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(79,70,229,.1);
  color: var(--oes-primary);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Exam taking */
.question-card { border-left: 4px solid var(--oes-primary); }
.option-label {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s ease;
  margin-bottom: .5rem;
}
.option-label:hover { border-color: var(--oes-primary); background: rgba(79,70,229,.04); }
.option-label input[type="radio"]:checked + span { font-weight: 600; color: var(--oes-primary); }
.option-label:has(input:checked) { border-color: var(--oes-primary); background: rgba(79,70,229,.08); }

/* Timer */
.exam-timer {
  position: sticky; top: 80px; z-index: 10;
  background: white;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: var(--oes-card-shadow);
}
[data-bs-theme="dark"] .exam-timer { background: #1e293b; }
.exam-timer.warning { background: #fef3c7; color: #92400e; }
.exam-timer.danger { background: #fee2e2; color: #991b1b; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* Result */
.score-ring {
  --val: 0;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: conic-gradient(var(--oes-primary) calc(var(--val) * 1%), #e5e7eb 0);
  display: grid; place-items: center;
  position: relative;
}
.score-ring::before {
  content: ""; position: absolute;
  inset: 12px; border-radius: 50%;
  background: white;
}
[data-bs-theme="dark"] .score-ring::before { background: #1e293b; }
.score-ring > span { position: relative; font-size: 2.5rem; font-weight: 800; }

/* Footer */
.oes-footer {
  background: linear-gradient(180deg, transparent, rgba(79,70,229,.04));
}
.oes-footer h6 { letter-spacing: .04em; }
.oes-footer a:hover { color: var(--oes-primary) !important; }

.social-btn { transition: all .15s ease; }
.social-btn:hover { transform: translateY(-2px); border-color: var(--oes-primary); color: var(--oes-primary); }
.social-btn .bi-linkedin:hover { color: #0a66c2; }
.social-btn .bi-github:hover   { color: #181717; }
.social-btn .bi-youtube:hover  { color: #ff0000; }
.social-btn .bi-instagram:hover { color: #e4405f; }

/* Utility */
.text-gradient {
  background: linear-gradient(90deg, var(--oes-primary), var(--oes-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bg-soft { background: rgba(79,70,229,.06); }
