/* MiniMonsters — site oficial. Visual das caixas do jogo, fonte pixelada nos títulos. */
@font-face {
  font-family: "MiniFont";
  src: url("../fonts/minifont.woff") format("woff"), url("../fonts/minifont.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #121729;
  --bg2: #1c2440;
  --bg3: #26305a;
  --panel: #f8f8f0;
  --panel2: #eceff7;
  --ink: #282830;
  --dim: #6c6c84;
  --line: #303850;
  --line2: #8898c0;
  --gold: #f8d048;
  --gold2: #c89820;
  --accent: #e05840;
  --good: #38a048;
  --bad: #d03838;
  --blue: #58a0f0;
  --pixel: "MiniFont", "Courier New", monospace;
  --body: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: #e9ecf8;
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img.px, .px img { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }
a:hover { color: #fff1b0; }
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: normal; letter-spacing: 0; line-height: 1.25; }
h2 { font-size: 36px; margin: 0 0 18px; color: var(--gold); text-shadow: 3px 3px 0 #000a; }
h3 { font-size: 24px; margin: 0 0 8px; }
.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- cabeçalho */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 23, 41, .92); backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand img { height: 40px; display: block; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a {
  font-family: var(--pixel); font-size: 24px; color: #dfe4f6; text-decoration: none;
  padding: 4px 10px; border-radius: 6px;
}
.nav a:hover, .nav a.on { background: var(--bg3); color: var(--gold); }
.nav a.play { background: var(--gold); color: var(--ink); border: 3px solid var(--line); }
.nav a.play:hover { background: #ffe27a; }

/* ---------------------------------------------------------------- botões e caixas */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pixel); font-size: 24px; text-decoration: none; cursor: pointer;
  color: var(--ink); background: var(--panel);
  border: 4px solid var(--line); border-radius: 10px;
  box-shadow: inset 0 -5px 0 #0002, 0 5px 0 #0006;
  padding: 10px 22px; transition: transform .08s;
}
.btn:hover { transform: translateY(-2px); color: var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 #0002, 0 2px 0 #0006; }
.btn.gold { background: var(--gold); }
.btn.green { background: #7ee08a; }
.btn.red { background: #f0a090; }
.btn.small { font-size: 24px; padding: 4px 14px; border-width: 3px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.box {
  background: var(--panel); color: var(--ink);
  border: 4px solid var(--line); border-radius: 12px;
  box-shadow: inset 0 0 0 3px var(--line2), 0 8px 0 #0005;
  padding: 22px;
}
.box h3 { color: #3a3a90; }
.box p { color: #3d3d4c; }
.muted { color: var(--dim); }

/* ---------------------------------------------------------------- herói */
.hero {
  position: relative; overflow: hidden;
  min-height: min(78vh, 760px);
  display: grid; place-items: center; text-align: center;
  background: #1a2040 center bottom / cover no-repeat;
  image-rendering: pixelated;
  border-bottom: 4px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #0c102055 0%, transparent 35%, transparent 65%, #121729 100%);
  pointer-events: none;
}
.hero .inner { position: relative; z-index: 2; padding: 40px 16px 120px; }
.hero .logo { width: min(640px, 92vw); filter: drop-shadow(0 6px 0 #0006); animation: float 4s ease-in-out infinite; }
.hero .tag {
  font-size: clamp(17px, 2.4vw, 22px); max-width: 640px; margin: 10px auto 26px;
  color: #fff; text-shadow: 2px 2px 0 #000, 0 0 12px #000c;
}
.hero .ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  background: #0c1020cc; border: 3px solid var(--line2); border-radius: 999px;
  padding: 6px 16px; font-size: 15px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #58d058; box-shadow: 0 0 8px #58d058; animation: blink 1.6s infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes blink { 50% { opacity: .35; } }

/* ---------------------------------------------------------------- seções */
section { padding: 70px 0; }
section.alt { background: var(--bg2); border-top: 4px solid var(--line); border-bottom: 4px solid var(--line); }
.lead { font-size: 18px; color: #c9cfe6; max-width: 760px; margin: -6px 0 28px; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { padding: 0; overflow: hidden; }
.feature img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; border-bottom: 4px solid var(--line); }
.feature .txt { padding: 16px 18px 18px; }
.feature p { margin: 0; }

/* ---------------------------------------------------------------- Minics */
.mons { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.mon {
  background: var(--panel); color: var(--ink); text-align: center;
  border: 4px solid var(--line); border-radius: 12px; padding: 10px 8px 12px;
  box-shadow: 0 6px 0 #0005; transition: transform .1s;
}
.mon:hover { transform: translateY(-4px) rotate(-1deg); }
.mon img { width: 96px; height: 96px; image-rendering: pixelated; display: block; margin: 0 auto; }
.mon .nm { font-family: var(--pixel); font-size: 24px; display: block; }
.mon .num { font-size: 13px; color: var(--dim); }
.types { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.type { font-size: 12px; font-weight: bold; color: #fff; padding: 1px 8px; border-radius: 6px; text-shadow: 1px 1px 0 #0007; border: 2px solid #0003; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }

/* ---------------------------------------------------------------- rankings */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  font-family: var(--pixel); font-size: 24px; cursor: pointer;
  background: var(--bg3); color: #dfe4f6; border: 3px solid var(--line2); border-radius: 8px; padding: 2px 14px;
}
.tab.on { background: var(--gold); color: var(--ink); border-color: var(--line); }
table.rank { width: 100%; border-collapse: collapse; }
table.rank th { text-align: left; font-weight: normal; font-family: var(--pixel); font-size: 24px; color: #3a3a90; padding: 6px 10px; border-bottom: 3px solid var(--line2); }
table.rank td { padding: 8px 10px; border-bottom: 2px solid #dde1ee; vertical-align: middle; }
table.rank tr:nth-child(even) td { background: #f0f2fa; }
table.rank .pos { font-family: var(--pixel); font-size: 24px; width: 56px; color: var(--dim); }
table.rank .pos.p1 { color: #d8a010; } table.rank .pos.p2 { color: #8a96ae; } table.rank .pos.p3 { color: #c07030; }
table.rank th.r { text-align: right; }
table.rank .val { font-family: var(--pixel); font-size: 24px; text-align: right; color: var(--ink); }
table.rank .who { font-weight: bold; }
table.rank .best { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 13px; }
table.rank .best img { width: 32px; height: 32px; image-rendering: pixelated; }
.empty { text-align: center; color: var(--dim); padding: 30px; }

/* ---------------------------------------------------------------- formulários / conta */
.form { display: grid; gap: 12px; max-width: 420px; }
.form label { font-weight: bold; color: #3a3a90; font-size: 14px; display: grid; gap: 4px; }
.form input {
  font: 16px var(--body); padding: 10px 12px; border: 3px solid var(--line2); border-radius: 8px; background: #fff; color: var(--ink);
}
.form input:focus { outline: none; border-color: var(--accent); }
.msg { padding: 10px 14px; border-radius: 8px; font-weight: bold; }
.msg.ok { background: #d8f4d8; color: #1f6a2c; border: 2px solid #8fd09a; }
.msg.err { background: #fde0dc; color: #8a2418; border: 2px solid #f0a090; }
.split { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border: 3px solid #d6dbea; border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: var(--pixel); font-size: 36px; color: #3a3a90; line-height: 1; }
.stat span { font-size: 13px; color: var(--dim); }
.party { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.party .mon { padding: 6px; }
.party > p { grid-column: 1 / -1; margin: 0; }
#v-dash h2, #pl > h2, #pl-trophies-box h2 { margin-top: 36px; }
#v-dash h2:first-child { margin-top: 0; }
.party .mon img { width: 64px; height: 64px; }
.danger { border-color: #a03030; box-shadow: inset 0 0 0 3px #f0a090, 0 8px 0 #0005; }
.linkbtn { background: none; border: 0; color: #3a6ad0; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* ---------------------------------------------------------------- download / novidades */
.news { display: grid; gap: 22px; grid-template-columns: 2fr 1fr; }
.news .ver { font-family: var(--pixel); font-size: 36px; color: #3a3a90; }
.steps { padding-left: 20px; color: #3d3d4c; }
.steps li { margin: 6px 0; }

/* ---------------------------------------------------------------- online e perfis */
.nav a.live { display: inline-flex; align-items: center; gap: 6px; font-size: 24px; color: #9ff0a0; }
.nav a.live .dot { width: 8px; height: 8px; }
a.pill { color: #fff; text-decoration: none; }
a.pill:hover { border-color: var(--gold); }
.players { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pcard {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  background: var(--panel); color: var(--ink); border: 4px solid var(--line); border-radius: 12px;
  padding: 10px 14px; box-shadow: 0 6px 0 #0005; transition: transform .1s;
}
.pcard:hover { transform: translateY(-3px); color: var(--ink); }
.pcard img { width: 64px; height: 64px; image-rendering: pixelated; flex: none; }
.pcard .nm { font-family: var(--pixel); font-size: 24px; display: block; color: #3a3a90; }
.pcard .info { font-size: 13px; color: var(--dim); }
.chip { display: inline-block; font-size: 13px; font-weight: bold; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--ink); border: 2px solid var(--line); margin: 0 6px 4px 0; }
.chip.blue { background: #bcd4ff; }
.chip.green { background: #b8f0b8; }
.chip.red { background: #f8c0b0; }
.chips { display: flex; flex-wrap: wrap; }
.profile-head { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.profile-head img { width: 128px; height: 128px; background: var(--bg2); border: 4px solid var(--line); border-radius: 16px; padding: 4px; }
.profile-head h2 { margin-bottom: 6px; }
.profile-head .lead { margin: 4px 0 10px; }
.meter { height: 16px; background: #dde1ee; border: 3px solid var(--line2); border-radius: 8px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: linear-gradient(90deg, #48c070, #8be07a); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges img { width: 48px; height: 48px; image-rendering: pixelated; }
.trophies { margin: 0; padding-left: 20px; color: var(--ink); }
.trophies li { margin: 6px 0; }
table.rank .who a { color: #3a3a90; text-decoration: none; }
table.rank .who a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- rodapé */
.foot { padding: 34px 0 44px; color: #8d96b8; text-align: center; border-top: 4px solid var(--line); background: #0e1222; }
.foot img { height: 34px; image-rendering: pixelated; }
.foot a { margin: 0 8px; }

@media (max-width: 760px) {
  .top { position: static; }
  .top .wrap { gap: 6px; min-height: 0; padding: 8px 0; }
  .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }
  .hero { min-height: 0; }
  .hero .inner { padding: 28px 16px 70px; }
  .news { grid-template-columns: 1fr; }
  h2 { font-size: 24px; }
  .nav a { font-size: 24px; padding: 2px 6px; }
  .brand img { height: 32px; }
  section { padding: 48px 0; }
  .btn { font-size: 24px; padding: 8px 16px; }
}
