:root {
  --bg0: #070b14;
  --bg1: #0f172a;
  --panel: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.1);
  --text: #f4f7ff;
  --muted: #9aa8c2;
  --accent: #186aff;
  --accent2: #3dd6c6;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --font: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(24,106,255,.35), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(61,214,198,.18), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 45%, #0a1020);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px;
  backdrop-filter: blur(16px);
  background: rgba(7,11,20,.72);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, var(--accent), #4f8cff);
  box-shadow: 0 8px 24px rgba(24,106,255,.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; letter-spacing: .02em; }
.brand-text small { color: var(--muted); font-size: 12px; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 12px; }
.langs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs a {
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted);
}
.langs a.on { background: var(--accent); color: #fff; }
.back-venta {
  font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line);
}

.wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; }
.hero h1 {
  margin: 8px 0 8px; font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: -.02em;
}
.hero p { margin: 0 0 18px; color: var(--muted); max-width: 42ch; line-height: 1.45; }
.search {
  display: flex; gap: 8px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px; max-width: 520px;
}
.search input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; padding: 10px 14px;
}
.search button {
  border: 0; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--accent), #3b82f6); cursor: pointer;
}
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line);
  text-transform: capitalize;
}
.chip.is-on { color: #fff; background: rgba(24,106,255,.35); border-color: rgba(24,106,255,.55); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.card {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(24,106,255,.45); }
.card-cover { position: relative; aspect-ratio: 1; background: #111827; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 42px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
}
.play-badge {
  position: absolute; left: 10px; bottom: 10px;
  padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15);
}
.card-body { padding: 12px 12px 14px; }
.card-body h2 { margin: 0 0 6px; font-size: 14px; line-height: 1.25; font-weight: 800; }
.tag { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: capitalize; }
.empty { color: var(--muted); grid-column: 1 / -1; }

.foot { padding: 24px 18px 40px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* App / WebView mode — feels native, no external chrome */
body.is-app .back-venta,
body.is-app .foot { display: none !important; }
body.is-app .top { padding-top: max(14px, env(safe-area-inset-top)); }

/* Play page */
.play-page { background: #000; min-height: 100dvh; display: flex; flex-direction: column; }
.play-bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(7,11,20,.92); border-bottom: 1px solid var(--line);
}
.play-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.back, .fs-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.stage { flex: 1; min-height: 0; background: #000; position: relative; }
.stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000;
}
body.is-app.play-page .play-bar { background: #0b1220; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand-text small { display: none; }
}
