/* ===================================
   HORROR THEME - BLACK MAGIC STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Horror Color Palette */
  --color-blood: #8b0000;
  --color-blood-dark: #4a0000;
  --color-death: #1a0000;
  --color-bone: #e8dcc4;
  --color-ghost: #f0f0f0;
  --color-shadow: #0a0a0a;
  --color-fire: #ff4500;
  --color-poison: #00ff00;

  /* Gradients */
  --gradient-blood: linear-gradient(
    180deg,
    #000000 0%,
    #4a0000 50%,
    #8b0000 100%
  );
  --gradient-death: radial-gradient(circle, #1a0000 0%, #000000 100%);
  --gradient-fire: linear-gradient(45deg, #ff4500, #ff0000, #8b0000);

  /* Fonts */
  --font-horror: "Creepster", cursive;
  --font-death: "Nosifer", cursive;
  --font-eater: "Eater", cursive;
  --font-butcher: "Butcherman", cursive;

  /* Responsive Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Container Padding */
  --container-padding: 1rem;
  --screen-padding: 1rem;
}

html {
  box-sizing: border-box;
  overflow-x: hidden;
}

body {
  font-family: "Arial", sans-serif;
  background: #000000;
  color: var(--color-bone);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  cursor:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="8" fill="red" opacity="0.5"/></svg>'),
    auto;
}

/* ===================================
   HORROR BACKGROUND
   =================================== */
.horror-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--gradient-blood);
  overflow: hidden;
}

.blood-drip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(transparent 0%, rgba(139, 0, 0, 0.1) 50%, transparent 100%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 10px,
      rgba(139, 0, 0, 0.05) 10px,
      rgba(139, 0, 0, 0.05) 20px
    );
  animation: bloodFlow 20s linear infinite;
}

@keyframes bloodFlow {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.fog-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  animation: fogMove 15s ease-in-out infinite;
}

@keyframes fogMove {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

.lightning-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  animation: lightning 10s infinite;
}

@keyframes lightning {
  0%,
  90%,
  92%,
  94%,
  100% {
    opacity: 0;
  }
  91%,
  93% {
    opacity: 0.3;
  }
}

/* ===================================
   FLOATING GHOSTS
   =================================== */
.ghost-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.floating-ghost {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 0.4;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
  animation: ghostFloat 8s ease-in-out infinite;
}

.ghost-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.ghost-2 {
  top: 60%;
  right: 15%;
  animation-delay: 3s;
  animation-duration: 10s;
}

.ghost-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 5s;
  animation-duration: 12s;
}

@keyframes ghostFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.2;
  }
  25% {
    transform: translate(50px, -30px) rotate(5deg);
    opacity: 0.5;
  }
  50% {
    transform: translate(100px, 20px) rotate(-5deg);
    opacity: 0.3;
  }
  75% {
    transform: translate(30px, 50px) rotate(3deg);
    opacity: 0.6;
  }
}

/* ===================================
   HYPNOTIC SPIRAL
   =================================== */
.hypnotic-spiral {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  opacity: 0.15;
  z-index: 0;
  animation: spiralRotate 10s linear infinite;
  pointer-events: none;
}

.spiral-pulse {
  animation: pulsate 2s ease-in-out infinite;
}

.spiral-path {
  animation: spiralRotate 5s linear infinite reverse;
}

.spiral-eye {
  animation: eyeBlink 3s ease-in-out infinite;
}

