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

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  transition: all 0.3s ease;
}

body.horror-mode {
  background: #000;
  animation: flicker 0.1s infinite;
}

@keyframes flicker {
  0%,
  50%,
  100% {
    background: #000;
  }
  25%,
  75% {
    background: #1a0000;
  }
}

.container {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.container.horror-mode {
  background: #1a0000;
  border: 3px solid #8b0000;
  box-shadow: 0 0 50px rgba(139, 0, 0, 0.8);
}

.quiz-header {
  margin-bottom: 30px;
}

.quiz-header h1 {
  color: #4a5568;
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-header p {
  color: #718096;
  font-size: 1.1rem;
}

.question {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #2d3748;
}

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

.option {
  background: #edf2f7;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  text-align: left;
}

.option:hover {
  background: #e2e8f0;
  border-color: #4299e1;
  transform: translateY(-2px);
}

.option.selected {
  background: #bee3f8;
  border-color: #3182ce;
}

.next-btn {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  opacity: 0.5;
  pointer-events: none;
}

.next-btn.enabled {
  opacity: 1;
  pointer-events: auto;
}

.next-btn:hover.enabled {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(66, 153, 225, 0.3);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(135deg, #48bb78, #38a169);
  transition: width 0.5s ease;
}

.horror-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s ease-out;
}

.dracula-image {
  width: 400px;
  height: 400px;
  background: #8b0000;
  border-radius: 20px;
  position: relative;
  animation: scareZoom 0.8s ease-out, shake 0.1s infinite 0.8s;
  box-shadow: 0 0 100px rgba(139, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8rem;
  margin-bottom: 30px;
}

.dracula-ascii {
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  white-space: pre;
}

.horror-text {
  color: #ff0000;
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  animation: pulse 1s infinite, textGlow 2s infinite;
  margin-bottom: 20px;
}

.horror-subtitle {
  color: #fff;
  font-size: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: fadeInDelay 1s ease-out 1s both;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes scareZoom {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0% {
    transform: translateX(-2px) translateY(-2px);
  }
  25% {
    transform: translateX(2px) translateY(2px);
  }
  50% {
    transform: translateX(-2px) translateY(2px);
  }
  75% {
    transform: translateX(2px) translateY(-2px);
  }
  100% {
    transform: translateX(-2px) translateY(-2px);
  }
}

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

@keyframes textGlow {
  0%,
  100% {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px #ff0000;
  }
  50% {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 40px #ff0000,
      0 0 60px #ff0000;
  }
}

@keyframes fadeInDelay {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fake-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #e2e8f0;
  border-top: 5px solid #4299e1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.blood-drops {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.blood-drop {
  position: absolute;
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, #8b0000, #ff0000);
  border-radius: 0 0 4px 4px;
  animation: bloodFall 2s linear infinite;
}

@keyframes bloodFall {
  0% {
    transform: translateY(-20px);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.stop-button {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
  z-index: 10000;
}

.stop-button.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  animation: stopButtonPulse 2s infinite;
}

.stop-button:hover {
  background: linear-gradient(135deg, #ff6666, #ff0000);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 68, 68, 0.6);
}

@keyframes stopButtonPulse {
  0%,
  100% {
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.8),
      0 0 20px rgba(255, 68, 68, 0.6);
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
    width: calc(100% - 20px);
    max-width: none;
  }

  .quiz-header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .quiz-header p {
    font-size: 1rem;
  }

  .question {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  .option {
    padding: 12px 15px;
    font-size: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
  }

  .next-btn {
    padding: 12px 25px;
    font-size: 1rem;
    width: 100%;
    max-width: 200px;
  }

  .progress-bar {
    margin-bottom: 15px;
  }

  .options {
    gap: 10px;
  }

  /* ホラー画面のモバイル対応 */
  .dracula-image {
    width: 250px;
    height: 250px;
    font-size: 4rem;
    margin-bottom: 20px;
  }

  .dracula-ascii {
    font-size: 1.2rem;
  }

  .horror-text {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
    padding: 0 20px;
  }

  .horror-subtitle {
    font-size: 1rem;
    text-align: center;
    padding: 0 20px;
  }

  .stop-button {
    bottom: 20px;
    padding: 15px 30px;
    font-size: 1.1rem;
    width: 80%;
    max-width: 200px;
  }

  /* タッチしやすいボタンサイズ */
  .option,
  .next-btn,
  .stop-button {
    min-height: 44px;
  }
}
