/* Jogo do Fim — shared design tokens, fonts, and base reset */

@font-face {
  font-family: "SorceryCode";
  src: url("/assets/fonts/sorcery-code.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "AmericanCaptain";
  src: url("/assets/fonts/American%20Captain.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg-void: #070604;
  --bg-panel: #14100c;
  --bg-panel-2: #1d1712;
  --ink: #f4ead9;
  --ink-dim: #b8a98f;
  --ember: #d9a441;
  --ember-bright: #f2c66d;
  --danger: #e6231e;

  --opt-red: #e6231e;
  --opt-yellow: #f2d024;
  --opt-blue: #2f6fed;
  --opt-green: #24b24c;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-glow: 0 0 40px rgba(217, 164, 65, 0.18);

  --font-display: "SorceryCode", monospace;
  --font-body: "SorceryCode", monospace;
  --font-accent: "AmericanCaptain", sans-serif;
}

* {
  box-sizing: border-box;
}

/* Guarantee the `hidden` attribute always wins, even over elements whose
   own class sets `display` (e.g. `.btn-ghost { display: inline-flex }`) —
   author rules otherwise beat the UA stylesheet's [hidden] on a specificity
   tie. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--ember);
  color: #1a1108;
}

.scene {
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 20%, rgba(217, 164, 65, 0.12), transparent 60%), var(--bg-void);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 100% at 50% -10%, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.9) contrast(1.05);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.flicker {
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.6; }
  94% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
}

.logo {
  width: min(70vw, 420px);
  filter: drop-shadow(0 0 30px rgba(217, 164, 65, 0.35));
}

.credits-logo {
  width: min(46vw, 260px);
  opacity: 0.85;
  margin-bottom: -6px;
  filter: drop-shadow(0 0 16px rgba(217, 164, 65, 0.25));
}

.pixel-title {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(217, 164, 65, 0.5);
}

.pixel-text {
  font-family: var(--font-body);
}

a {
  color: var(--ember-bright);
}
