html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* Custom Styles for Education Portal */

/* Navigation */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #0056b3, #004085);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(45deg, #28a745, #1e7e34);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(45deg, #1e7e34, #155724);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(45deg, #ffc107, #e0a800);
  border: none;
  color: #212529;
}

.btn-warning:hover {
  background: linear-gradient(45deg, #e0a800, #d39e00);
  transform: translateY(-1px);
}

/* Forms */
.form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Badges */
.badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}

/* Progress bars */
.progress {
  border-radius: 10px;
  background-color: #f8f9fa;
}

.progress-bar {
  border-radius: 10px;
}

/* Alerts */
.alert {
  border-radius: 10px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-info {
  background-color: #e3f2fd;
  color: #0277bd;
}

.alert-success {
  background-color: #e8f5e8;
  color: #2e7d32;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* Modals */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  border-radius: 15px 15px 0 0;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 15px 15px;
}

/* Spinners */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .btn-lg {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
  }
  
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
}

/* Footer */
.footer {
  position: relative;
  margin-top: auto;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.footer h6 {
  color: #495057;
  margin-bottom: 1rem;
}

.footer a {
  color: #6c757d;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #007bff;
}

/* Utility classes */
.text-gradient {
  background: linear-gradient(45deg, #007bff, #0056b3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.border-radius-lg {
  border-radius: 15px;
}

.border-radius-xl {
  border-radius: 20px;
}

/* Course specific styles */
.course-card {
  overflow: hidden;
  border-radius: 15px;
}

.course-card .card-header {
  background: linear-gradient(45deg, #007bff, #0056b3);
  border: none;
  padding: 1.25rem;
}

.video-thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.video-thumbnail img {
  transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
  transform: scale(1.05);
}

/* Test specific styles */
.test-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 15px;
}

.answer-option {
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.answer-option:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.answer-option.selected {
  background-color: #e3f2fd;
  border-color: #007bff;
}

/* Results page styles */
.result-header {
  border-radius: 15px;
  text-align: center;
  padding: 3rem 2rem;
}

.score-item {
  padding: 1.5rem;
  text-align: center;
}

.score-item h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Loading states */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .modal {
    display: none !important;
  }
  
  .container {
    width: 100% !important;
    max-width: none !important;
  }
}