@keyframes spiralRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulsate {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes eyeBlink {
  0%,
  90%,
  100% {
    opacity: 1;
  }
  95% {
    opacity: 0;
  }
}

/* ===================================
   SCREEN MANAGEMENT
   =================================== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  /* align-items: center removed to prevent top clipping on overflow */
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1s ease,
    visibility 1s ease;
  z-index: 2;
  padding: max(var(--screen-padding), env(safe-area-inset-top));
  padding-top: max(4rem, env(safe-area-inset-top)); /* Global top spacing fix */
  overflow-y: auto;
  box-sizing: border-box;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

.screen-content {
  max-width: min(1000px, 100%);
  width: 100%;
  text-align: center;
  animation: fadeInDark 1.5s ease;
  padding: var(--container-padding);
  margin: auto; /* Centers content vertically and horizontally safely */
  box-sizing: border-box;
}

@keyframes fadeInDark {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===================================
   HORROR TYPOGRAPHY
   =================================== */
.horror-title {
  font-family: var(--font-horror);
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--color-fire);
  text-shadow:
    0 0 10px var(--color-fire),
    0 0 20px var(--color-blood),
    0 0 30px var(--color-blood-dark),
    2px 2px 5px #000;
  margin-top: 1rem;
  margin-bottom: 2rem;
  letter-spacing: 3px;
}

.glitch {
  position: relative;
  animation: glitchText 2s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #ff0000;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitchBefore 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 #00ff00;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitchAfter 2.5s infinite linear alternate-reverse;
}

@keyframes glitchText {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitchBefore {
  0% {
    clip: rect(61px, 9999px, 52px, 0);
  }
  20% {
    clip: rect(84px, 9999px, 12px, 0);
  }
  40% {
    clip: rect(28px, 9999px, 73px, 0);
  }
  60% {
    clip: rect(45px, 9999px, 99px, 0);
  }
  80% {
    clip: rect(12px, 9999px, 56px, 0);
  }
  100% {
    clip: rect(90px, 9999px, 34px, 0);
  }
}

@keyframes glitchAfter {
  0% {
    clip: rect(26px, 9999px, 85px, 0);
  }
  20% {
    clip: rect(54px, 9999px, 12px, 0);
  }
  40% {
    clip: rect(38px, 9999px, 67px, 0);
  }
  60% {
    clip: rect(75px, 9999px, 23px, 0);
  }
  80% {
    clip: rect(19px, 9999px, 89px, 0);
  }
  100% {
    clip: rect(43px, 9999px, 56px, 0);
  }
}

.skull-divider {
  font-size: 2rem;
  margin: 1rem 0;
  animation: skullBounce 2s ease-in-out infinite;
}

@keyframes skullBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.horror-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-bone);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.blood-text {
  color: var(--color-blood);
  text-shadow: 0 0 10px var(--color-blood);
  font-weight: bold;
}

/* ===================================
   WATCHING EYES
   =================================== */
.watching-eyes {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin-bottom: 2rem;
}

.eye {
  width: 80px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  animation: eyeMove 4s ease-in-out infinite;
}

.pupil {
  width: 30px;
  height: 30px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pupilMove 5s ease-in-out infinite;
}

@keyframes eyeMove {
  0%,
  100% {
    transform: scaleY(1);
  }
  10%,
  30% {
    transform: scaleY(0.1);
  }
  20% {
    transform: scaleY(1);
  }
}

@keyframes pupilMove {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-30%, -50%);
  }
  50% {
    transform: translate(-70%, -50%);
  }
  75% {
    transform: translate(-50%, -30%);
  }
}

/* ===================================
   WARNING BOX
   =================================== */
.warning-box {
  background: rgba(139, 0, 0, 0.2);
  border: 3px solid var(--color-blood);
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow:
    0 0 20px var(--color-blood),
    inset 0 0 20px rgba(139, 0, 0, 0.3);
}

.pulsating {
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%,
  100% {
    border-color: var(--color-blood);
    box-shadow: 0 0 20px var(--color-blood);
  }
  50% {
    border-color: var(--color-fire);
    box-shadow: 0 0 40px var(--color-fire);
  }
}

.warning-text {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--color-fire);
  margin: 1rem 0;
  text-shadow: 0 0 5px var(--color-fire);
}

/* ===================================
   RITUAL CIRCLE
   =================================== */
.ritual-circle {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 2rem auto;
  border: 3px solid var(--color-blood);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 30px var(--color-blood),
    inset 0 0 30px rgba(139, 0, 0, 0.3);
  animation: circleGlow 3s ease-in-out infinite;
}

@keyframes circleGlow {
  0%,
  100% {
    box-shadow:
      0 0 30px var(--color-blood),
      inset 0 0 30px rgba(139, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 60px var(--color-fire),
      inset 0 0 60px rgba(255, 69, 0, 0.5);
  }
}

.pentagram {
  font-size: 5rem;
  color: var(--color-fire);
  text-shadow: 0 0 20px var(--color-fire);
  animation: pentagramSpin 20s linear infinite;
}

@keyframes pentagramSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.runes {
  position: absolute;
  font-size: 1.5rem;
  color: var(--color-bone);
  letter-spacing: 10px;
}

.rotating {
  animation: runeRotate 15s linear infinite;
}

@keyframes runeRotate {
  from {
    transform: rotate(0deg) translateY(-100px);
  }
  to {
    transform: rotate(360deg) translateY(-100px);
  }
}

/* ===================================
   LANGUAGE CARDS - HORROR STYLE
   =================================== */
.language-prompt {
  font-family: var(--font-butcher);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-fire);
  margin: 2rem 0;
}

