:root {
  --bg: #0b1020;
  --bg-soft: rgba(255, 255, 255, 0.08);
  --card: rgba(14, 20, 38, 0.82);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: #b5bfd9;
  --primary: linear-gradient(135deg, #ff6aa2 0%, #8b5cf6 55%, #4f8cff 100%);
  --primary-solid: #8b5cf6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.25), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 106, 162, 0.22), transparent 25%),
    linear-gradient(180deg, #070b16 0%, #0b1020 48%, #11182d 100%);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}
.bg-glow-1 { top: -8rem; left: -8rem; background: #ff6aa2; }
.bg-glow-2 { right: -6rem; top: 18rem; background: #4f8cff; }

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
}

.hero h1 {
  margin: 16px 0 12px;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
}

.search-card {
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(7, 11, 22, 0.56);
  border: 1px solid rgba(255,255,255,0.1);
}

.search-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 15px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.search-icon {
  font-size: 24px;
  color: #dde5ff;
}

.entrada {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 18px 0;
  font-size: 18px;
}

.entrada::placeholder { color: #98a4c7; }

.quick-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.tag-chip:hover { transform: translateY(-1px); background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.22); }

.share-search {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.copy-search {
  min-width: 180px;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 18px;
}
.results-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
}
.results-head p {
  margin: 0;
  color: var(--muted);
}

.results-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
}

.empty-state, .error-box {
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.empty-icon {
  font-size: 30px;
  margin-bottom: 8px;
}
.hidden { display: none; }

.invitaciones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.invitacion-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 9 / 9;
  background: rgba(255,255,255,0.04);
}
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  background: rgba(10, 13, 24, 0.68);
  border: 1px solid rgba(255,255,255,0.16);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
}
.card-top h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.35;
}
.card-badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  color: #ffe1ef;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.btn {
  appearance: none;
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary {
  color: white;
  background: var(--primary);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary.copiado {
  background: linear-gradient(135deg, #16a34a, #0f766e);
  color: white;
  border-color: transparent;
  cursor: default;
}

@media (max-width: 1100px) {
  .invitaciones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { width: min(100% - 20px, 1280px); padding-top: 18px; }
  .hero { padding: 22px 18px; border-radius: 24px; }
  .results-head { flex-direction: column; align-items: flex-start; }
  .share-search { justify-content: stretch; }
  .copy-search { width: 100%; }
  .invitaciones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card-actions { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 1.9rem; }
  .entrada { font-size: 16px; }
  .invitaciones { grid-template-columns: 1fr; }
}
