body {
    font-family: sans-serif;
    background-image: url("QUIZ.jpg");
    background-size: cover;
    background-position: center;
    margin: 0;
    padding: 20px;
    font-size: 1.2rem;
}

.quiz-container {
    max-width: 700px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    text-align: center;
}

p {
    text-align: center;
}

.question {
    margin-bottom: 20px;
}

.options label {
    display: block;
    margin-bottom: 5px;
}

.result {
    margin-top: 10px;
    font-weight: bold;
}

.explanation {
    margin-top: 5px;
    font-style: italic;
}

button {
    display: block;
    margin: 20px auto 0;
    padding: 12px 24px;
    border: none;
    background-color: #007BFF;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.5rem;
}

button:hover {
    background-color: #0056b3;
}

.home-button, .back-button {
    display: block;
    margin: 10px auto;
    text-align: center;
    text-decoration: none;
    background-color: #28a745;
    padding: 15px 30px;
    color: white;
    border-radius: 4px;
    width: fit-content;
    font-size: 1.5rem;
}

.home-button:hover, .back-button:hover {
    background-color: #218838;
}

textarea {
    width: 100%;
    height: 120px;
    font-size: 1rem;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

.result {
  margin-top: 10px;
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
}

.result.correct {
  background-color: #e6ffe6;
  border-left: 5px solid #28a745;
  color: #155724;
}

.result.wrong {
  background-color: #ffe6e6;
  border-left: 5px solid #dc3545;
  color: #721c24;
}

.explanation {
  margin-top: 10px;
  font-style: italic;
  padding: 10px;
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .quiz-container {
    padding: 15px;
  }

  button,
  .home-button,
  .back-button {
    font-size: 1.2rem;
    padding: 10px 20px;
  }
}

.options label.disabled {
      pointer-events: none;
      color: #000;
    }

    .countdown-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.9); /* 少しだけ背景を透けさせる */
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .countdown-text {
      font-size: 12em;
      font-weight: bold;
      color: #007BFF;
      animation: countdown-zoom 1s infinite;
    }

    @keyframes countdown-zoom {
      from { transform: scale(0.8); opacity: 0.8; }
      to { transform: scale(1.2); opacity: 1; }
    }

    @media (max-width: 600px) {
      .countdown-text {
        font-size: 8em;
      }
    }