/* Import 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&display=swap');

:root {
  /* Premium Palette */
  --primary-rgb: 0, 122, 156; /* #007a9c */
  --primary: #007a9c;
  --primary-light: #0099c2;
  --primary-dark: #005f7a;
  
  --secondary: #1e1b4b; /* Deep indigo */
  --secondary-light: #312e81;
  --secondary-dark: #0f172a;
  
  --accent-saffron: #f97316; /* Saffron/Gold */
  --accent-saffron-light: #fdba74;
  --accent-green: #22c55e;
  --accent-green-dark: #15803d;
  
  --bg-light: #f8fafc;
  --bg-card-light: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(0, 122, 156, 0.4);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--secondary);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Sticky Navbar & Glassmorphism */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
  z-index: 1000;
  transition: var(--transition);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 45px;
  width: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--secondary);
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-saffron);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary);
}

.btn-login {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-logout {
  background: #fee2e2;
  color: #ef4444;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

/* Indian Tricolor Tribute Divider */
.tricolor-stripe {
  height: 4px;
  width: 100%;
  display: flex;
}
.stripe-orange { flex: 1; background-color: #ff9933; }
.stripe-white { flex: 1; background-color: #ffffff; }
.stripe-green { flex: 1; background-color: #138808; }

/* Main Views Wrapper */
main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

/* Landing Page CSS */
.hero-section {
  position: relative;
  padding: 6rem 4rem 4rem 4rem;
  background: radial-gradient(circle at 80% 20%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
              linear-gradient(185deg, #f1f5f9 0%, #fff 100%);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-content h1 span.highlight {
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent-saffron) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.5);
}

.btn-secondary {
  background: #fff;
  color: var(--secondary);
  border: 1px solid var(--border-color);
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.stat-item h3 {
  font-size: 2.2rem;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ff9933, #ffffff, #138808);
}

.hero-badge-live {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: pulse-red 2s infinite ease-in-out;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: #ef4444;
  border-radius: 50%;
}

.hero-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-class-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.hero-class-item:last-child {
  border-bottom: none;
}

.class-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
  font-size: 1.25rem;
}

.class-details h5 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.class-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-shape-1 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  z-index: 1;
}

@keyframes pulse-red {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* Exam Tabs & Grid Section */
.section-padding {
  padding: 5rem 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-saffron);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0.5rem auto 0 auto;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.exam-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.exam-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.exam-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08) 0%, transparent 70%);
}

.exam-tag {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.exam-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.exam-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  min-height: 54px;
}

.exam-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.exam-features li {
  font-size: 0.85rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.exam-features li svg {
  color: var(--accent-green);
  flex-shrink: 0;
}

.btn-card-action {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background-color: #f1f5f9;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  text-align: center;
}

.exam-card:hover .btn-card-action {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
}

/* Features Grid */
.features-section {
  background-color: var(--secondary);
  color: #fff;
}

.features-section h2 {
  color: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.5);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-saffron-light);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.feature-box h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-box p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* Footer styling */
footer {
  background-color: var(--secondary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 4rem 0 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo .brand-text {
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo p {
  font-size: 0.85rem;
}

.footer-section h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-contact p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Auth Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

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

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transform: scale(0.9);
  transition: var(--transition);
}

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

.modal-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: #fff;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.modal-header h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.modal-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal-body {
  padding: 2rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background-color: #f1f5f9;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.auth-tab {
  padding: 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: var(--transition);
  background: transparent;
  color: var(--text-muted);
}

.auth-tab.active {
  background: #fff;
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
  transition: var(--transition);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
}

.demo-credentials h5 {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.demo-credentials p {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 0.25rem;
}

.demo-credentials p:hover {
  color: var(--primary);
  text-decoration: underline;
}

.demo-credentials strong {
  color: var(--text-dark);
}

/* Unified Dashboard Layout (Dashboard shell for Student & Admin) */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 70px);
}

.sidebar {
  background-color: var(--secondary-dark);
  color: rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 1rem;
}

.sidebar-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  transition: var(--transition);
}

.sidebar-item-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.sidebar-item-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.sidebar-user {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
}

.user-info h5 {
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.user-info p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.dashboard-content {
  background-color: var(--bg-light);
  padding: 2.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 70px);
}

/* Panel Header Component */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.panel-title h2 {
  font-size: 1.75rem;
  color: var(--secondary);
}

.panel-title p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.panel-actions {
  display: flex;
  gap: 1rem;
}

/* Grid & Cards for Student Dashboard */
.db-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.db-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.db-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
}

.db-card-icon.blue { background: rgba(0, 122, 156, 0.1); color: var(--primary); }
.db-card-icon.orange { background: rgba(249, 115, 22, 0.1); color: var(--accent-saffron); }
.db-card-icon.green { background: rgba(34, 197, 94, 0.1); color: var(--accent-green); }
.db-card-icon.purple { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }

.db-card-info h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.db-card-info p {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Student Main Row split */
.db-main-row {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.5rem;
}

.db-section-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.db-section-box h4 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.db-link {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.db-link:hover {
  text-decoration: underline;
}

/* Class simulator styles */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  height: 520px;
}

.video-container {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-player-mock {
  flex: 1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.video-playing-state {
  text-align: center;
  z-index: 2;
}

.live-indicator {
  background: #ef4444;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 1rem;
  display: inline-block;
  letter-spacing: 0.5px;
}

.video-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-instructor {
  font-size: 0.9rem;
  color: #94a3b8;
}

.video-controls {
  background: rgba(15, 23, 42, 0.9);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.controls-left, .controls-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-ctrl {
  background: transparent;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.btn-ctrl:hover {
  background: rgba(255,255,255,0.1);
}

.progress-bar-container {
  flex: 1;
  height: 4px;
  background: #475569;
  border-radius: 2px;
  margin: 0 1.5rem;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  width: 35%;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.chat-container {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: #f8fafc;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-feed {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.chat-message {
  padding: 0.6rem 0.8rem;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  max-width: 90%;
  align-self: flex-start;
}

.chat-message.self {
  background: rgba(var(--primary-rgb), 0.1);
  align-self: flex-end;
  border-right: 3px solid var(--primary);
}

.msg-author {
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.15rem;
  display: block;
}

.msg-text {
  color: var(--text-dark);
}

.chat-form {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

/* Mock Test Engine Styles */
.test-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.test-list-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.test-list-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.test-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.test-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-start-test {
  width: 100%;
  padding: 0.6rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  transition: var(--transition);
}

.btn-start-test:hover {
  background: var(--primary-dark);
}

/* Quiz Taker Window */
.quiz-taker-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.quiz-main-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.quiz-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-q-num {
  font-size: 1.1rem;
  color: var(--secondary);
  font-weight: 700;
}

.quiz-q-marks {
  font-size: 0.8rem;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.quiz-q-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 2rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.quiz-option-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.quiz-option-item:hover {
  background: #f8fafc;
  border-color: var(--text-muted);
}

.quiz-option-item.selected {
  background: rgba(var(--primary-rgb), 0.05);
  border-color: var(--primary);
  font-weight: 600;
}

.option-prefix {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 1rem;
  transition: var(--transition);
}

.quiz-option-item.selected .option-prefix {
  background: var(--primary);
  color: #fff;
}

.quiz-option-text {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.quiz-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-quiz-nav {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-quiz-nav.prev {
  background: #f1f5f9;
  color: var(--text-dark);
}

.btn-quiz-nav.prev:hover { background: #e2e8f0; }

.btn-quiz-nav.next {
  background: var(--primary);
  color: #fff;
}

.btn-quiz-nav.next:hover { background: var(--primary-dark); }

.btn-quiz-nav.mark {
  background: #f3e8ff;
  color: #7c3aed;
}

.btn-quiz-nav.mark:hover { background: #e9d5ff; }

/* Quiz Palette Panel */
.quiz-sidebar-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.quiz-timer-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  color: #ef4444;
  font-weight: 700;
  font-size: 1.25rem;
}

.quiz-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.palette-btn {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-muted);
  transition: var(--transition);
}

.palette-btn:hover { background: #cbd5e1; }

.palette-btn.answered { background: var(--accent-green); color: #fff; }
.palette-btn.marked { background: #a855f7; color: #fff; }
.palette-btn.active { border: 2px solid var(--secondary); font-weight: 800; }

.btn-quiz-submit {
  width: 100%;
  padding: 0.75rem;
  background: #ef4444;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
  transition: var(--transition);
  margin-top: 1rem;
}

.btn-quiz-submit:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Scorecard & Analysis */
.score-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.score-card {
  text-align: center;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fdfbf7 0%, #fff 100%);
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 8px solid var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 1.5rem auto;
}

.score-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
}

.score-max {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
}

.analysis-table th, .analysis-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.analysis-table th {
  font-weight: 600;
  color: var(--secondary);
  background: #f8fafc;
}

.status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.correct { background: #dcfce7; color: #16a34a; }
.status-badge.incorrect { background: #fee2e2; color: #dc2626; }
.status-badge.unattempted { background: #f1f5f9; color: #475569; }

.solutions-review-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.review-item.correct { border-left: 4px solid var(--accent-green); }
.review-item.incorrect { border-left: 4px solid #ef4444; }

.review-explanation {
  background: #f8fafc;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* PDF Study Materials view */
.pdf-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: #e2e8f0;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
}

.filter-tab.active {
  background: #fff;
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  width: 320px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pdf-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.pdf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.pdf-icon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.pdf-icon-bg {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
}

.pdf-tag {
  background-color: #f1f5f9;
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.pdf-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  min-height: 44px;
}

.pdf-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 52px;
}

.pdf-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  margin-bottom: 1rem;
}

.btn-read-pdf {
  width: 100%;
  padding: 0.6rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-read-pdf:hover {
  background: var(--primary-dark);
}

/* Attendance panel styles */
.attendance-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.attendance-stats-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-header h4 {
  font-size: 1.15rem;
}

.calendar-controls {
  display: flex;
  gap: 0.5rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}

.cal-day-label {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.cal-day-cell {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  aspect-ratio: 1.2;
  border-radius: 6px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
}

.cal-day-cell.empty {
  background: transparent;
  border: none;
}

.cal-day-cell.present {
  border-left: 3px solid var(--accent-green);
}
.cal-day-cell.absent {
  border-left: 3px solid #ef4444;
}
.cal-day-cell.holiday {
  border-left: 3px solid var(--accent-saffron);
}

.cal-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
}

.cal-status-dot.present { background-color: var(--accent-green); }
.cal-status-dot.absent { background-color: #ef4444; }
.cal-status-dot.holiday { background-color: var(--accent-saffron); }

.attendance-legend {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Admin Dashboard Table */
.admin-table-container {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.admin-table th {
  background: #f8fafc;
  color: var(--secondary);
  font-weight: 600;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.btn-action-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-action-sm.edit { background: #e0f2fe; color: #0369a1; }
.btn-action-sm.edit:hover { background: #bae6fd; }
.btn-action-sm.delete { background: #fee2e2; color: #b91c1c; }
.btn-action-sm.delete:hover { background: #fecaca; }

/* Mock upload & Creators form */
.admin-form-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-actions-end {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.question-builder-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.question-builder-box h5 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.btn-remove-q {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Bulk Attendance Roster */
.roster-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.roster-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-secondary-sm {
  background: #f1f5f9;
  color: var(--text-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary-sm:hover { background: #e2e8f0; }

.roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.roster-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.roster-item:hover { background: #f8fafc; }

.roster-student-details h5 {
  font-size: 0.95rem;
}

.roster-student-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toggle Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-green);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-green);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Utility / Alert classes */
.alert-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--secondary-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3000;
  opacity: 0;
  transform: translateY(1rem);
  transition: var(--transition);
}

.alert-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left: 4px solid var(--accent-green); }
.toast-error { border-left: 4px solid #ef4444; }

/* Interactive Modals */
.reader-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.reader-card {
  width: 100%;
  max-width: 800px;
  height: 90vh;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-header {
  background: #f8fafc;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reader-body {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  background-color: #fdfdfd;
}

.reader-body h1, .reader-body h2, .reader-body h3 {
  font-family: 'Outfit', sans-serif;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.reader-body p {
  margin-bottom: 1.5rem;
}

/* Responsiveness overrides */
@media (max-width: 1024px) {
  .navbar { padding: 0 2rem; }
  .hero-section { grid-template-columns: 1fr; padding: 4rem 2rem; text-align: center; gap: 2rem; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-subtitle { margin: 0 auto 2rem auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; } /* For simplicity, in mobile sidebar is toggled or hidden in SPA mockup */
  .db-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .db-main-row { grid-template-columns: 1fr; }
  .simulator-layout { grid-template-columns: 1fr; height: auto; }
  .quiz-taker-layout { grid-template-columns: 1fr; }
  .attendance-layout { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; } /* Mobile navbar logic simplifies to login button in SPA mockup */
  .features-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .db-summary-grid { grid-template-columns: 1fr; }
  .pdf-filters { flex-direction: column; align-items: stretch; gap: 1rem; }
  .search-box { width: 100%; }
}
