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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 700px;
  width: 100%;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

header h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

main {
  padding: 30px;
}

.start-screen {
  text-align: center;
}

.start-screen h2 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.start-screen p {
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
}

.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: white;
}

.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  display: inline-block;
  padding: 14px 35px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-secondary {
  background: #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
  box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

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

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #666;
}

.progress-bar {
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.quiz-question {
  margin-bottom: 25px;
}

.quiz-question h2 {
  font-size: 1.3rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 20px;
}

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

.option {
  position: relative;
}

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

.option label {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.option label:hover {
  border-color: #667eea;
  background: #f0f1ff;
}

.option input[type="radio"]:checked + label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

.error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

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

.result-score {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-percentage {
  font-size: 1.5rem;
  color: #666;
  margin-top: 5px;
}

.result-message {
  font-size: 1.2rem;
  color: #667eea;
  margin-top: 15px;
  font-weight: 500;
}

.answers-breakdown {
  margin-top: 30px;
}

.answers-breakdown h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.answer-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 12px;
}

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

.answer-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.95rem;
}

.answer-correct {
  color: #28a745;
}

.answer-wrong {
  color: #dc3545;
}

.answer-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

.answer-status.correct {
  background: #d4edda;
  color: #155724;
}

.answer-status.wrong {
  background: #f8d7da;
  color: #721c24;
}

.restart-section {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

footer {
  margin-top: auto;
  padding: 15px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

@media (max-width: 500px) {
  body {
    padding: 10px;
  }
  
  .container {
    border-radius: 12px;
  }
  
  header {
    padding: 20px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  main {
    padding: 20px;
  }
  
  .quiz-question h2 {
    font-size: 1.15rem;
  }
  
  .option label {
    padding: 12px 15px;
    font-size: 0.95rem;
  }
  
  .result-score {
    font-size: 3rem;
  }
  
  .btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}
