/* ===== ZZZ Codex — tema oscuro "HUD acid" (register: product) ===== */
:root {
  /* Neutrales tintados hacia el hue acid del juego (~118), en OKLCH */
  --bg:       oklch(0.15 0.010 118);
  --bg-2:     oklch(0.18 0.012 118);
  --surface:  oklch(0.21 0.013 118);
  --surface-2:oklch(0.25 0.014 118);
  --line:     oklch(0.30 0.015 118);
  --line-soft:oklch(0.26 0.012 118);

  --txt:      oklch(0.95 0.006 118);
  --txt-dim:  oklch(0.70 0.010 118);
  --txt-faint:oklch(0.56 0.010 118);

  /* Identidad: acid yellow-green de ZZZ */
  --accent:      oklch(0.90 0.19 118);
  --accent-deep: oklch(0.72 0.16 118);
  --accent-glow: oklch(0.90 0.19 118 / 0.35);

  /* Roles de grado */
  --g-s: oklch(0.85 0.16 92);   /* dorado  */
  --g-a: oklch(0.72 0.17 305);  /* violeta */
  --g-b: oklch(0.75 0.13 235);  /* cian    */
  --g-c: oklch(0.66 0.02 118);  /* gris    */
  --g-d: oklch(0.45 0.015 118); /* apagado */

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -12px oklch(0 0 0 / 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 520px at 85% -12%, var(--accent-glow), transparent 55%),
    radial-gradient(760px 460px at -5% 0%, oklch(0.72 0.17 305 / 0.10), transparent 55%),
    var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent); color: oklch(0.15 0.01 118); }

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, oklch(0.15 0.01 118 / 0.96), oklch(0.15 0.01 118 / 0.72));
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -1px;
  color: oklch(0.16 0.02 118); background: var(--accent);
  padding: 5px 11px 4px; border-radius: 7px; line-height: 1;
  transform: skewX(-8deg); box-shadow: 0 0 26px var(--accent-glow);
}
.brand-text h1 {
  margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: 7px; padding-left: 2px;
}
.brand-text p { margin: 3px 0 0; font-size: 11.5px; color: var(--txt-faint); letter-spacing: .4px; }

.sync {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--txt-dim);
  background: var(--surface); border: 1px solid var(--line-soft);
  padding: 7px 13px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.78 0.15 70); }
.sync.ok .dot { background: oklch(0.80 0.17 145); box-shadow: 0 0 10px oklch(0.80 0.17 145); animation: pulse 2.6s var(--ease) infinite; }
.sync.err .dot { background: oklch(0.65 0.20 25); box-shadow: 0 0 10px oklch(0.65 0.20 25); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ===== Controls ===== */
.controls { padding: 26px 26px 8px; display: flex; flex-direction: column; gap: 16px; max-width: 1400px; margin: 0 auto; }

.uid-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(100deg, oklch(0.72 0.17 305 / 0.10), transparent 60%), var(--surface);
  border: 1px solid var(--line-soft);
}
.uid-bar::before {
  content: "◢ CONSULTAR CUENTA"; font-family: var(--font-display); font-size: 10.5px;
  letter-spacing: 2px; color: var(--txt-faint); margin-right: 4px; align-self: center;
}
#uid {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--txt);
  padding: 11px 15px; border-radius: var(--radius-sm); font-size: 14px; outline: none;
  width: 230px; max-width: 100%; font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s;
}
#uid:focus { border-color: var(--g-a); box-shadow: 0 0 0 3px oklch(0.72 0.17 305 / 0.18); }
.uid-bar button {
  padding: 11px 17px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  font-family: var(--font-display); letter-spacing: .3px; cursor: pointer;
  background: var(--g-a); color: oklch(0.98 0.01 305); border: 1px solid transparent;
  transition: filter .15s, transform .06s;
}
.uid-bar button:hover { filter: brightness(1.12); }
.uid-bar button:active { transform: translateY(1px); }
.uid-bar button.ghost { background: transparent; color: var(--txt-dim); border-color: var(--line); font-weight: 500; }
.uid-bar button.ghost:hover { color: var(--txt); border-color: var(--line); filter: none; background: var(--surface-2); }
.uid-msg { font-size: 12.5px; color: var(--txt-dim); }
.uid-msg.err { color: oklch(0.72 0.16 25); }
.uid-msg.ok { color: oklch(0.80 0.15 145); }

