/* ---------- Página de setup ---------- */
.page-setup { background: var(--bg); }

/* Topo (mesmo fundo da página de campeonatos) */
.st-hero {
  position: relative; overflow: hidden; color: #fff; padding: 130px 0 64px;
  background:
    radial-gradient(700px 420px at 85% 10%, rgba(255, 212, 0, .18), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(43, 107, 255, .45), transparent 60%),
    var(--navy);
}
.st-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.st-hero .wrap { position: relative; }
.st-hero h1 { font-size: clamp(54px, 9vw, 120px); margin-top: 18px; }
.st-hero h1 span { color: var(--yellow); }

/* Periféricos */
.st-gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.st-item { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.st-item small { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.st-item b { font: 800 22px/1.15 var(--font-d); font-stretch: 85%; color: var(--ink); overflow-wrap: anywhere; }
.st-item span { color: var(--muted); font-size: 14px; }
.st-item a { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 700; color: var(--blue); }
.st-item a:hover { text-decoration: underline; }

/* Lista rótulo → valor (PC e vídeo) */
.st-list { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.st-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.st-list > div:last-child { border-bottom: 0; }
.st-list dt { color: var(--muted); font-weight: 600; }
.st-list dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.st-list-2 { grid-template-columns: 1fr 1fr; }
.st-list-2 > div:nth-child(odd) { border-right: 1px solid var(--line); }
.st-list-2 > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.st-list.is-empty { border: 0; background: none; grid-template-columns: 1fr; }

/* Sensibilidade */
.st-sens { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.st-stat { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.st-stat b { display: block; font: 900 44px/1 var(--font-d); font-stretch: 70%; color: var(--blue); font-variant-numeric: tabular-nums; }
.st-stat span { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-stat.hl { background: var(--yellow); border-color: var(--yellow); }
.st-stat.hl b, .st-stat.hl span { color: var(--ink); }


/* Teclas */
.st-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.st-key { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.st-key kbd {
  flex: none; min-width: 44px; height: 44px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px;
  font: 800 15px/1 var(--font-b); color: var(--ink); background: #fff; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.st-key span { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

/* Estado vazio */
.st-soon { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 22px 24px; border-radius: 18px; border: 2px dashed var(--line); color: var(--muted); }
.st-soon b { font: 800 12px/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 7px 10px; transform: skewX(-10deg); }

@media (max-width: 760px) {
  .st-list-2 { grid-template-columns: 1fr; }
  .st-list-2 > div:nth-child(odd) { border-right: 0; }
  .st-list-2 > div:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
  .st-stat b { font-size: 36px; }
  .st-sens { grid-template-columns: 1fr 1fr; }
  .st-sens .st-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Estado vazio dentro das listas (vídeo/PC): não herda o recorte, as bordas nem o alinhamento das linhas */
.st-list.is-empty { overflow: visible; }
.st-list.is-empty > .st-soon { justify-content: flex-start; padding: 22px 24px; border: 2px dashed var(--line); border-radius: 18px; }

/* Efeitos ao passar o mouse nos quadros */
.st-item, .st-stat, .st-key, #videoList {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s, background-color .25s;
}
.st-item:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 18px 34px rgba(21, 70, 214, .14); }
.st-item:hover b { color: var(--blue); }
.st-item b { transition: color .2s; }
.st-stat:hover { transform: translateY(-5px); border-color: var(--blue); box-shadow: 0 16px 30px rgba(21, 70, 214, .12); }
.st-stat.hl:hover { transform: translateY(-5px) rotate(-2deg); box-shadow: 0 16px 30px rgba(255, 184, 0, .35); }
.st-key:hover { border-color: var(--blue); box-shadow: 0 10px 22px rgba(21, 70, 214, .1); }
.st-key kbd { transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .2s; }
.st-key:hover kbd { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); background: var(--yellow); }
.st-list > div:not(.st-soon) { transition: background-color .2s; }
.st-list > div:not(.st-soon):hover { background: var(--bg-alt); }
.st-list > div:not(.st-soon):hover dd { color: var(--blue); }
@media (prefers-reduced-motion: reduce) {
  .st-item:hover, .st-stat:hover, .st-stat.hl:hover, .st-key:hover kbd { transform: none; }
}

/* Foto do produto (ou ícone em lineart enquanto não tem foto) */
.st-thumb {
  display: grid; place-items: center; aspect-ratio: 4 / 3; margin: -6px -6px 10px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, var(--bg-alt) 70%); border: 1px solid var(--line); color: var(--blue);
}
.st-thumb svg { width: 42%; height: auto; max-height: 70%; opacity: .85; transition: transform .3s var(--ease); }
.st-thumb.has-img { background: #fff; }
.st-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; transition: transform .3s var(--ease); }
.st-item:hover .st-thumb svg, .st-item:hover .st-thumb img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .st-thumb svg, .st-thumb img { transition: none; } }
/* Grades sem item sozinho na última linha: periféricos e hardware em 4 colunas */
#gear { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#pc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { #gear, #pc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { #gear .st-item, #pc .st-item { padding: 14px; } .st-item b { font-size: 18px; } }

/* Fotos recortadas (PNG sem fundo): aparecem inteiras, sem cortar, com uma sombra leve embaixo */
.st-thumb.has-img { background: radial-gradient(120% 90% at 50% 0%, #fff 0%, var(--bg-alt) 75%); }
.st-thumb img { object-fit: contain; padding: 8%; filter: drop-shadow(0 10px 12px rgba(7, 26, 77, .16)); }
/* A foto ocupa exatamente o quadro (4:3) e é encaixada inteira dentro dele, sem cortar */
.st-thumb { position: relative; }
.st-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; }

/* Quadro reservado ("Em breve"): item sem modelo ainda, com show: true no data/setup.js */
.st-item.is-soon { border-style: dashed; background: linear-gradient(180deg, #fff, var(--bg-alt)); }
.st-item.is-soon .st-thumb { background: repeating-linear-gradient(-45deg, var(--bg-alt) 0 10px, #fff 10px 20px); }
.st-item.is-soon .st-thumb svg { opacity: .45; }
.st-item.is-soon b {
  align-self: flex-start; font: 800 12px/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase;
  background: var(--yellow); color: var(--ink); padding: 6px 9px; margin: 2px 0 2px 3px; transform: skewX(-10deg);
}
.st-item.is-soon:hover b { color: var(--ink); }
/* Periféricos: 4 colunas, como o hardware */
#gear { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  #gear { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Número ímpar de cards: o último fica centralizado, do mesmo tamanho dos outros */
  #gear .st-item:last-child:nth-child(odd), #pc .st-item:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
}

/* Configurações completas: vídeo e binds como dois grupos da mesma seção */
.st-group + .st-group { margin-top: 34px; }
.st-sub { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 900 22px/1 var(--font-d); font-stretch: 80%; text-transform: uppercase; color: var(--ink); }
.st-sub svg { width: 22px; height: 22px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--blue); color: #fff; }
.st-group { scroll-margin-top: 90px; }
/* Binds: grade igual à da Sensibilidade (6 cards numa linha no computador) */
.st-binds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.st-binds .st-stat b { overflow-wrap: anywhere; }
.st-binds .st-stat b.long { font-size: 30px; line-height: 1.05; }
@media (max-width: 960px) { .st-binds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .st-binds { grid-template-columns: 1fr 1fr; } }

