:root {
  --bg: #0b0813;
  --panel: #150f22;
  --card: #191125;
  --line: #2e2447;
  --tinta: #ece7f7;
  --dim: #9585b4;
  --acento: #7b3fe4;
  --acento-hi: #a96bff;
  --acento-2: #8de93c;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--tinta);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 8, 19, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-cat {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 0 16px rgba(123, 63, 228, 0.35), inset 0 0 10px rgba(141, 233, 60, 0.12);
}
.brand h1 { font-size: 19px; font-weight: 900; letter-spacing: -0.01em; text-transform: lowercase; }
.brand-sub { color: var(--dim); font-weight: 700; }
.tagline { font-size: 12.5px; color: var(--dim); }

.search-box { position: relative; flex: 0 1 420px; }
.search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2;
}
.search-box input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; color: var(--tinta); font: 500 14px var(--font);
  outline: none; transition: border-color 0.15s;
}
.search-box input:focus { border-color: var(--acento); }
.search-box input::placeholder { color: var(--dim); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 6px; padding: 0 24px 14px; overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  background: transparent; border: 1px solid var(--line);
  color: var(--dim); font: 600 13px var(--font);
  padding: 7px 14px; border-radius: 99px; cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--tinta); border-color: var(--dim); }
.tab.active { background: var(--acento); border-color: var(--acento); color: #fff; }
.tab-n { opacity: 0.65; font-weight: 500; margin-left: 3px; font-size: 12px; }

/* ---------- Hero strip ---------- */
.hero-strip { padding-top: 24px; }
.hero-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: linear-gradient(120deg, rgba(123, 63, 228, 0.1), rgba(141, 233, 60, 0.05)), var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 32px;
}
.hero-card .pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--acento); border: 1px solid rgba(123, 63, 228, 0.4);
  padding: 3px 10px; border-radius: 99px; margin-bottom: 10px;
}
.hero-card h2 { font-size: clamp(18px, 2.6vw, 26px); font-weight: 900; letter-spacing: -0.01em; }
.hero-card p { color: var(--dim); font-size: 14px; margin-top: 6px; max-width: 640px; }

/* ---------- Toolbar / grid ---------- */
.toolbar { display: flex; justify-content: flex-end; padding: 18px 0 4px; }
.count { font-size: 13px; color: var(--dim); }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding: 14px 0 64px;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(123, 63, 228, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  outline: none;
}
.card-media {
  position: relative; aspect-ratio: 16/10; background: var(--panel);
  overflow: hidden;
}
.card-media img, .card-media video {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  display: block;
}
.card-media .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
}
.card-media .ph span { font-weight: 700; font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.live-dot {
  position: absolute; top: 10px; right: 10px;
  font: 700 10px var(--font); letter-spacing: 0.08em;
  color: #06120b; background: var(--acento-2);
  padding: 3px 8px; border-radius: 4px;
  box-shadow: 0 0 12px rgba(141, 233, 60, 0.5);
}
.card-body { padding: 14px 16px 16px; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--acento); background: rgba(123, 63, 228, 0.1);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.card-body h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.mini-tag {
  font-size: 11px; font-weight: 500; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line);
  padding: 1px 8px; border-radius: 99px;
}

.empty { text-align: center; color: var(--dim); padding: 80px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px 48px; font-size: 13px; color: var(--dim);
}
.site-footer a { color: var(--acento); text-decoration: none; }
.site-footer code {
  font-family: var(--mono); font-size: 12px;
  background: var(--panel); padding: 1px 6px; border-radius: 4px;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; z-index: 1;
  width: min(880px, 100%); max-height: 90vh;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden auto;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(11, 8, 19, 0.7); border: 1px solid var(--line);
  color: var(--tinta); font-size: 14px; cursor: pointer;
}
.modal-media { background: var(--bg); max-height: 380px; overflow: hidden; }
.modal-media:empty { display: none; }
.modal-media img, .modal-media video { width: 100%; height: auto; max-height: 380px; object-fit: cover; object-position: top; display: block; }
.modal-media .ph { height: 200px; display: flex; align-items: center; justify-content: center; }
.modal-media .ph span { font-weight: 800; font-size: 18px; color: rgba(255, 255, 255, 0.9); }
.modal-body { padding: 22px 26px 26px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.modal-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-top: 6px; }
.modal-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 13.5px var(--font); padding: 9px 16px;
  border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: all 0.15s;
}
.btn.primary { background: var(--acento); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--tinta); }
.btn.ghost:hover { border-color: var(--acento); color: var(--acento); }
.prompt {
  margin-top: 18px; padding: 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: #c8d0e0; white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow: auto;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 20px 10px; }
  .search-box { flex: 1 1 auto; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 22px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .modal { padding: 10px; }
  .modal-body { padding: 16px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}