#search {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--txt); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#search::placeholder { color: var(--txt-faint); }
#search:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-glow); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-group { display: inline-flex; gap: 8px; align-items: center; }
.chip-label { font-family: var(--font-display); font-size: 10.5px; color: var(--txt-faint); letter-spacing: 1.5px; margin-right: 1px; }
.chip {
  font-size: 12.5px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft); color: var(--txt-dim);
  transition: color .12s, background .12s, border-color .12s; user-select: none; white-space: nowrap;
}
.chip:hover { color: var(--txt); border-color: var(--line); }
.chip.active { color: oklch(0.16 0.02 118); background: var(--accent); border-color: var(--accent); font-weight: 600; }

/* ===== Grid ===== */
main { padding: 10px 26px 60px; max-width: 1400px; margin: 0 auto; }
.status { color: var(--txt-dim); padding: 48px 0; text-align: center; font-size: 15px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklch, var(--ac, var(--accent)) 60%, var(--line)); box-shadow: var(--shadow); }
.card:hover::after { box-shadow: inset 0 -60px 40px -40px color-mix(in oklch, var(--ac, var(--accent)) 45%, transparent); }
.card .thumb {
  aspect-ratio: 1 / 1; width: 100%; display: block; object-fit: cover;
  background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--bg));
  border-bottom: 1px solid var(--line-soft); transition: transform .3s var(--ease);
}
.card:hover .thumb { transform: scale(1.04); }
.card .meta { padding: 11px 13px 13px; }
.card .name { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin: 0 0 7px; line-height: 1.15; letter-spacing: .2px; }
.card .pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { font-size: 10.5px; padding: 3px 8px; border-radius: 6px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill.role { background: oklch(1 0 0 / 0.05); color: var(--txt-dim); border-color: var(--line-soft); }

.rank {
  position: absolute; top: 9px; left: 9px; z-index: 3; font-family: var(--font-display);
  font-weight: 700; font-size: 12px; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 6px; color: oklch(0.16 0.02 92);
}
.rank.S { background: var(--g-s); box-shadow: 0 0 14px oklch(0.85 0.16 92 / 0.5); }
.rank.A { background: var(--g-a); color: oklch(0.98 0.01 305); }
.has-build {
  position: absolute; top: 9px; right: 9px; z-index: 3; font-family: var(--font-display);
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  background: oklch(0.15 0.01 118 / 0.8); color: var(--accent);
  border: 1px solid var(--accent-deep); padding: 3px 7px; border-radius: 999px;
}

/* Overlays de cuenta */
.owned-badge {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; gap: 6px; padding: 8px 9px 6px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  background: linear-gradient(0deg, oklch(0.1 0.01 118 / 0.92), transparent);
}
.owned-badge .lv { color: var(--txt); }
.owned-badge .mind { color: var(--g-s); }
.owned-weng { font-size: 11px; color: var(--txt-faint); margin: 7px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owned-weng b { color: var(--txt-dim); font-weight: 500; }
.card-grade {
  position: absolute; top: 9px; right: 9px; z-index: 3; font-family: var(--font-display);
  font-weight: 700; font-size: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px;
}

/* ===== Showcase ===== */
.showcase { margin-bottom: 30px; }
.showcase[hidden] { display: none; }
.showcase h2 {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; color: var(--g-a);
  margin: 0 0 16px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.showcase h2::before { content: "▮"; color: var(--g-a); }
.showcase h2 .uid-tag { color: var(--txt-faint); font-weight: 400; letter-spacing: .3px; font-family: var(--font-body); font-size: 12.5px; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: oklch(0.08 0.01 118 / 0.74); backdrop-filter: blur(5px); }
.modal-card {
  position: relative; z-index: 1; width: min(740px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: rise .28s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card::-webkit-scrollbar { width: 10px; }
.modal-card::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid var(--bg-2); }

.m-head {
  position: relative; display: flex; gap: 18px; padding: 24px; align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, var(--ac-soft, var(--accent-glow)), transparent 62%);
}
.m-head img {
  width: 96px; height: 96px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--line); background: var(--bg);
  box-shadow: 0 0 30px -6px color-mix(in oklch, var(--ac, var(--accent)) 40%, transparent);
}
.m-head .h-txt { flex: 1; min-width: 0; }
.m-head h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: .3px; }
.m-head .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.m-close {
  position: absolute; top: 16px; right: 16px; z-index: 3; width: 34px; height: 34px; border-radius: 9px;
  cursor: pointer; background: oklch(0.2 0.01 118 / 0.7); border: 1px solid var(--line); color: var(--txt);
  font-size: 18px; line-height: 1; transition: border-color .15s, background .15s;
}
.m-close:hover { border-color: var(--accent); background: var(--surface-2); }
.m-body { padding: 24px; }

/* tldr (sin borde lateral: tratamiento con comilla + fondo) */
.m-tldr {
  position: relative; color: var(--txt); font-size: 15px; line-height: 1.55; margin: 0 0 22px;
  padding: 16px 18px 16px 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px;
}

.block { margin-bottom: 24px; }
.block:last-child { margin-bottom: 0; }
.block h3 {
  font-family: var(--font-display); font-size: 11.5px; letter-spacing: 2px; color: var(--txt-faint);
  margin: 0 0 12px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.block h3::before { content: "◢"; color: var(--accent-deep); font-size: 9px; }

.rowlist { display: flex; flex-direction: column; gap: 8px; }
.linei { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.linei .lead { font-family: var(--font-display); color: var(--ac, var(--accent)); font-weight: 700; margin-right: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 11px; font-size: 13px; }
.tag b { color: var(--ac, var(--accent)); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.stat-cell { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 13px; }
.stat-cell .k { font-size: 10.5px; color: var(--txt-faint); letter-spacing: .5px; text-transform: uppercase; }
.stat-cell .v { font-size: 14px; font-weight: 600; margin-top: 4px; }

/* ===== Evaluación de discos (HUD) ===== */
.eval {
  display: flex; gap: 16px; align-items: center; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 13px; padding: 16px 18px;
}
.eval-eff { font-size: 14.5px; line-height: 1.4; }
.eval-eff b { color: var(--txt); }
.eval-set { font-size: 12.5px; color: var(--txt-dim); margin-top: 5px; font-variant-numeric: tabular-nums; }
.eval-note { font-size: 11.5px; color: var(--txt-faint); margin: 12px 0 0; line-height: 1.55; }

.grade {
  font-family: var(--font-display); font-weight: 700; display: grid; place-items: center;
  border-radius: 12px; width: 52px; height: 52px; font-size: 26px; flex: none; line-height: 1;
}
.grade.sm { width: 27px; height: 27px; font-size: 13px; border-radius: 7px; }
.g-S { background: var(--g-s); color: oklch(0.2 0.03 92); box-shadow: 0 0 20px oklch(0.85 0.16 92 / 0.45); }
.g-A { background: var(--g-a); color: oklch(0.98 0.01 305); }
.g-B { background: var(--g-b); color: oklch(0.16 0.03 235); }
.g-C { background: var(--g-c); color: oklch(0.96 0.005 118); }
.g-D { background: var(--g-d); color: var(--txt-dim); }

.discs { display: grid; gap: 11px; }
.disc { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px 15px; transition: border-color .15s; }
.disc:hover { border-color: var(--line); }
.disc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.disc-slot {
  font-family: var(--font-display); font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--txt-dim);
}
.disc-set { flex: 1; font-weight: 600; font-size: 14px; }
.disc-set em { color: var(--txt-faint); font-style: normal; font-weight: 400; margin-left: 6px; font-variant-numeric: tabular-nums; }
.disc-main { font-size: 12.5px; color: var(--txt-dim); margin-bottom: 10px; }
.disc-main b { color: var(--txt); font-weight: 600; }
.disc-subs { display: flex; flex-wrap: wrap; gap: 7px; }
.disc-subs .sub {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 8px; padding: 5px 9px;
}
.disc-subs .sub.hot { border-color: var(--accent-deep); background: color-mix(in oklch, var(--accent) 8%, var(--bg)); }
.sub-k { color: var(--txt-dim); }
.sub.hot .sub-k { color: var(--txt); }
.sub-v { font-weight: 600; color: var(--txt); font-variant-numeric: tabular-nums; }
.pips { letter-spacing: 1px; font-size: 7px; color: var(--txt-faint); }
.sub.hot .pips { color: var(--accent); }

/* ===== No build ===== */
.nobuild { text-align: center; padding: 34px 20px; color: var(--txt-dim); }
.nobuild .big { font-size: 42px; margin-bottom: 12px; }
.nobuild code { background: var(--surface); padding: 2px 7px; border-radius: 6px; color: var(--accent); font-size: 13px; }

/* ===== Footer ===== */
.foot { padding: 26px; border-top: 1px solid var(--line-soft); color: var(--txt-faint); font-size: 12.5px; text-align: center; }
.foot p { margin: 0 auto; max-width: 700px; line-height: 1.65; }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 11px; }
  .m-head { flex-direction: column; text-align: center; }
  .brand-text p { display: none; }
  .eval { flex-direction: column; text-align: center; }
}
