@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-BlackItalic.ttf") format("truetype"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --bg: #0b1f33;
  --bg-2: #0c243c;
  --card: #12304a;
  --card-2: #173a57;
  --line: #24506f;
  --text: #f2f7f5;
  --muted: #a9c0cc;
  --accent: #24846c;
  --mint: #5ef2c0;
  --green: #2fd18b;
  --yellow: #f2c230;
  --red: #ef5b4b;
  --radius: 14px;
  --maxw: 560px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #1e3c3c 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
a { color: var(--mint); }
button { font: inherit; cursor: pointer; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; position: relative; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; }
.brand .title { font-family: "Barlow Condensed", "Montserrat", sans-serif; font-style: italic; font-weight: 900; font-size: 34px; letter-spacing: .5px; line-height: 1; text-transform: uppercase; }
.brand .by { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .4px; }
.icon-btn { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--mint); }

.info { display: flex; gap: 14px; font-size: 14px; color: var(--muted); font-weight: 600; margin: 6px 0 10px; flex-wrap: wrap; }
.info b { color: var(--text); }

/* Input */
.guess-form { position: relative; }
.guess-form input {
  width: 100%; padding: 15px 16px; font-size: 18px; font-weight: 600; font-family: inherit;
  background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: var(--radius); outline: none;
}
.guess-form input:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(94,242,192,.12); }
.guess-form input::placeholder { color: #7f9aa8; font-weight: 500; }
.msg { min-height: 24px; margin: 8px 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
.msg.err { color: #ffb4a8; }

/* Guess rows */
.row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 14px; margin: 6px 0; border-radius: 10px; overflow: hidden;
  background: var(--card); font-weight: 700;
}
.row .fill { position: absolute; inset: 0 auto 0 0; border-radius: 10px; opacity: .9; }
.row > span { position: relative; z-index: 1; }
.row .word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .cat { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.75); margin-left: 6px; text-transform: lowercase; }
.row .rank { font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.row.g .fill { background: #1fa970; } .row.y .fill { background: #c99a12; } .row.r .fill { background: #d2483a; }
.row .word, .row .rank { text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.row.last { outline: 2px solid var(--text); }
.row.win .fill { background: linear-gradient(90deg, var(--mint), var(--green)); }
.sep { border: 0; border-top: 1px dashed var(--line); margin: 12px 0; }

/* Result card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.result h2 { margin: 0 0 4px; font-size: 22px; }
.result .secret { font-family: "Barlow Condensed", "Montserrat", sans-serif; font-style: italic; font-weight: 900; font-size: 44px; color: var(--mint); text-transform: uppercase; line-height: 1.05; margin: 6px 0 10px; text-shadow: 0 0 24px rgba(94,242,192,.35); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.stats div { background: var(--bg-2); border-radius: 10px; padding: 8px 4px; }
.stats b { display: block; font-size: 22px; }
.stats small { font-size: 11px; color: var(--muted); font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 800; text-decoration: none; }
.btn.primary { background: var(--mint); color: #08202f; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.wa { background: #25d366; color: #062b16; }
.btn.full { width: 100%; margin-top: 8px; }
.countdown { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.countdown b { color: var(--text); font-variant-numeric: tabular-nums; }

.support { background: linear-gradient(135deg, #0f3b31, #12304a); border-color: #1f6b56; }
.support p { margin: 6px 0 10px; color: var(--muted); }

/* Menu + modal */
.menu { position: absolute; right: 16px; top: 60px; z-index: 20; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 210px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.menu button, .menu a { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 11px 12px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 15px; }
.menu button:hover, .menu a:hover { background: var(--card); }
.modal-bg { position: fixed; inset: 0; background: rgba(3,12,20,.72); z-index: 30; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); width: 100%; max-width: 480px; max-height: 86vh; overflow: auto; padding: 18px; }
.modal h3 { margin: 0 0 10px; }
.modal .close { float: right; }
.past-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.past-list button { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; font-weight: 700; }
.past-list button small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.past-list button.won { border-color: var(--green); }
.past-list button.lost { border-color: var(--red); }

/* Ads: recolhidos até existir anúncio */
.ad { margin: 14px auto; text-align: center; min-height: 0; }
.ad.on { min-height: 100px; }
.ad .ad-label { font-size: 10px; color: #6f8a99; letter-spacing: 1px; text-transform: uppercase; }

/* Footer */
footer { margin: 34px 0 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.socials { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.socials a:hover { border-color: var(--mint); color: var(--mint); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--mint); }

/* Cookie banner */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 560px; margin: 0 auto; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 13px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.cookie p { margin: 0 0 10px; color: var(--muted); }
.cookie .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie .btn { padding: 9px 14px; font-size: 13px; }

/* Text pages */
.page h1 { font-size: 28px; margin: 18px 0 8px; }
.page h2 { font-size: 19px; margin: 22px 0 6px; color: var(--mint); }
.page p, .page li { color: #d6e4ea; }
.answers .item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--card); border-radius: 10px; margin: 8px 0; }
.answers .item b { color: var(--mint); }
.legend { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.hidden { display: none !important; }
@media (max-width: 380px) { .brand .title { font-size: 28px; } .stats b { font-size: 18px; } }
