/* =========================================================
   Reset y variables
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
:root {
  --stroke: rgba(255,255,255,0.16);
  --stroke-strong: rgba(255,255,255,0.28);
  --text: #f5f5f7;
  --text-dim: rgba(245,245,247,0.6);
  --radius: 26px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", sans-serif;
  background: #050507; color: var(--text); overflow: hidden; letter-spacing: -0.01em;
}

/* =========================================================
   Fondo
   ========================================================= */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(1200px 800px at 20% 10%, #101024 0%, #050507 55%); }
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .55; }
.orb1 { width: 60vw; height: 60vw; left: -15vw; top: -20vw;
  background: radial-gradient(circle, #5b3bff 0%, transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
.orb2 { width: 55vw; height: 55vw; right: -15vw; top: 5vh;
  background: radial-gradient(circle, #ff3b8b 0%, transparent 65%); opacity:.4; animation: drift 26s ease-in-out infinite alternate-reverse; }
.orb3 { width: 70vw; height: 70vw; left: 10vw; bottom: -40vw;
  background: radial-gradient(circle, #00d4ff 0%, transparent 65%); opacity:.28; animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(6vw,4vh) scale(1.08); } }

/* =========================================================
   Navegación superior
   ========================================================= */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 16px 20px; pointer-events: none;
}
.nav-tab {
  pointer-events: auto; cursor: pointer;
  padding: 10px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid transparent;
  color: var(--text-dim); transition: .3s var(--ease);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-family: inherit;
}
.nav-tab:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.nav-tab.active {
  background: rgba(255,255,255,0.14); color: #fff; border-color: var(--stroke-strong);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 8px 20px rgba(0,0,0,0.3);
}

/* =========================================================
   Pantallas
   ========================================================= */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px 32px;
  opacity: 0; visibility: hidden; transform: scale(1.02);
  transition: opacity .55s var(--ease), transform .55s var(--ease), visibility .55s;
  overflow-y: auto;
}
.screen.active { opacity: 1; visibility: visible; transform: scale(1); }

/* =========================================================
   Tipografía
   ========================================================= */
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 14px; }
h1 { font-size: clamp(28px, 5.5vw, 44px); font-weight: 700; letter-spacing: -0.03em; text-align: center; line-height: 1.05; }
h1 .grad { background: linear-gradient(135deg,#fff 20%, #a78bfa 60%, #67e8f9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 12px auto 0; color: var(--text-dim); font-size: clamp(14px, 2vw, 17px); text-align: center; max-width: 480px; }

/* =========================================================
   Burbujas (Vender)
   ========================================================= */
.bubble-container {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.bubble {
  width: clamp(130px, 28vmin, 190px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,0.22), rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.02));
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--stroke-strong);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), inset 0 -18px 40px rgba(0,0,0,0.25), 0 24px 60px rgba(0,0,0,0.5);
  animation: float 7s ease-in-out infinite;
  padding: 8px;
  transition: box-shadow .45s var(--ease);
}

.bubble:hover {
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), inset 0 -18px 40px rgba(0,0,0,0.25), 0 30px 80px rgba(0,0,0,0.6);
}

.bubble-logo {
  width: 60%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* =========================================================
   Tarjeta glass
   ========================================================= */
.card {
  width: min(760px, 100%);
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.28), 0 30px 80px rgba(0,0,0,0.45);
  padding: clamp(20px, 4vw, 34px); animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* =========================================================
   Dropzone
   ========================================================= */
.drop { width: 100%; min-height: 260px; border-radius: 20px; border: 1.5px dashed rgba(255,255,255,0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; transition: .3s; background: rgba(255,255,255,0.03); text-align: center; padding: 24px; overflow: hidden; }
.drop:hover, .drop.over { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }
.drop .icon { font-size: 34px; opacity: .85; }
.drop .hint { color: var(--text-dim); font-size: 14px; }
.drop img { max-width: 100%; max-height: 320px; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }

/* =========================================================
   Botones
   ========================================================= */
.btn { border: none; cursor: pointer; font-family: inherit; border-radius: 999px;
  padding: 14px 26px; font-size: 15px; font-weight: 600; transition: .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-primary { background: #f5f5f7; color: #000; box-shadow: 0 10px 30px rgba(255,255,255,0.18); }
.btn-primary:hover { background: #fff; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--stroke); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* =========================================================
   Revisión
   ========================================================= */
.review-grid { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }
@media (max-width: 640px) { .review-grid { grid-template-columns: 1fr; } }
.thumb { width: 100%; border-radius: 16px; object-fit: cover;
  box-shadow: 0 16px 50px rgba(0,0,0,.55); border: 1px solid var(--stroke); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field textarea, .search-input {
  background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); color: var(--text);
  font-family: inherit; font-size: 15px; border-radius: 12px; padding: 12px 14px;
  width: 100%; outline: none; transition: .25s;
}
.field input:focus, .field textarea:focus, .search-input:focus {
  border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.09); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.char-count { font-size: 11px; color: var(--text-dim); text-align: right; margin-top: 4px; }
.char-count.limit { color: #ff6b6b; }

/* =========================================================
   Badges y loading
   ========================================================= */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.badge.real { background: rgba(90,220,140,0.12); color: #6ee7a5; border: 1px solid rgba(90,220,140,0.3); }
.loading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px 0; }
.spinner { width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Toast
   ========================================================= */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px);
  background: rgba(20,20,28,0.9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--stroke); border-radius: 999px; padding: 12px 22px; font-size: 14px;
  opacity: 0; transition: .35s var(--ease); pointer-events: none; z-index: 30; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Buscador
   ========================================================= */
.search-bar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-bar .search-input { flex: 1; font-size: 17px; padding: 16px 20px; border-radius: 16px; }
.search-bar .btn-primary { padding: 16px 28px; border-radius: 16px; white-space: nowrap; }

/* =========================================================
   Selector de plataformas
   ========================================================= */
.platform-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.platform-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.platform-check { cursor: pointer; display: inline-flex; }
.platform-check input { display: none; }
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  font-size: 14px;
  font-weight: 600;
  transition: .25s var(--ease);
  user-select: none;
  opacity: 0.45;
  color: var(--text-dim);
}
.platform-pill:hover { opacity: 0.85; }
.platform-check input:checked + .platform-pill {
  opacity: 1;
  background: rgba(255,255,255,0.1);
  border-color: var(--stroke-strong);
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2);
}
.platform-check input:checked + .platform-pill:hover {
  opacity: 1;
  background: rgba(255,255,255,0.14);
}
.platform-check { cursor: pointer; display: inline-flex; }
.platform-check input { display: none; }

.platform-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-width: 110px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.92);
  transition: .25s var(--ease);
  opacity: 0.4;
  filter: saturate(0.5);
  user-select: none;
}
.platform-pill:hover { opacity: 0.75; }

.platform-check input:checked + .platform-pill {
  opacity: 1;
  filter: saturate(1);
  box-shadow: 0 4px 24px rgba(255,255,255,0.15), 0 0 0 1px rgba(255,255,255,0.35);
}

.platform-pill img {
  height: 20px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  display: block;
}

/* =========================================================
   Resultados
   ========================================================= */
.results-list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh;
  overflow-y: auto; padding-right: 6px; }
.result-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--stroke); border-radius: 16px;
  transition: .25s; cursor: pointer; }
.result-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.result-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; }
.result-info { flex: 1; min-width: 0; }
.result-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-platform { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.result-price { font-weight: 700; font-size: 18px; flex-shrink: 0; }
.empty-state { text-align: center; padding: 30px 20px; color: var(--text-dim);
  font-size: 15px; line-height: 1.6; }

/* =========================================================
   Banners
   ========================================================= */
.warn-banner { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,180,0,0.1); border: 1px solid rgba(255,180,0,0.3);
  color: #ffc94d; font-size: 13px; line-height: 1.5; }

.info-banner { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(100,180,255,0.08); border: 1px solid rgba(100,180,255,0.25);
  color: #8cc8ff; font-size: 13px; line-height: 1.5; }