.flickering {
  animation: flicker 3s ease-in-out infinite;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  75% {
    opacity: 0.8;
  }
}

.language-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.horror-card {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--color-blood);
  border-radius: 15px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.horror-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--color-fire) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.horror-card:hover::before {
  opacity: 0.2;
  animation: cardGlow 2s linear infinite;
}

@keyframes cardGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.horror-card:hover {
  transform: translateY(-10px) scale(1.05);
  border-color: var(--color-fire);
  box-shadow:
    0 20px 60px rgba(255, 69, 0, 0.5),
    0 0 30px var(--color-fire);
}

.card-shadow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.8), transparent);
  filter: blur(10px);
}

.card-content {
  position: relative;
  z-index: 1;
}

.skull-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: skullPulse 2s ease-in-out infinite;
}

@keyframes skullPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.dripping-text {
  font-family: var(--font-eater);
  font-size: 2rem;
  color: var(--color-bone);
  margin: 1rem 0;
  text-shadow: 0 0 10px var(--color-blood);
}

.horror-card p {
  color: var(--color-blood);
  font-size: 1rem;
}

.blood-drops {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, transparent, var(--color-blood));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.horror-card:hover .blood-drops {
  opacity: 0.5;
  animation: drip 2s ease-in-out infinite;
}

@keyframes drip {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ===================================
   RITUAL PREPARATION SCREEN
   =================================== */
.ritual-image {
  position: relative;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.summoned-spirit {
  max-width: min(300px, 80vw);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
  animation: spiritFloat 4s ease-in-out infinite;
}

@keyframes spiritFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
  }
  50% {
    transform: translateY(-20px) scale(1.05);
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 1));
  }
}

.magic-circle {
  position: absolute;
  width: 400px;
  height: 400px;
  border: 3px solid var(--color-fire);
  border-radius: 50%;
  box-shadow: 0 0 40px var(--color-fire);
}

.rotating-slow {
  animation: slowRotate 30s linear infinite;
}

@keyframes slowRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ritual-text {
  max-width: 700px;
  margin: 0 auto 2rem;
}

.ritual-text p {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ===================================
   HYPNOTIC EYE
   =================================== */
.hypnosis-guide {
  margin: 2rem 0;
}

.hypnotic-eye {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ccc 40%, #000 100%);
  box-shadow: 0 0 40px var(--color-fire);
}

.iris {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--color-fire) 0%,
    var(--color-blood) 100%
  );
  animation: irisExpand 3s ease-in-out infinite;
}

@keyframes irisExpand {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.hypnotic-text {
  font-style: italic;
  color: var(--color-bone);
  font-size: 0.9rem;
}

/* ===================================
   HORROR BUTTONS
   =================================== */
.horror-button {
  position: relative;
  padding: 1rem 2.5rem;
  font-family: var(--font-butcher);
  font-size: 1.2rem;
  color: var(--color-bone);
  background: var(--gradient-fire);
  border: 3px solid var(--color-fire);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(255, 69, 0, 0.5);
  margin: 0.5rem;
}

.horror-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 50px rgba(255, 69, 0, 0.8);
  border-color: var(--color-bone);
}

.button-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  animation: buttonGlowRotate 3s linear infinite;
}

@keyframes buttonGlowRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.button-text {
  position: relative;
  z-index: 1;
  text-shadow: 0 0 10px #000;
}

.horror-button.secondary {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--color-blood);
}

/* ===================================
   QUESTION SCREEN - HORROR THEME
   =================================== */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 2px solid var(--color-blood);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(139, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.blood-fill {
  height: 100%;
  background: var(--gradient-fire);
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 20px var(--color-fire);
  animation: bloodPulse 2s ease-in-out infinite;
}

@keyframes bloodPulse {
  0%,
  100% {
    box-shadow: 0 0 20px var(--color-fire);
  }
  50% {
    box-shadow: 0 0 40px var(--color-fire);
  }
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-bone);
  text-shadow: 0 0 5px var(--color-blood);
}

.question-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--color-blood);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(139, 0, 0, 0.5);
  position: relative;
}

