/* Basic layout */
:root {
  --bg-start: #0b0b0b;
  --bg-end: #1a0033;
  --text: #ffffff;
  --accent: #7c00ff;
  --font: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }
html,body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(circle at center, var(--bg-start), var(--bg-end));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 2vw;
  transition: all 0.8s ease;
}

/* Container */
.container {
  width: 100%;
  max-width: 920px;
  text-align: center;
}

/* Title */
.title {
  margin: 0 0 12px 0;
  font-size: 2rem;
  letter-spacing: 0.6px;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,0.03);
  padding: 8px 12px;
  border-radius: 8px;
}

.form-row label { font-size: 0.95rem; }
.form-row input[type="text"], .form-row select {
  border: none;
  background: transparent;
  color: inherit;
  padding: 6px 8px;
  border-radius: 6px;
  outline: none;
  min-width: 180px;
}

/* Small toggle row */
.form-row.small label { font-size: 0.9rem; margin-right: 8px; }

/* Preview slideshow */
.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto;
}

.preview-box {
  width: 420px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Preview nav */
.preview-btn {
  background: rgba(255,255,255,0.06);
  border: none;
  color: inherit;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.preview-btn:active { transform: scale(0.95); }

/* Crystal ball */
.crystal-ball {
  width: 220px;
  height: 220px;
  margin: 18px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--accent);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
}

select {
  color: black;          /* Text color */
  background-color: white;  /* Background */
}

select option {
  color: black;          /* Text color in the dropdown list */
  background-color: white;
}


.ball-inner {
  width: 88%;
  height: 88%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  color: #fff;
  text-align: center;
  padding: 10px;
}

.prompt { font-size: 1rem; opacity: 0.9; }

/* Pulse animation (triggered by class) */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 25px var(--accent); }
  50% { transform: scale(1.08); box-shadow: 0 0 70px var(--accent); }
  100% { transform: scale(1); box-shadow: 0 0 25px var(--accent); }
}
.crystal-ball.pulse { animation: pulse 0.8s ease; }

/* Sparkle */
.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  opacity: 0.9;
  pointer-events: none;
  animation: sparkle 0.6s ease forwards;
}
@keyframes sparkle {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Fortune output */
.fortune-output {
  margin-top: 16px;
  min-height: 72px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition: background 0.5s ease;
  font-size: 1.05rem;
}

/* typed text cursor */
.type-cursor {
  display: inline-block;
  width: 10px;
  background: currentColor;
  margin-left: 6px;
  animation: blink 1s steps(2,start) infinite;
  vertical-align: middle;
}
@keyframes blink { to { visibility: hidden; } }

/* Responsive */
@media (max-width: 640px) {
  .preview-box { width: 320px; }
  .crystal-ball { width: 170px; height: 170px; }
  .form-row input[type="text"], .form-row select { min-width: 120px; }
}
