/* ====================================================
   Two Princesses — Royal Baby Shower
   Shared palette + typography for all game pages
   ==================================================== */

:root {
  --bg-deep: #14082a;
  --bg-mid: #2a1455;
  --bg-card: rgba(255, 255, 255, 0.04);
  --gold: #d4b04a;
  --gold-soft: #e6cb74;
  --gold-deep: #9c7c2a;
  --text: #f0e9d8;
  --text-muted: #b9a89a;
  --accent: #c799ff;
  --accent-warm: #ff8b8b;
  --border: rgba(212, 176, 74, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(149, 95, 217, 0.25), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(120, 60, 200, 0.2), transparent 55%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 47% 24%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px at 65% 88%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 78% 32%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 90% 65%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 35% 95%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 55% 5%, rgba(255,255,255,0.5), transparent);
  z-index: 0;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
header {
  text-align: center;
  margin-bottom: 32px;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
}

.crown {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 12px rgba(212, 176, 74, 0.4));
}

h1 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--gold-soft);
  font-size: clamp(26px, 5vw, 38px);
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.subtitle {
  font-family: 'Cinzel', serif;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  font-size: 12px;
  text-transform: uppercase;
  margin: 0;
}

.intro {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  margin: 20px auto 32px;
  max-width: 560px;
}

/* ===== HOME / NAV LINKS ===== */
.home-link {
  display: inline-block;
  margin-bottom: 16px;
  font-family: 'Cinzel', serif;
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.home-link:hover { border-color: var(--gold); color: var(--gold); }

/* ===== FORM ELEMENTS ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 18px;
  margin-bottom: 32px;
}

.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 4px; }

.field label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding-left: 4px;
}

.field input,
.field textarea,
.field select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(185, 168, 154, 0.45);
}

/* ===== RADIO / CHOICE GROUPS ===== */
.choice-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.choice-group label {
  flex: 1;
  min-width: 70px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.15s;
}
.choice-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-group input[type="radio"]:checked + label {
  background: rgba(212, 176, 74, 0.18);
  border-color: var(--gold);
  color: var(--gold-soft);
}

/* ===== BUTTONS ===== */
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

button, .btn {
  font-family: 'Cinzel', serif;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--bg-deep);
  border: none;
  padding: 12px 26px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(212, 176, 74, 0.25);
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(212, 176, 74, 0.4);
}
button:active, .btn:active { transform: translateY(0); }

button.secondary, .btn.secondary {
  background: transparent;
  color: var(--gold-soft);
  border: 1px solid var(--border);
  box-shadow: none;
}
button.secondary:hover, .btn.secondary:hover {
  border-color: var(--gold);
  background: rgba(212, 176, 74, 0.08);
}

/* ===== RESULT CARD ===== */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
}

.result-card::before, .result-card::after {
  content: '✦';
  position: absolute;
  color: var(--gold);
  font-size: 14px;
}
.result-card::before { top: 12px; left: 16px; }
.result-card::after { bottom: 12px; right: 16px; }

.result-card h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-soft);
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.15em;
  margin: 0 0 24px;
  text-transform: uppercase;
}

/* ===== HINT TEXT ===== */
.hint {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  margin: 16px 0;
  font-size: 14px;
}

/* ===== PRINCESS NAME ACCENT ===== */
.princess {
  color: var(--gold-soft);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ===== PRINT OVERRIDES ===== */
@media print {
  html, body { background: white !important; color: black !important; }
  body::before { display: none !important; }
  .container { padding: 0; max-width: 100%; }
  header { border-bottom: 2px solid #9c7c2a; }
  h1, .crown, .result-card h2 { color: #6a4d12 !important; filter: none !important; }
  .subtitle { color: #555 !important; }
  .result-card {
    background: white !important;
    border: 1.5px solid #9c7c2a !important;
    box-shadow: none !important;
  }
  .princess { color: #6a4d12 !important; }
  .result-card p, .result-card div { color: #222 !important; }
  .button-row, .home-link, .hint { display: none !important; }
  /* Show form view when printing blank */
  #form-view { display: block !important; }
}

@media (max-width: 540px) {
  .container { padding: 24px 16px 40px; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .field input, .field textarea { font-size: 16px; padding: 8px 12px; }
  .result-card { padding: 24px 18px; }
}
