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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: linear-gradient(135deg, #1a0a1e 0%, #2a1035 40%, #4A0D4A 100%);
  color: #FDF8F5;
  padding: 2rem;
  transition: background 0.6s ease;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 0.8rem;
  opacity: 0.85;
  filter: invert(1) brightness(1.2);
}

.brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  opacity: 0.5;
  font-weight: 400;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #E2D1B8;
}

.subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  opacity: 0.5;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

body.game-active h1 {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

body.game-active .subtitle {
  display: none;
}

/* ── Intro screen ── */
#start, #intro, #rules {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.intro-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #E2D1B8;
  margin-bottom: 1.5rem;
}

.intro-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.2;
  opacity: 0.75;
  text-align: left;
}

.intro-text p {
  margin-bottom: 1rem;
}

.rules-steps {
  line-height: 1.4;
}

.intro-text strong {
  color: #E2D1B8;
  opacity: 1;
}

/* ── Extra rules dropdown ── */
.extra-rules {
  margin-top: -0.6rem;
  margin-left: 1.2rem;
  border: 1px solid rgba(217,58,135,0.2);
  border-radius: 0.6rem;
  padding: 0;
  overflow: hidden;
}

.extra-rules summary {
  cursor: pointer;
  padding: 0.35rem 0.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: #E2D1B8;
  opacity: 0.6;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.extra-rules summary:hover {
  opacity: 1;
}

.extra-rules summary::before {
  content: '▸';
  font-size: 0.65rem;
  transition: transform 0.3s;
}

.extra-rules[open] summary::before {
  transform: rotate(90deg);
}

.extra-rules summary::-webkit-details-marker {
  display: none;
}

.extra-rules-content {
  padding: 0 0.8rem 0.6rem;
  animation: fadeSlideIn 0.3s ease;
}

.extra-rules-content p {
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* ── Categories screen ── */
#categories {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

/* ── Setup screen ── */
#setup {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

#setup p.intro {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  opacity: 0.6;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-style: italic;
}

.selector-group {
  margin-bottom: 1.2rem;
}

.selector-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.45;
  margin-bottom: 0.5rem;
}

.selector-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.selector-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  transition: all 0.2s;
  line-height: 1;
}

.selector-btn:hover {
  background: rgba(217,58,135,0.1);
  color: rgba(255,255,255,0.7);
}

.selector-btn.active {
  background: rgba(217,58,135,0.2);
  border-color: rgba(217,58,135,0.5);
  color: #E2D1B8;
}

.setup-divider {
  width: 60%;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 1.5rem auto;
}

.add-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.add-form input[type="text"] {
  flex: 1;
  min-width: 140px;
  padding: 0.8rem 1.2rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s;
}

.add-form input[type="text"]::placeholder { color: rgba(226,209,184,0.35); }
.add-form input[type="text"]:focus { border-color: rgba(217,58,135,0.5); }
.add-form input[type="text"].input-error { border-color: #e74c3c; }

.gender-btns {
  display: flex;
  gap: 0.4rem;
}

.gender-btn {
  padding: 0.8rem 1rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  transition: all 0.2s;
  line-height: 1;
}

.gender-btn:hover { background: rgba(217,58,135,0.15); }
.gender-btn.selected { background: rgba(217,58,135,0.25); border-color: rgba(217,58,135,0.5); }
.gender-btn.input-error { border-color: #e74c3c; }

.error-msg {
  color: #e74c3c;
  font-size: 0.85rem;
  min-height: 1.2rem;
  transition: opacity 0.3s;
}

.btn-add {
  padding: 0.9rem 2.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(217,58,135,0.4);
  background: linear-gradient(135deg, rgba(217,58,135,0.2), rgba(74,13,74,0.3));
  color: #E2D1B8;
  cursor: pointer;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s;
  box-shadow: 0 0 20px rgba(217,58,135,0.1);
}

.btn-add:hover {
  background: linear-gradient(135deg, rgba(217,58,135,0.35), rgba(74,13,74,0.4));
  box-shadow: 0 0 30px rgba(217,58,135,0.2);
  transform: scale(1.05);
}

.btn-add:active { transform: scale(0.97); }

.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0;
  min-height: 2.5rem;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  animation: fadeSlideIn 0.3s ease forwards;
}

.player-chip .gender-icon { font-size: 0.85rem; }

.player-chip .remove {
  cursor: pointer;
  opacity: 0.5;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

.player-chip .remove:hover { opacity: 1; }

/* ── Game screen ── */
#game { display: none; text-align: center; width: 100%; max-width: 500px; }

.player-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.player-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  transition: color 0.4s;
}

.player-gender-icon {
  font-size: 1rem;
  opacity: 0.5;
}

.card {
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, background 0.6s ease, border-color 0.6s ease;
}

.card:hover { transform: translateY(-4px); }

.card-logo {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 24px;
  height: 24px;
  opacity: 0.25;
  filter: invert(1) brightness(1.2);
}

.category {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  background: rgba(226,209,184,0.1);
  margin-bottom: 1.5rem;
  opacity: 0.6;
  color: #E2D1B8;
}

.question {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.5;
  font-weight: 500;
  min-height: 4.8rem;
}

.question.animate-in { animation: fadeSlideIn 0.5s ease forwards; }
.question.animate-out { animation: fadeSlideOut 0.3s ease forwards; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}

.counter {
  margin-top: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  opacity: 0.35;
}

.card-theme {
  position: absolute;
  bottom: 1rem;
  right: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.35;
  color: #E2D1B8;
}

.player-turn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

/* ── Dots: which player is active ── */
.player-dots {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.3;
  transition: all 0.4s ease;
  cursor: default;
}

.player-dot.active {
  opacity: 1;
  transform: scale(1.3);
  box-shadow: 0 0 8px currentColor;
}

/* ── Buttons ── */
.btn {
  margin-top: 2rem;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-family: 'Playfair Display', Georgia, serif;
  border: 1px solid rgba(226,209,184,0.3);
  border-radius: 3rem;
  background: transparent;
  color: #E2D1B8;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.btn:hover {
  background: rgba(217,58,135,0.15);
  border-color: rgba(217,58,135,0.5);
  transform: scale(1.05);
}

.btn:active { transform: scale(0.97); }

.btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.btn:disabled:hover {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  transform: none;
}

.sparkle {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle 0.8s ease forwards;
}

@keyframes sparkle {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0) translateY(-40px); }
}

