:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
}

/* Sticky Footer Styles */
html {
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-repeat: no-repeat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
}

main {
  flex: 1 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

footer {
  flex-shrink: 0 !important;
  background: linear-gradient(45deg, var(--primary-color), #4dabf7);
  color: white;
  padding: 10px 0;
  text-align: center;
  width: 100%;
}

/* Navbar Fixes */
.navbar-nav .nav-link {
  font-size: 0.9rem;
  padding: 8px 12px;
  color: white !important;
}

.navbar-nav .dropdown-menu {
  background: #343a40;
  border: none;
}

.navbar-nav .dropdown-item {
  color: white !important;
  font-size: 0.9rem;
}

.navbar-nav .dropdown-item:hover {
  background: var(--primary-color);
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: #343a40;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
  }
  .navbar-nav .nav-link {
    padding: 10px;
  }
  .navbar-nav .dropdown-menu {
    background: transparent;
    border: none;
  }
  .navbar-nav .dropdown-item {
    padding-left: 20px;
  }
}

.quiz-container {
  max-width: 100%;
  padding: 15px;
}

.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
}

.card-header {
  background: linear-gradient(45deg, var(--primary-color), #4dabf7);
  color: white;
  border-radius: 15px 15px 0 0 !important;
  padding: 15px;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), #4dabf7);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  touch-action: manipulation;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.language-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
}

.language-toggle .btn {
  font-size: 0.9rem;
  padding: 8px 12px;
}

.progress-ring {
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.quiz-option {
  transition: all 0.3s ease;
  border-radius: 10px;
  margin-bottom: 10px;
}

.quiz-option label {
  padding: 15px;
  font-size: 1rem;
  touch-action: manipulation;
}

.quiz-option:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quiz-option.correct {
  background: linear-gradient(45deg, var(--success-color), #20c997);
  color: white;
}

.quiz-option.incorrect {
  background: linear-gradient(45deg, var(--danger-color), #fd7e14);
  color: white;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.2rem;
}

.topic-card {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: #eee;
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  animation: progress 1s ease-out forwards;
}

.percentage {
  fill: #666;
  font-family: sans-serif;
  font-size: 0.5em;
  text-anchor: middle;
}

@keyframes progress {
  0% {
    stroke-dasharray: 0 100;
  }
}

.bg-light-success {
  background-color: #d1e7dd !important;
}

.bg-light-danger {
  background-color: #f8d7da !important;
}

@media (max-width: 576px) {
  .quiz-container {
    padding: 10px;
  }

  .card-header {
    padding: 10px;
  }

  .btn-primary {
    font-size: 1rem;
    padding: 10px;
  }

  .card-body h4,
  .card-body h3 {
    font-size: 1.2rem;
  }

  .progress {
    height: 8px;
  }
}
