/* ===== KEYFRAMES ===== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes slideUp { from { transform:translateY(16px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes borderGlow {
  0%,100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent-glow); }
}

/* ===== PAGE TRANSITIONS ===== */
.view { animation: fadeIn 0.25s ease; }

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-card { height: 80px; border-radius: var(--radius); margin-bottom: 10px; }

/* ===== HOVER EFFECTS ===== */
.glass-card { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.glass-card:hover { border-color: rgba(124,58,237,0.2); }
.stat-card:hover { box-shadow: 0 8px 32px rgba(124,58,237,0.15); }

/* ===== NUMBER COUNT ANIMATION ===== */
.count-up { display: inline-block; }

/* ===== LOGO FLOAT ===== */
.login-logo .logo-icon { animation: float 3s ease-in-out infinite; display: inline-block; }

/* ===== ACTIVE NAV INDICATOR ===== */
.nav-item.active { animation: borderGlow 2s ease-in-out infinite; }

/* ===== OPTION ENTRANCE ===== */
.option-btn { animation: slideUp 0.2s ease both; }
.option-btn:nth-child(1) { animation-delay: 0.0s; }
.option-btn:nth-child(2) { animation-delay: 0.05s; }
.option-btn:nth-child(3) { animation-delay: 0.10s; }
.option-btn:nth-child(4) { animation-delay: 0.15s; }

/* ===== RING GRADIENT ===== */
svg defs { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .exam-body { grid-template-columns: 1fr; }
  .question-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-container { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 64px; }
  .nav-label, .sidebar-brand, .user-info { display: none; }
  .sidebar-header { justify-content: center; }
  .upload-container { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: 1; }
  .form-row.two-col { flex-direction: column; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .results-hero { flex-direction: column; text-align: center; }
}
