@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Josefin Sans", sans-serif;
}

body {
  background: linear-gradient(135deg, #1e252f, #2f3542);
  color: #dfe4ea;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.container {
  width: 90%;
  max-width: 800px;
  background: rgba(40, 47, 62, 0.7);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: all 0.5s ease;
}

h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 span {
  color: #ffa502;
}

.screen {
  display: none;
  animation: fadeIn 0.6s ease;
}

.screen.active {
  display: block;
}

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

.options {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

select,
.timer-option {
  padding: 12px;
  border-radius: 10px;
  background: #3a4356;
  color: white;
  border: none;
  font-size: 1.1rem;
}

.timer-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.primary-btn {
  background: #ffa502;
  color: #1e252f;
  border: none;
  padding: 16px 40px;
  font-size: 1.4rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(255, 165, 2, 0.3);
}

.primary-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(255, 165, 2, 0.4);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 1.2rem;
  flex-wrap: wrap;
  gap: 10px;
}

#question-timer {
  background: #e74c3c;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  min-width: 60px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin: 40px 0;
}

.choices button {
  background: #3a4356;
  color: white;
  border: none;
  padding: 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.choices button:hover {
  background: #4a5468;
  transform: scale(1.03);
}

.choices button.correct {
  background: #27ae60 !important;
  transform: scale(1.05);
}

.choices button.wrong {
  background: #e74c3c !important;
}

.progress-bar {
  height: 10px;
  background: #3a4356;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 30px;
}

.progress-fill {
  height: 100%;
  background: #ffa502;
  width: 0%;
  transition: width 0.6s ease;
}

.final-score h1 {
  font-size: 5rem;
  color: #ffa502;
  margin: 20px 0;
}

#percentage {
  font-size: 2rem;
  color: #27ae60;
}

/* Responsive */
@media (max-width: 600px) {
  h1 {
    font-size: 3rem;
  }
  .container {
    padding: 20px;
  }
  .header {
    font-size: 1rem;
    flex-direction: column;
  }
  .choices {
    grid-template-columns: 1fr;
  }
}
