.intro-card {
  margin: 2rem auto 2.5rem;
  padding: 1.9rem 1.7rem 2rem;
  max-width: 760px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
}

.intro-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.intro-card p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.highlight {
  color: #bfdbfe;
  font-weight: 600;
}

/* Randomizer + glow */

.randomizer {
  display: flex;
  flex-direction: column;
  align-items: center;    /* centers the button */
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  margin: 2.5rem auto 3rem;
}

.random-btn {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #f9fafb;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.random-btn .dice {
  font-size: 1.1rem;
}

.random-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(79, 70, 229, 0.75);
  filter: brightness(1.05);
}

/* Outer shell: just holds the card */
.random-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

/* Card container */
.random-card-inner {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, #111827, #020617);
  color: #e5e7eb;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.75);
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

/* Front & back faces share the same basic padding */
.card-face {
  padding: 1.4rem 1.6rem;
}

/* By default, show front and hide back */
.card-front {
  display: block;
}

.card-back {
  display: none;
}

/* When JS adds .flipped, show back and hide front */
.random-card-inner.flipped .card-front {
  display: none;
}

.random-card-inner.flipped .card-back {
  display: block;
}

/* Tiny helper text under content */
.flip-hint {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-softer);
}

.random-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-softer);
  margin: 0 0 0.4rem;
}

.random-question {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.random-subtext {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin: 0.15rem 0 0.25rem;
}

.random-line {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0.1rem 0;
}

.random-line strong {
  color: var(--text-main);
}

.who-answer {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #10b981;
}

.who-answer span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6ee7b7;
  margin-bottom: 0.15rem;
}

/* Glow effect when JS adds .active */
.random-card-inner.active {
  box-shadow:
    0 0 25px rgba(129, 140, 248, 0.7),
    0 18px 45px rgba(15, 23, 42, 0.95);
  border-color: rgba(129, 140, 248, 0.9);
}

/* -------------------------- */
/* THEME SELECTOR CARD (HOME) */
/* -------------------------- */

.theme-card {
  margin: 0 auto 2.5rem;
  padding: 1.6rem 1.6rem 1.8rem;
  max-width: 760px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.85);
  text-align: center;              /* center all text */
}

.theme-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.theme-card p {
  margin: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.theme-controls {
  display: flex;
  flex-direction: column;      /* label on its own line */
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.theme-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-softer);
}

/* row that holds select + button */
.theme-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.theme-select {
  min-width: 190px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #020617;
  color: var(--text-main);
  font-size: 0.85rem;
}

.theme-select:focus {
  outline: none;
  border-color: var(--accent);
}

.theme-random-btn {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #f9fafb;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.theme-random-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.8);
  filter: brightness(1.05);
}

.current-theme {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-softer);
}

.current-theme strong {
  color: #e5e7eb;
}

/* Mobile layout */
@media (max-width: 640px) {
  .theme-card {
    padding: 1.4rem 1.2rem 1.6rem;
  }

  .theme-actions {
    flex-direction: column;    /* stack dropdown and button */
    align-items: center;
  }

  .theme-select,
  .theme-random-btn {
    width: 100%;
    max-width: 260px;
  }
}
