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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quiz-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 300% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
}

.progress-container {
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: pulse 1s infinite;
}

.timer-circle.warning {
  background: linear-gradient(135deg, #ff3838, #ff1744);
  animation: urgentPulse 0.5s infinite;
}

.timer-text {
  color: white;
  font-weight: 800;
  font-size: 14px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes urgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 56, 56, 0.7); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 56, 56, 0); }
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ecdc4, #45b7d1);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.question-container {
  margin-bottom: 32px;
  animation: slideIn 0.5s ease-out;
}

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

.question {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 24px;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-option {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.answer-option:hover {
  transform: translateY(-2px);
}

.answer-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.answer-label {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.answer-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.answer-option:hover .answer-label::before {
  left: 100%;
}

.answer-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.answer-option input[type="radio"]:checked + .answer-label {
  background: linear-gradient(135deg, #4ecdc4, #45b7d1);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(78, 205, 196, 0.3);
  transform: scale(1.02);
}

.answer-option input[type="radio"]:checked + .answer-label .answer-letter {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: scale(1.1);
}

.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 400px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-width: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: transparent;
}

.pagination-dot:nth-child(5n) {
  margin-right: 12px;
}

.pagination-dot:nth-child(10n) {
  margin-right: 20px;
}

.pagination-dot.active {
  background: #4ecdc4;
  transform: scale(1.4);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
  color: white;
  font-weight: bold;
}

.pagination-dot.answered {
  background: #45b7d1;
}

.pagination-dot.answered.active {
  background: #4ecdc4;
}

.pagination-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.3);
}

.pagination-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.pagination-number {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-number.active {
  background: #4ecdc4;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.pagination-number.answered {
  background: rgba(69, 183, 209, 0.3);
  border-color: #45b7d1;
}

.pagination-number:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.nav-button {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.prev-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.prev-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.next-button {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex: 1;
  max-width: 200px;
}

.next-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff5252, #d63031);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.results-container {
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.results-title {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #4ecdc4, #45b7d1, #4ecdc4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  position: relative;
  animation: rotate 2s ease-out;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.score-content {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-percentage {
  font-size: 36px;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.score-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.score-details {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
}

.restart-button {
  background: linear-gradient(135deg, #4ecdc4, #45b7d1);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.restart-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 480px) {
  .quiz-container {
    padding: 24px;
    margin: 10px;
  }
  
  .question {
    font-size: 20px;
  }
  
  .navigation {
    flex-direction: column;
    gap: 12px;
  }
  
  .pagination-container {
    order: -1;
    max-width: 80%;
  }
  
  .pagination {
    max-width: 100%;
    gap: 2px;
  }
  
  .pagination-numbers {
    gap: 2px;
  }
  
  .pagination-number {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  
  .progress-info {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .next-button, .prev-button {
    max-width: none;
    width: 100%;
  }
}