/* ─── BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink: #ec4899;
  --pink-dim: rgba(236, 72, 153, 0.18);
  --indigo-dim: rgba(99, 102, 241, 0.15);
  --glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.1);
  --muted: #a3a3a3;
  --radius-card: 24px;
  --radius-input: 14px;
  --radius-pill: 999px;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #111 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ─── LAYOUT ────────────────────────────────────────────────────────── */
#editorMode, #viewMode, #acceptedMode {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hidden { display: none !important; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-2 > * + * { margin-top: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

/* ─── CARTÃO ─────────────────────────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 440px;
  padding: 28px 24px;
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(236, 72, 153, 0.06);
}

/* ─── TÍTULO ─────────────────────────────────────────────────────────── */
.title {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 22px;
  font-style: italic;
  text-align: center;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ─── LABEL ──────────────────────────────────────────────────────────── */
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ─── INPUT ──────────────────────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 11px 14px;
  border-radius: var(--radius-input);
  color: white;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.input:focus {
  border-color: rgba(236, 72, 153, 0.5);
  background: rgba(255, 255, 255, 0.09);
}

.input::placeholder { color: #555; }

/* Fix: cor do texto nos selects nativos */
.input option {
  background: #1a1a1a;
  color: white;
}

/* ─── CHIPS ──────────────────────────────────────────────────────────── */
.chip {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.18s, transform 0.18s, border-color 0.18s;
  user-select: none;
}

.chip:hover {
  background: rgba(255,255,255,0.1);
}

.chip.selected {
  background: var(--pink);
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.35);
}

/* ─── LINK FIELDS ───────────────────────────────────────────────────── */
.hint {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}

.selected-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-chip-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #fbcfe8;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 12px;
}

.city-chip-remove {
  border: none;
  background: transparent;
  color: #fbcfe8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

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

.link-field-label {
  font-size: 12px;
  color: var(--muted);
  padding-left: 2px;
}

.link-site-preview {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-site-preview.invalid {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
}

.link-site-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-site-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.link-site-domain {
  font-size: 12px;
  color: #e5e7eb;
  font-weight: 500;
}

.link-site-url {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-site-url:hover {
  color: #f9a8d4;
}

.link-site-invalid {
  font-size: 12px;
  color: #fecaca;
}

.bundle-item {
  font-size: 12px;
  color: #cbd5e1;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
}

.bundle-option-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.bundle-option-card.selected {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.bundle-option-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #f3f4f6;
  margin-bottom: 8px;
  cursor: pointer;
}

.bundle-option-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #ec4899;
}

.bundle-option-title {
  font-weight: 500;
}

/* ─── PREVIEW CONVITE ───────────────────────────────────────────────── */
.invite {
  padding: 20px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink-dim), var(--indigo-dim));
  border: 1px solid rgba(255,255,255,0.1);
  white-space: pre-line;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

/* ─── LINK PILLS (preview e view) ──────────────────────────────────── */
.link-list, .link-list-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.link-list-title {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  margin-bottom: 4px;
  text-align: center;
}

.link-pill {
  display: inline-block;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #f9a8d4;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
}

.link-pill:hover {
  background: rgba(236, 72, 153, 0.3);
  transform: translateY(-1px);
}

/* ─── BOTÕES ─────────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--pink);
  color: white;
  padding: 14px;
  border-radius: var(--radius-input);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #db2777;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.35);
}

.btn-secondary {
  width: 100%;
  background: rgba(255,255,255,0.07);
  color: white;
  padding: 12px;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.18s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
}

/* ─── FEEDBACK ───────────────────────────────────────────────────────── */
.feedback {
  text-align: center;
  font-size: 13px;
  color: #f9a8d4;
  padding: 10px;
  border-radius: 10px;
  background: rgba(236, 72, 153, 0.1);
  animation: fade 0.3s ease;
}

/* ─── ANIMAÇÕES ──────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fade 0.45s ease forwards;
}

@keyframes fade {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }