* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: #050208;
  color: #d8d0e8;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(2,0,6,0.9) 100%);
}

main {
  position: relative;
  z-index: 2;
  width: min(640px, 92vw);
  text-align: center;
  padding: 12vh 0 4vh;
  flex: 1;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #6d5a9e;
  margin: 0 0 1.2rem;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  margin: 0 0 0.8rem;
  color: #efe9fb;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.45);
  letter-spacing: 0.02em;
}

.tagline {
  font-size: 1rem;
  line-height: 1.7;
  color: #9a8fb8;
  margin: 0 0 2.4rem;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

input#question {
  background: rgba(20, 12, 36, 0.7);
  border: 1px solid #3b2a63;
  border-radius: 10px;
  color: #efe9fb;
  font-size: 1.05rem;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 1rem 1.2rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}

input#question::placeholder { color: #5b4a7d; }

input#question:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

button {
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
}

#consult, #again {
  background: linear-gradient(180deg, #2a1b4d, #1a1030);
  border: 1px solid #6d5a9e;
  border-radius: 10px;
  color: #efe9fb;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 1.2rem;
  transition: all 0.3s;
}

#consult:hover:not(:disabled), #again:hover {
  border-color: #a78bfa;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

#consult:disabled {
  opacity: 0.45;
  cursor: wait;
}

#ritual { margin: 2rem 0; }

.pulse {
  width: 14px;
  height: 14px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 30px 8px rgba(139, 92, 246, 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.9); opacity: 0.35; }
}

#ritual-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #9a8fb8;
}

#answer { margin: 1rem 0 2rem; }

#answer-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  line-height: 1.75;
  color: #efe9fb;
  min-height: 6rem;
  text-align: center;
  text-wrap: pretty;
}

#answer-text .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #a78bfa;
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 0.8s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

#omen {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: #6d5a9e;
  font-style: italic;
}

#again { margin-top: 2rem; }

.count {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #4a3d68;
  text-transform: uppercase;
}

footer {
  position: relative;
  z-index: 2;
  padding: 0 1rem 2rem;
  text-align: center;
}

footer p {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #3d3357;
  margin: 0;
}

@media (max-width: 480px) {
  main { padding-top: 9vh; }
}
