/* Importing Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Changed from center to flex-start */
  min-height: 100vh;
  padding: 50px 20px; /* Increased top padding */
}

.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  gap: 20px;
  margin-top: 3vh; /* Add margin to the top */
}

.card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.link {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.link h2 {
  color: #333;
  margin-bottom: 10px;
}

#youtube-url {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.3s ease;
}

#youtube-url:focus {
  border-color: #3498db;
  outline: none;
}

.btn-3d {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px #2980b9;
  transition: all 0.2s;
}

.btn-3d:hover {
  background-color: #2980b9;
}

.btn-3d:active {
  transform: translateY(4px);
  box-shadow: 0 0 #2980b9;
}

.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-container h1 {
  color: #333;
  text-align: center;
  margin-bottom: 10px;
}

.quiz-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.question-counter {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.question {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.options label:hover {
  background-color: #f0f0f0;
}

.options input {
  margin-right: 8px;
}

.result {
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.result h2 {
  color: #333;
  margin-bottom: 10px;
}

.result p {
  color: #666;
  margin-bottom: 15px;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.hide {
  display: none;
}

.answer-container {
  text-align: left;
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.question-highlight {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.incorrect-answer {
  color: #e74c3c;
  margin-bottom: 5px;
}

.correct-answer {
  color: #2ecc71;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 25px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.toast-success {
  background-color: #2ecc71;
}

.toast-error {
  background-color: #e74c3c;
}

.toast-info {
  background-color: #3498db;
}

.fade-out {
  opacity: 0;
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Popup styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.popup {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
}

.popup-show {
  transform: scale(1);
  opacity: 1;
}

.popup-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.popup-header h3 {
  margin: 0;
  color: #333;
  font-weight: 600;
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #777;
  transition: color 0.2s;
}

.popup-close:hover {
  color: #333;
}

.popup-body {
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
}

.popup-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eee;
}

.popup-ok {
  padding: 8px 20px !important;
  margin: 0 !important;
}

.popup-error .popup-header {
  background-color: #ffebee;
  color: #e53935;
}

.popup-info .popup-header {
  background-color: #e3f2fd;
  color: #1976d2;
}

.popup-success .popup-header {
  background-color: #e8f5e9;
  color: #43a047;
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    margin-top: 10px; /* Less margin on small screens */
  }
  body {
    padding: 20px; /* Less padding on small screens */
  }
  .card {
    padding: 20px;
  }
  .question {
    font-size: 18px;
  }
  .button-group {
    flex-direction: column;
  }
}
