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

:root {
  --primary: #2563eb;
  --secondary: #475569;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #1f2937;
  --light: #f3f4f6;
  --border: #e5e7eb;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--dark);
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}

.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 40px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 40px 0;
}

.hero-copy {
  color: white;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero-copy h1 {
  font-size: 48px;
  line-height: 1.05;
  max-width: 620px;
  margin-bottom: 24px;
}

.hero-copy p {
  font-size: 18px;
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 16px;
}

.hero-highlights div {
  padding: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  text-align: center;
  color: white;
  font-weight: 600;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.hero-card h2 {
  color: white;
  margin-bottom: 16px;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
  line-height: 1.7;
}

.hero-card .btn-block {
  width: 100%;
}

.landing-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 30px;
}

.result-card {
  width: 100%;
  max-width: 420px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(18, 38, 77, 0.08);
}

.card-header h2 {
  margin-bottom: 10px;
  color: var(--dark);
}

.card-header p {
  color: var(--secondary);
  line-height: 1.7;
}

.admin-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-panel {
  margin-top: 22px;
}

.admin-panel p {
  margin-bottom: 22px;
  color: var(--secondary);
  line-height: 1.75;
}

.btn-block {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.landing-footer {
  margin-top: 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.institute-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.institute-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.institute-header p {
  font-size: 16px;
  opacity: 0.9;
}

.exam-info {
  padding: 30px;
  border-bottom: 1px solid var(--border);
}

.exam-info h2 {
  color: var(--dark);
  margin-bottom: 20px;
  font-size: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.info-item {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item .label {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.info-item .value {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.registration-form {
  padding: 30px;
}

.registration-form h3 {
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--dark);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.instructions {
  background: var(--light);
  padding: 15px;
  border-radius: 6px;
  margin: 20px 0;
  border-left: 4px solid var(--warning);
  color: var(--dark);
}

.instructions.error {
  background: #fee2e2;
  border-left-color: #ef4444;
  color: #991b1b;
}

.alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.alert.success {
  background: #d8f3dc;
  color: #166534;
}

.alert.error {
  background: #f8d7da;
  color: #842029;
}

.instructions h4 {
  color: var(--warning);
  margin-bottom: 10px;
  font-size: 14px;
}

.instructions ul {
  margin-left: 20px;
}

.instructions li {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--secondary);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

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

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 8px 14px;
  font-size: 12px;
  width: auto;
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.released {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.table-wrapper, .table-container {
  overflow-x: auto;
  width: 100%;
}

.footer-links {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--light);
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
}

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

.exam-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: white;
}

.exam-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left h2 {
  font-size: 34px;
  margin-bottom: 5px;

}

.header-left p {
  font-size: 20px;
  opacity: 0.9;
}

.timer-section {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.timer-label {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 5px;
}

.timer {
  font-size: 28px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.timer.warning {
  color: #fbbf24;
  animation: pulse 1s infinite;
}

.timer.danger {
  color: #f87171;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.timer-status {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 3px;
}

.exam-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.exam-sidebar {
  width: 250px;
  background: var(--light);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
}

.sidebar-header h3 {
  margin-bottom: 15px;
  font-size: 16px;
  color: var(--dark);
}

.question-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-label {
  color: var(--secondary);
  font-weight: 600;
}

.stat-value {
  color: var(--primary);
  font-size: 16px;
  font-weight: bold;
}

.question-legend {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-box.answered {
  background: var(--success);
}

.legend-box.unanswered {
  background: var(--light);
  border: 1px solid var(--border);
}

.legend-box.current {
  background: var(--primary);
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.question-btn {
  aspect-ratio: 1;
  border: 2px solid var(--border);
  background: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.question-btn:hover {
  border-color: var(--primary);
}

.question-btn.answered {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.question-btn.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

#submitBtn {
  margin-top: 10px;
  width: 100%;
}

.exam-content {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.question-container {
  max-width: 800px;
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.question-number {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.question-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.6;
}

.option {
  margin-bottom: 15px;
  padding: 15px;
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
}

.option:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}

.option input[type="radio"] {
  cursor: pointer;
}

.option label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
}

.option-label {
  font-weight: 600;
  color: var(--primary);
  min-width: 25px;
}

.option input[type="radio"]:checked+label {
  color: var(--dark);
  font-weight: 600;
}

.option input[type="radio"]:checked {
  accent-color: var(--primary);
}

.question-footer {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.question-footer .btn {
  width: auto;
  flex: 1;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.modal-content h2 {
  margin-bottom: 15px;
  color: var(--dark);
}

.modal-content p {
  color: var(--secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-stats {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.modal-stats .stat-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.modal-stats .stat-item:last-child {
  margin-bottom: 0;
}

.modal-stats .label {
  color: var(--secondary);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
}

.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-section p {
  margin-top: 20px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

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

  .exam-main {
    flex-direction: column;
  }

  .exam-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .question-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exam-header {
    flex-direction: column;
    gap: 15px;
  }

  .container {
    padding: 12px;
  }

  .welcome-card {
    width: 100%;
    border-radius: 10px;
  }

  .registration-form {
    padding: 20px;
  }

  .admin-section {
    margin-bottom: 20px;
  }

  .inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .inline .form-group {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .question-grid {
    grid-template-columns: repeat(5, 1fr);
  }

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

  .exam-content {
    padding: 15px;
  }

  .question-container {
    padding: 15px;
  }
}

/* --- ADVANCED LANDING PAGE REDESIGN --- */
.landing-body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #f8fafc;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.landing-body .landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.landing-body .hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0 80px;
}

@media (max-width: 900px) {
  .landing-body .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
}

.landing-body .eyebrow-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.landing-body .hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 24px;
  color: #fff;
}

@media (max-width: 768px) {
  .landing-body .hero-title {
    font-size: 2.5rem;
  }
}

.landing-body .text-gradient {
  background: linear-gradient(to right, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-body .hero-subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .landing-body .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.landing-body .hero-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .landing-body .hero-features {
    justify-content: center;
  }
}

.landing-body .feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-body .glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.landing-body .student-access-card {
  padding: 35px;
}

.landing-body .student-access-card .card-header h2 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.landing-body .student-access-card .card-header p {
  color: #94a3b8;
  margin-bottom: 24px;
}

.landing-body .modern-form .form-group {
  margin-bottom: 16px;
}

.landing-body .modern-form input,
.landing-body .modern-form select {
  width: 100%;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #000000;
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

.landing-body .modern-form input::placeholder {
  color: #64748b;
}

.landing-body .modern-form select option {
  background: #1e293b;
  color: #fff;
}

.landing-body .modern-form input:focus,
.landing-body .modern-form select:focus {
  outline: none;
  border-color: #60a5fa;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.landing-body .btn-glow {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Outfit', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.landing-body .btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5);
}

.landing-body .landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .landing-body .landing-grid {
    grid-template-columns: 1fr;
  }
}

.landing-body .result-card,
.landing-body .admin-card {
  padding: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 600px) {

  .landing-body .result-card,
  .landing-body .admin-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.landing-body .card-icon {
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-body .card-content {
  flex: 1;
}

.landing-body .card-content h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.landing-body .card-content p {
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.5;
}

.landing-body .flex-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.landing-body .flex-form .btn {
  width: auto;
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .landing-body .flex-form {
    flex-direction: column;
  }
}

.landing-body .flex-form input {
  flex: 1;
}

.landing-body .btn-primary {
  padding: 14px 24px;
  background: #3b82f6;
  border-radius: 12px;
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: 'Outfit', sans-serif;
}

.landing-body .btn-primary:hover {
  background: #2563eb;
}

.landing-body .btn-outline {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: 'Outfit', sans-serif;
}

.landing-body .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.landing-body .landing-footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 0.9rem;
}

/* Exam Modern UI Elements */
.option-card {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: 2px solid var(--gray-border);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-card);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.option-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.option-input {
  margin-right: 15px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.option-content {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-container {
  background: #f8fafc;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px auto;
  max-width: 1200px;
  border: 1px solid var(--gray-border);
  position: relative;
  overflow: hidden;
}

/* Mobile App-like UI Enhancements */
@media (max-width: 768px) {
  /* Dynamic Question Grid */
  .question-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)) !important;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
  }

  /* Bigger Options for Touch */
  .option-card {
    padding: 16px 15px !important;
    margin-bottom: 12px !important;
  }
  
  .option-content {
    font-size: 1.15rem !important;
  }

  /* Bottom Action Bar for Mobile */
  .question-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px 10px !important;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    margin: 0 !important;
    gap: 10px;
    border-radius: 20px 20px 0 0;
    border-top: none !important;
  }

  .question-footer .btn {
    padding: 12px 5px !important;
    font-size: 0.85rem !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .exam-main {
    padding-bottom: 90px; /* Space for fixed footer */
  }

  /* Sticky Timer Header */
  .exam-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 999;
    padding: 10px 15px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .timer-section {
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.2rem !important;
    padding: 8px 15px !important;
    margin: 0 auto;
    border-radius: 8px;
  }
}

/* --- LANDING PAGE ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes floatElement {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Applying Animations */
.hero-copy {
  animation: fadeInLeft 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.hero-visual {
  animation: fadeInRight 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.result-card {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s forwards;
}

.admin-card {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.5s forwards;
}

/* Hover effects */
.glass-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3) !important;
}

.feature-item:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.feature-icon {
  animation: floatElement 3s ease-in-out infinite;
  display: inline-block;
}