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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff0f5 0%, #fdf6f0 50%, #f0f4ff 100%);
  font-family: 'Georgia', serif;
  padding: 1rem;
  overflow-x: hidden;
}

.card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 60px rgba(192,54,90,0.13), 0 2px 8px rgba(0,0,0,0.07);
  animation: fadeIn 0.45s cubic-bezier(.22,.68,0,1.2);
  border: 1px solid rgba(192,54,90,0.08);
}

.hidden { display: none; }

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

/* ── Eyebrow ── */
.eyebrow {
  font-family: sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #c0365a;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* ── Headings ── */
h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.subtitle {
  font-family: sans-serif;
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Meme ── */
.meme-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  max-width: 300px;
  width: 100%;
  /* keeps the wrapper's height stable (so the two captions can't collapse
     onto each other) even if the image fails to load; matches meme.png's
     actual 180x152 pixel size */
  aspect-ratio: 180 / 152;
  box-shadow: 0 8px 32px rgba(192,54,90,0.18);
  animation: memeBounce 0.7s cubic-bezier(.22,.68,0,1.2) 0.2s both;
}

@keyframes memeBounce {
  from { opacity: 0; transform: scale(0.8) rotate(-3deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.meme-wrapper:hover .meme {
  transform: scale(1.04);
}

.meme {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.3s ease;
}

.meme-caption {
  position: absolute;
  left: 0; right: 0;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-family: sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
}
.meme-caption.top { top: 0; border-radius: 18px 18px 0 0; }
.meme-caption.bottom { bottom: 0; border-radius: 0 0 18px 18px; }

/* ── Invite buttons ── */
.invite-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Primary button ── */
.btn-primary {
  background: linear-gradient(135deg, #c0365a, #e05080);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-family: sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(192,54,90,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #a8294d, #c0365a);
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(192,54,90,0.45);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary.full { width: 100%; justify-content: center; margin-top: 0.5rem; }

.heart { font-size: 1rem; }

/* ── Nein button ── */
.btn-nein {
  background: transparent;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-family: sans-serif;
  color: #555;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}
.btn-nein:hover { border-color: #aaa; }

/* ── Progress bar ── */
.progress-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: background 0.3s;
}
.progress-dot.active { background: #c0365a; }
.progress-dot.done { background: #e07090; }

/* ── Step icon ── */
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  animation: iconPop 0.4s cubic-bezier(.22,.68,0,1.3) both;
}
@keyframes iconPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ── Form ── */
.form-group {
  text-align: left;
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-family: sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: sans-serif;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: auto;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #c0365a;
  box-shadow: 0 0 0 3px rgba(192,54,90,0.12);
}

.time-wrapper {
  position: relative;
}
.time-wrapper input {
  padding-right: 3rem;
}
.time-suffix {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: sans-serif;
  color: #888;
  font-size: 0.95rem;
  pointer-events: none;
}

/* ── Food grid ── */
.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.food-btn {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 16px;
  padding: 0.9rem 0.5rem;
  font-size: 0.85rem;
  font-family: sans-serif;
  color: #333;
  cursor: pointer;
  line-height: 1.6;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
  min-height: 72px;
}
.food-btn:hover { border-color: #c0365a; transform: scale(1.04); }
.food-btn.selected {
  background: linear-gradient(135deg, #c0365a, #e05080);
  border-color: #c0365a;
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(192,54,90,0.3);
}

/* ── Inline custom food ── */
.food-btn-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: text;
  padding: 0.6rem 0.4rem;
}
.food-btn-inline.selected {
  background: linear-gradient(135deg, #c0365a, #e05080);
  border-color: #c0365a;
}
.food-inline-emoji {
  font-size: 1.2rem;
  line-height: 1;
}
.food-inline-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  /* 16px is the iOS Safari zoom-on-focus threshold; anything smaller
     makes the page auto-zoom in when this field is tapped on mobile. */
  font-size: 1rem;
  font-family: sans-serif;
  text-align: center;
  color: #333;
  cursor: text;
  padding: 0;
}
.food-btn-inline.selected .food-inline-input {
  color: #fff;
}
.food-inline-input::placeholder { color: #aaa; }
.food-btn-inline.selected .food-inline-input::placeholder { color: rgba(255,255,255,0.7); }

/* ── Step 2 buttons ── */
.step2-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-back {
  background: transparent;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-family: sans-serif;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s;
}
.btn-back:hover { border-color: #aaa; }

.step2-buttons .btn-primary {
  flex: 1 1 160px;
  justify-content: center;
  min-width: 0;
}

/* Below ~380px the two buttons no longer fit on one row
   (measured overflow on 320-360px viewports) — stack them instead. */
@media (max-width: 380px) {
  .step2-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .step2-buttons .btn-back,
  .step2-buttons .btn-primary {
    width: 100%;
  }
}

/* ── Confirm screen ── */
.sparkles {
  font-size: 1.4rem;
  color: #c0365a;
  letter-spacing: 1rem;
  margin-bottom: 0.5rem;
  animation: sparkle 1.5s ease-in-out infinite alternate;
}
@keyframes sparkle {
  from { opacity: 0.6; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}

.confirm-title {
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
}

.confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.confirm-item {
  background: linear-gradient(135deg, #fff0f5, #fdf6f0);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(192,54,90,0.1);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pickup-text {
  font-size: 1.05rem;
  font-style: italic;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}

.pickup-sub {
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.5rem;
}

.btn-change {
  background: none;
  border: none;
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #aaa;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-change:hover { color: #c0365a; }

/* ── Custom food input ── */
.custom-food-wrapper {
  margin: -0.4rem 0 1rem;
}
.custom-food-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #c0365a;
  border-radius: 12px;
  font-size: 1rem;
  font-family: sans-serif;
  color: #1a1a1a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(192,54,90,0.1);
}
.custom-food-wrapper input::placeholder { color: #bbb; }


/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: sans-serif;
  font-size: 0.9rem;
  z-index: 10000;
  transition: transform 0.4s cubic-bezier(.22,.68,0,1.2), opacity 0.4s;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Confetti canvas ── */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* ── Discord status badge ── */
.discord-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
}
.discord-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ccc;
}
.discord-status.sending .dot { background: #f59e0b; animation: pulse 0.8s infinite; }
.discord-status.sent    .dot { background: #22c55e; }
.discord-status.error   .dot { background: #ef4444; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
