@font-face {
  font-family: Burbank;
  src: url("./Assets/Burbank.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --Texto: #fff2ef;
  --Suave: #ffd5d5;
  --Contorno: #75434a;
  --Cartao: #342127;
  --Verde: #78b83c;
  --Titulo: Burbank, Impact, "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #120c12; }
::-webkit-scrollbar-thumb { border: 4px solid #120c12; background: linear-gradient(180deg, #ff7a7a, #c93a4a); }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff9a9a, #e85a5a); }
body { margin: 0; min-width: 280px; min-height: 100vh; background: #181117; color: var(--Texto); font-family: "Segoe UI", system-ui, sans-serif; }
.Fundo { position: fixed; inset: 0; z-index: -1; background: linear-gradient(0deg, #100b11 0%, #100b11d9 40%, #100b11b0 100%), url("./Assets/Temporada.png") center / cover no-repeat; }
h1, h2 { margin: 0; font-family: var(--Titulo); font-weight: 900; line-height: 1; text-transform: uppercase; }
h2 { font-size: 1.4rem; }
p { margin: 0; line-height: 1.5; }
:focus-visible { outline: 2px solid #ffaaa2; outline-offset: 3px; }

/* Botões e campos */
.Acao { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 15px; border: 1px solid var(--Contorno); border-radius: 2px; background: var(--Cartao); color: var(--Texto); font: 900 1.05rem/1 var(--Titulo); text-transform: uppercase; cursor: pointer; }
.Acao:hover:not(:disabled) { border-color: #ffaaa2; }
.Acao:disabled { opacity: 0.6; cursor: wait; }
.AcaoClara, .Acao[aria-pressed="true"] { border-color: #fff2ef; background: #fff2ef; color: #3c161f; }
.AcaoVerde { min-height: 50px; border-color: #d3f497; border-bottom: 4px solid #416720; background: linear-gradient(165deg, #b8ed69, #78b83c); color: #17250c; }
.Etiqueta { display: block; margin-bottom: 6px; color: var(--Suave); font-size: 0.85rem; font-weight: 600; }
.Campo { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--Contorno); border-radius: 2px; background: #1d1217; color: var(--Texto); font: inherit; }
textarea.Campo { resize: vertical; }
.Campo:focus { border-color: #ffaaa2; outline: none; }
.Erro { color: #ff9a9a; font-weight: 600; }

/* Login */
.Login { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.CartaoLogin { display: grid; gap: 10px; justify-items: center; width: min(380px, 100%); padding: 28px 24px; border: 1px solid var(--Contorno); background: #2a191ee6; text-align: center; }
.CartaoLogin h1 { font-size: 2.2rem; }
.CartaoLogin > p { color: var(--Suave); }
.CartaoLogin form { display: grid; gap: 10px; width: 100%; margin-top: 10px; text-align: left; }

/* Topo */
.Topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 4vw, 56px); }
.Marca { display: flex; align-items: center; gap: 12px; }
.Marca h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.Conteudo { display: grid; gap: 22px; padding: 4px clamp(16px, 4vw, 56px) 56px; }

/* Resumo */
.Resumo { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--Contorno); background: #2a191ee6; }
.Numeros { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.Numeros p { display: flex; align-items: baseline; gap: 8px; }
.Numeros strong { font: 900 2rem/1 var(--Titulo); }
.Numeros span { color: var(--Suave); font-size: 0.9rem; }
.Barra { height: 10px; background: #120c12; border: 1px solid var(--Contorno); }
.Barra span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #b8ed69, #78b83c); transition: width 250ms ease-out; }

/* Adicionar */
.Adicionar { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--Contorno); background: #2a191ee6; }
.Adicionar form { display: grid; gap: 10px; }
.Linha { display: flex; flex-wrap: wrap; gap: 8px; }
.GrelhaManual { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.Mensagem { padding: 10px 12px; background: #1d1217; border-left: 4px solid #ffaaa2; font-size: 0.92rem; white-space: pre-line; }
.Mensagem[data-tipo="ok"] { border-color: var(--Verde); }

/* Filtros */
.Filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.Filtros h2 { margin-right: auto; }
.CampoPesquisa { width: 240px; }
.CampoTipo { width: 190px; }
.Grupo { display: flex; gap: 4px; }

/* Grelha de cards */
.Grelha { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 16vw, 190px), 1fr)); gap: 14px; }
.Vazio { padding: 32px 0; color: var(--Suave); text-align: center; }

.Item { --Cor: #b1b1b1; --Sombra: #4a4a4a; position: relative; overflow: hidden; aspect-ratio: 1 / 1.2; background: #2a0c0c; }
.Item[data-raridade="uncommon"] { --Cor: #78ab49; --Sombra: #284416; }
.Item[data-raridade="rare"] { --Cor: #1c9ee0; --Sombra: #053b77; }
.Item[data-raridade="epic"] { --Cor: #b957e6; --Sombra: #4c1a77; }
.Item[data-raridade="legendary"] { --Cor: #e59941; --Sombra: #843915; }
.Item[data-raridade="mythic"] { --Cor: #f5d04c; --Sombra: #7a5c10; }
.Item[data-raridade="icon"], .Item[data-raridade="slurp"] { --Cor: #3ed7d7; --Sombra: #0f5a67; }
.Item[data-raridade="marvel"] { --Cor: #e0414d; --Sombra: #6d111b; }
.Item[data-raridade="dc"] { --Cor: #4f7ae0; --Sombra: #14306e; }
.Item[data-raridade="lava"] { --Cor: #f2742c; --Sombra: #7b2410; }
.Item[data-raridade="dark"], .Item[data-raridade="shadow"] { --Cor: #c04ad9; --Sombra: #3e0f4d; }

.Arte { position: absolute; inset: 0 0 56px; display: block; width: 100%; padding: 0; border: 0; background: radial-gradient(ellipse at 35% 22%, var(--Cor), var(--Sombra) 95%); cursor: pointer; }
.Arte img { display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; transition: scale 200ms ease-out, opacity 200ms; }
.Arte:hover img { scale: 1.04; }
.SemImagem { display: grid; width: 100%; height: 100%; place-items: center; padding: 12px; font: 900 1.2rem/1.1 var(--Titulo); text-transform: uppercase; }

.Estilos { position: absolute; bottom: 64px; left: 8px; padding: 3px 7px; background: #fff2ef; color: #3c161f; font: 900 0.72rem/1 var(--Titulo); text-transform: uppercase; pointer-events: none; }
.CampoCaixa { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 44px; }
.CampoCaixa input { width: 20px; height: 20px; accent-color: #78b83c; }
.Tipo { position: absolute; top: 8px; left: 8px; padding: 3px 7px; background: #100b11b3; font: 900 0.72rem/1 var(--Titulo); text-transform: uppercase; pointer-events: none; }
.Remover { position: absolute; top: 6px; right: 6px; z-index: 2; min-width: 30px; height: 30px; padding: 0 8px; border: 0; background: #100b11b3; color: var(--Texto); font: 900 0.8rem/1 var(--Titulo); text-transform: uppercase; cursor: pointer; opacity: 0; transition: opacity 120ms; }
.Item:hover .Remover, .Remover:focus-visible, .Remover[data-confirmar="true"] { opacity: 1; }
.Remover:hover, .Remover[data-confirmar="true"] { background: #c93a4a; }
@media (hover: none) { .Remover { opacity: 1; } }

.Marca2 { position: absolute; right: 8px; bottom: 64px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; border: 3px solid #fff2ef; background: #100b11b3; color: transparent; pointer-events: none; }
.Marca2 svg { width: 20px; height: 20px; }
.Item[data-feito="true"] .Marca2 { border-color: #d3f497; background: linear-gradient(165deg, #b8ed69, #78b83c); color: #17250c; }
.Item[data-feito="true"] .Arte img { opacity: 0.55; }
.Item[data-feito="true"] .Arte { filter: saturate(0.7); }

.Detalhes { position: absolute; inset: auto 0 0; display: flex; height: 56px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 10px; background: #1d1217; text-align: left; }
.Detalhes strong { overflow: hidden; font: 900 1.02rem/1 var(--Titulo); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.Detalhes code { overflow: hidden; color: var(--Suave); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; user-select: all; }

.Modal { width: min(720px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--Contorno); background: #2a191e; color: var(--Texto); }
.Modal::backdrop { background: #100b11d9; backdrop-filter: blur(3px); }
.Modal form { display: grid; gap: 16px; padding: 18px; }
.ModalTopo, .ModalAcoes { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ModalTopo h2 { font-size: 1.3rem; }
.ModalCorpo { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 18px; }
.ModalArte { position: sticky; top: 0; display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid var(--Contorno); background: #1d1217; }
.ModalArte img { width: 100%; height: 100%; object-fit: contain; }
.ModalArte span { color: var(--Suave); }
.ModalCampos { display: grid; align-content: start; gap: 10px; }
.ModalTipo { color: var(--Suave); font: 900 1rem/1 var(--Titulo); text-transform: uppercase; }
.ModalAcoes { justify-content: flex-end; flex-wrap: wrap; }
.Modal .Erro { padding: 8px 10px; background: #1d1217; }

@media (max-width: 640px) {
  .CampoPesquisa, .CampoTipo { width: 100%; }
  .Grelha { grid-template-columns: repeat(2, 1fr); }
  .ModalCorpo { grid-template-columns: 1fr; }
  .ModalArte { position: static; width: min(100%, 220px); justify-self: center; }
  .ModalAcoes > .Acao { flex: 1; }
}
