:root {
  --bg: #0A0913;
  --accent: #8F7FFF;
  --accent-dim: #6E5FE0;
  --text: #F3EFE8;
  --text-secondary: #9E97B5;
  --text-secondary-2: #B4AECB;
  --card-bg: #141225;
  --card-border: #2A2740;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body {
  font-family: 'Karla', sans-serif;
  overflow-x: hidden;
}

h1, .wordmark, .btn, .field-label, .slot-day {
  font-family: 'Quicksand', sans-serif;
}

h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.subtext {
  font-size: 1.05rem;
  color: var(--text-secondary-2);
  margin: 0 0 32px 0;
  line-height: 1.5;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 64px 24px 48px;
  text-align: center;
  opacity: 0;
  background: var(--bg);
}

.screen[data-active="true"] {
  display: flex;
}

.screen[data-visible="true"] {
  opacity: 1;
  transition: opacity 1s ease;
}

.screen[data-visible="false"] {
  opacity: 0;
  transition: opacity 1s ease;
}

.content-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  margin-top: 100px;
}

.content-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  width: 100%;
  max-width: 560px;
  margin-top: 20px;
}

.topbar {
  position: absolute;
  top: 32px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Wordmark */
.wordmark {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--text-secondary);
  margin: 0 0 60px 0;
}

.wordmark--small {
  margin: 0;
  font-size: 0.9rem;
}

/* Orb */
.orb-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.orb-wrap--calm {
  margin-top: 20px;
}

.orb {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8E4FF 0%, var(--accent) 55%, var(--accent-dim) 100%);
  box-shadow: 0 0 60px 20px rgba(143, 127, 255, 0.45), 0 0 120px 60px rgba(143, 127, 255, 0.18);
  animation: orb-breathe 5s ease-in-out infinite;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px 20px rgba(143, 127, 255, 0.45), 0 0 120px 60px rgba(143, 127, 255, 0.18); }
  50% { transform: scale(1.05); box-shadow: 0 0 75px 26px rgba(143, 127, 255, 0.55), 0 0 140px 70px rgba(143, 127, 255, 0.24); }
}

.ring {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F3EFE8;
  box-shadow: 0 0 12px 4px rgba(243, 239, 232, 0.6);
  top: 50%;
  left: 50%;
  animation: orbit linear infinite;
}

.ring--1 {
  --radius: 95px;
  animation-duration: 18s;
}

.ring--2 {
  --radius: 60px;
  width: 7px;
  height: 7px;
  animation-duration: 13s;
  animation-direction: reverse;
}

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(var(--radius)) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg) translateX(var(--radius)) rotate(-360deg); }
}

/* Thank-you orb: bigger, more dramatic pulse */
.orb-wrap--pulse {
  margin-top: 40px;
  width: 260px;
  height: 260px;
}

.orb--pulse {
  width: 110px;
  height: 110px;
  animation: orb-pulse-big 2.2s ease-in-out infinite;
}

@keyframes orb-pulse-big {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 70px 26px rgba(143, 127, 255, 0.55), 0 0 140px 70px rgba(143, 127, 255, 0.22);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 110px 46px rgba(143, 127, 255, 0.8), 0 0 220px 110px rgba(143, 127, 255, 0.4);
  }
}

/* Buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: 18px 40px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: box-shadow 0.3s ease, transform 0.15s ease, filter 0.3s ease, opacity 0.3s ease;
}

.btn--primary {
  background: var(--accent);
  color: #0A0913;
  box-shadow: 0 0 24px 4px rgba(143, 127, 255, 0.35);
  width: 100%;
  max-width: 360px;
  margin-top: 12px;
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 0 40px 10px rgba(143, 127, 255, 0.6);
  filter: brightness(1.05);
}

.btn--primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn--primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary-2);
  font-family: 'Karla', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.25s ease;
}

.link-btn:hover {
  color: var(--text);
}

.link-btn--center {
  margin-top: 36px;
}

/* Slot card */
.slot-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  margin: 8px 0 32px;
  transition: background 1s ease, box-shadow 1s ease, border-color 1s ease, transform 0.2s ease;
}

.slot-card:hover {
  border-color: var(--accent-dim);
}

.slot-card[data-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 50px 12px rgba(143, 127, 255, 0.45);
}

.slot-label {
  font-family: 'Karla', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: color 1s ease;
}

.slot-day {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  transition: color 1s ease;
}

.slot-time {
  font-family: 'Karla', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary-2);
  transition: color 1s ease;
}

.slot-card[data-selected="true"] .slot-label,
.slot-card[data-selected="true"] .slot-time {
  color: rgba(10, 9, 19, 0.65);
}

.slot-card[data-selected="true"] .slot-day {
  color: #0A0913;
}

/* Form fields */
.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary-2);
  margin: 18px 0 8px;
}

.field-label:first-of-type {
  margin-top: 0;
}

.text-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  color: var(--text);
  font-family: 'Karla', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.text-input::placeholder {
  color: var(--text-secondary);
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 127, 255, 0.25);
}

/* Photo options: two stacked buttons acting as one grouped control */
.photo-options {
  display: flex;
  flex-direction: column;
  margin: 4px 0 6px;
}

.photo-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 20px;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary-2);
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.photo-option svg {
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.photo-options .photo-option:first-child {
  border-radius: 14px 14px 0 0;
}

.photo-options .photo-option:last-child {
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
}

.photo-option:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  background: rgba(143, 127, 255, 0.1);
}

.photo-option[data-selected="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(143, 127, 255, 0.2);
  box-shadow: 0 0 24px 2px rgba(143, 127, 255, 0.25);
  position: relative;
  z-index: 1;
}

.photo-option[data-selected="true"] svg {
  color: var(--accent);
}

.photo-filename {
  font-size: 0.85rem;
  color: var(--text-secondary-2);
  min-height: 1.2em;
  margin: 4px 0 20px;
}

/* Notice box */
.notice-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 8px 0 28px;
}

.notice-icon {
  flex-shrink: 0;
  color: var(--text-secondary-2);
  margin-top: 2px;
}

.notice-box p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary-2);
}

/* Legal box */
.legal-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.legal-box p {
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.legal-box p:last-child {
  margin-bottom: 0;
}

.legal-box::-webkit-scrollbar {
  width: 8px;
}

.legal-box::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 8px;
}

/* Checkboxes */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  cursor: pointer;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.checkbox-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
  margin-top: 1px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.checkbox-row input:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-row input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #0A0913;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.checkbox-row--primary {
  background: rgba(143, 127, 255, 0.08);
  border-color: var(--card-border);
}

.checkbox-row--joke {
  background: var(--bg);
  border: 1px dashed var(--card-border);
}

.checkbox-row--joke .checkbox-text {
  color: var(--text-secondary-2);
}

/* Thank you */
#screen-thanks {
  margin-top: 40px;
}

.reassurance {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: -12px;
  margin-bottom: 8px;
}

.footer-credit {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.error-text {
  color: #FF8F8F;
  font-size: 0.9rem;
  margin: -8px 0 12px;
  min-height: 1.2em;
}

/* Responsive */
@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .screen { padding: 48px 18px 40px; }
  .topbar { top: 20px; left: 18px; right: 18px; }
  .btn--primary { padding: 16px 28px; }
}