/* ── Intensity picker on card ── */
.intensity-picker-incard,
.intensity-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  transition: all 0.3s ease;
}

.intensity-picker.above-card {
  padding: 0.3rem 0;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.intensity-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.intensity-picker.above-card .intensity-label {
  font-size: 0.6rem;
  opacity: 0.3;
}

.intensity-buttons {
  display: flex;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.intensity-picker.above-card .intensity-buttons {
  gap: 0.3rem;
}

.intensity-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  transition: all 0.25s;
}

.intensity-picker.above-card .intensity-btn {
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
}

.intensity-btn:hover:not(.used) {
  background: rgba(217,58,135,0.15);
  border-color: rgba(217,58,135,0.4);
  color: #E2D1B8;
  transform: scale(1.05);
}

.intensity-btn.used {
  opacity: 0.25;
  cursor: default;
}

.pass-btn {
  position: absolute;
  bottom: 1rem;
  left: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pass-btn:hover {
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.25);
}

/* ── Next row (volgende + rules icon) ── */
.next-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 500px;
}

.next-row .btn {
  flex: 0 0 auto;
}

.rules-icon-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 1rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(226,209,184,0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.rules-icon-btn:hover {
  color: rgba(226,209,184,0.8);
  border-color: rgba(217,58,135,0.4);
  background: rgba(217,58,135,0.1);
}

/* ── Rules popover ── */
.rules-popover {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.rules-popover.open {
  display: flex;
}

.rules-popover-content {
  position: relative;
  background: linear-gradient(135deg, #2a1035 0%, #4A0D4A 100%);
  border: 1px solid rgba(217,58,135,0.3);
  border-radius: 1.2rem;
  padding: 2rem 1.8rem;
  max-width: 380px;
  width: calc(100% - 3rem);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  line-height: 1.4;
  color: #FDF8F5;
  animation: fadeSlideIn 0.3s ease forwards;
}

.rules-popover-body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.3;
  opacity: 0.75;
  text-align: left;
}

.rules-popover-body p {
  margin-bottom: 0.8rem;
}

.rules-popover-body strong {
  color: #E2D1B8;
  opacity: 1;
}

.rules-popover-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(226,209,184,0.5);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.rules-popover-close:hover {
  color: rgba(226,209,184,0.9);
}

/* ── Scoreboard ── */
.scoreboard {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 500px;
}

.scoreboard table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
}

.scoreboard th {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.4;
  padding: 0.3rem 0.4rem;
  text-align: center;
}

.scoreboard th:first-child {
  text-align: left;
}

.scoreboard td {
  padding: 0.3rem 0.4rem;
  text-align: center;
  opacity: 0.6;
}

.scoreboard td:first-child {
  text-align: left;
  opacity: 0.8;
}

.scoreboard tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.score-name {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.score-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.glow-bg {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  opacity: 0.12;
  transition: background 0.8s ease;
  z-index: -1;
}

/* ── Desktop layout ── */
@media (min-width: 768px) {
  .brand-header {
    flex-direction: row;
    gap: 0.8rem;
  }

  .brand-logo {
    margin-bottom: 0;
  }
}