.skull-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gradient-fire);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 0 20px var(--color-fire);
}

.question-text {
  font-family: var(--font-butcher);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.5;
  margin-bottom: 2rem;
  color: var(--color-bone);
  text-shadow: 0 0 10px var(--color-blood);
}

.glitch-text {
  animation: textGlitch 5s infinite;
}

@keyframes textGlitch {
  0%,
  90%,
  100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
  98% {
    transform: translate(2px, 2px);
  }
}

.answers-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-option {
  padding: 1rem 1.5rem;
  background: rgba(26, 0, 0, 0.6);
  border: 2px solid var(--color-blood);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--color-bone);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.answer-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 69, 0, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.answer-option:hover::before {
  left: 100%;
}

.answer-option:hover {
  background: rgba(139, 0, 0, 0.4);
  border-color: var(--color-fire);
  color: var(--color-fire);
  transform: translateX(10px);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
}

.answer-option.selected {
  background: var(--gradient-fire);
  border-color: var(--color-bone);
  color: var(--color-bone);
  font-weight: bold;
  box-shadow: 0 0 30px var(--color-fire);
}

/* Shadow Hands */
.shadow-hands {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.hand {
  position: absolute;
  font-size: 3rem;
  opacity: 0.3;
  animation: handReach 6s ease-in-out infinite;
}

.left-hand {
  left: -50px;
  top: 50%;
  transform: translateY(-50%) rotate(-20deg);
}

.right-hand {
  right: -50px;
  top: 50%;
  transform: translateY(-50%) rotate(20deg) scaleX(-1);
  animation-delay: 3s;
}

@keyframes handReach {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-50%) translateX(30px);
    opacity: 0.5;
  }
}

/* ===================================
   ANALYSIS SCREEN - DARK RITUAL
   =================================== */
.ritual-visual {
  margin-bottom: 2rem;
}

.summoning-circle {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.circle-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid var(--color-fire);
  border-radius: 50%;
  box-shadow: 0 0 30px var(--color-fire);
}

.layer-1 {
  width: 100%;
  height: 100%;
  animation: circleRotate 10s linear infinite;
}

.layer-2 {
  width: 70%;
  height: 70%;
  animation: circleRotate 15s linear infinite reverse;
}

.layer-3 {
  width: 40%;
  height: 40%;
  animation: circleRotate 20s linear infinite;
}

@keyframes circleRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.pentagram-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: var(--color-fire);
  text-shadow: 0 0 30px var(--color-fire);
  animation: pentagramPulse 2s ease-in-out infinite;
}

@keyframes pentagramPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0 0 30px var(--color-fire);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    text-shadow: 0 0 60px var(--color-fire);
  }
}

.analysis-text {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.ritual-progress {
  display: flex;
  justify-content: center;
}

.candles {
  display: flex;
  gap: 2rem;
}

.candle {
  font-size: 2rem;
  animation: candleFlicker 1.5s ease-in-out infinite;
}

.candle:nth-child(2) {
  animation-delay: 0.5s;
}

.candle:nth-child(3) {
  animation-delay: 1s;
}

@keyframes candleFlicker {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

/* ===================================
   RESULTS SCREEN - THE REVELATION
   =================================== */
.results-content {
  max-width: 1200px;
}

.dark-prophecy {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--color-blood);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(139, 0, 0, 0.5);
}

.prophecy-badge {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gradient-fire);
  border-radius: 50px;
  font-family: var(--font-butcher);
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  box-shadow: 0 0 30px var(--color-fire);
}

.prophecy-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-bone);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.dark-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--color-blood);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.dark-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-fire);
  box-shadow: 0 10px 40px rgba(255, 69, 0, 0.5);
}

.dark-card h3 {
  font-family: var(--font-butcher);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-fire);
}

.blood-bar {
  width: 100%;
  height: 12px;
  background: rgba(139, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.trait-fill {
  height: 100%;
  background: var(--gradient-fire);
  border-radius: 10px;
  transition: width 1s ease;
  box-shadow: 0 0 20px var(--color-fire);
}

.trait-score {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-fire);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--color-fire);
}

.trait-desc {
  font-size: 0.9rem;
  color: var(--color-bone);
  line-height: 1.6;
}

.dark-insights {
  margin-bottom: 3rem;
}

.dark-insights h2 {
  font-family: var(--font-horror);
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--color-fire);
  text-shadow: 0 0 20px var(--color-fire);
}

.insight-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.insight-card {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-left: 4px solid var(--color-fire);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.3);
}

.insight-card h4 {
  font-family: var(--font-butcher);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--color-fire);
}

.insight-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-bone);
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
  .watching-eyes {
    gap: 50px;
  }

  .eye {
    width: 60px;
    height: 40px;
  }

  .pupil {
    width: 20px;
    height: 20px;
  }

  .ritual-circle {
    width: 150px;
    height: 150px;
  }

  .pentagram {
    font-size: 3rem;
  }

  .language-cards {
    grid-template-columns: 1fr;
  }

  .floating-ghost {
    width: 60px;
    height: 60px;
  }

  .hypnotic-spiral {
    width: 200px;
    height: 200px;
  }

  .question-container {
    margin-top: 100px;
    padding: 1rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .summoning-circle {
    width: 200px;
    height: 200px;
  }

  .pentagram-center {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .horror-title {
    font-size: clamp(1.5rem, 8vw, 3rem);
  }

  .warning-box {
    padding: 1rem;
  }

  .ritual-circle {
    width: 120px;
    height: 120px;
  }

  .pentagram {
    font-size: 2.5rem;
  }

  .horror-card {
    padding: 1.5rem;
  }

  .summoned-spirit {
    max-width: 200px;
  }

  .magic-circle {
    width: 250px;
    height: 250px;
  }

  .hypnotic-eye {
    width: 80px;
    height: 80px;
  }

  .iris {
    width: 40px;
    height: 40px;
  }

  .question-text {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }

  .answer-option {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }

  .hand {
    font-size: 2rem;
  }

  .summoning-circle {
    width: 150px;
    height: 150px;
  }

  .pentagram-center {
    font-size: 2rem;
  }

  .horror-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    width: 100%;
  }
}

/* ===================================
   RESPONSIVE SPACING ADJUSTMENTS
   =================================== */

/* Tablet and below */
@media (max-width: 768px) {
  :root {
    --spacing-xs: 0.4rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --container-padding: 0.75rem;
    --screen-padding: 0.75rem;
  }

  body {
    font-size: 14px;
  }

  /* Ensure all containers respect padding */
  .warning-box,
  .ritual-circle,
  .language-cards,
  .horror-card,
  .ritual-text,
  .question-container,
  .dark-prophecy,
  .results-grid,
  .dark-insights {
    padding: var(--spacing-md);
    margin-left: auto;
    margin-right: auto;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --spacing-xs: 0.3rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --container-padding: 0.5rem;
    --screen-padding: 0.5rem;
  }

  body {
    font-size: 13px;
  }

  /* Tighter spacing for mobile */
  .screen {
    padding: 0.5rem;
  }

  .screen-content {
    padding: 0.5rem;
  }

  /* Ensure no overflow */
  .warning-box,
  .horror-card,
  .question-container,
  .dark-prophecy,
  .result-card,
  .insight-card {
    padding: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .language-cards,
  .results-grid {
    gap: var(--spacing-sm);
  }

  /* Reduce margins */
  .horror-title {
    margin-bottom: var(--spacing-md);
  }

  .skull-divider {
    margin: var(--spacing-sm) 0;
  }

  .ritual-circle {
    margin: var(--spacing-md) auto;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  :root {
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.4rem;
    --spacing-md: 0.6rem;
    --spacing-lg: 0.8rem;
    --spacing-xl: 1.2rem;
    --spacing-2xl: 1.5rem;
    --container-padding: 0.4rem;
    --screen-padding: 0.4rem;
  }

  body {
    font-size: 12px;
  }

  .screen {
    padding: 0.4rem;
  }

  .screen-content {
    padding: 0.4rem;
  }

  /* Minimal padding for very small screens */
  .warning-box,
  .horror-card,
  .question-container {
    padding: 0.5rem;
  }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  :root {
    --spacing-xl: 1rem;
    --spacing-2xl: 1.5rem;
    --screen-padding: 0.5rem;
  }

  .screen {
    padding: 0.5rem;
  }

  .horror-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
  }

  .ritual-circle {
    width: 100px;
    height: 100px;
    margin: 0.5rem auto;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible,
.answer-option:focus-visible,
.horror-card:focus-visible {
  outline: 3px solid var(--color-fire);
  outline-offset: 3px;
}
