:root{
  --bg: #02030a;
  --panel: rgba(14,16,32,.90);
  --text: #e7e7e7;
  --muted: #b8b8b8;
  --border: #2a2d55;
  --link: #7afcff;
  --link2: #ff77e9;
  --accent: #9cff57;
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
}

body{
  background: var(--bg) url("/gifs/stars.gif") repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.45;
  text-rendering: geometricPrecision;
  position: relative;
  min-height: 100vh;
}

/* CRT overlays */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  /* scanlines + subtle tint */
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.00) 0px,
      rgba(0,0,0,0.00) 2px,
      rgba(0,0,0,0.18) 3px
    ),
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.05), rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.75) 100%);
  mix-blend-mode: normal;
  opacity: .85;
  animation: crt-flicker 6s infinite;
}

body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  /* vignette + tiny noise */
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.60) 70%, rgba(0,0,0,0.92) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.010) 0px,
      rgba(255,255,255,0.010) 1px,
      rgba(0,0,0,0.000) 2px
    );
  opacity: .60;
}

@keyframes crt-flicker{
  0%{ opacity: .82; }
  10%{ opacity: .86; }
  20%{ opacity: .80; }
  30%{ opacity: .88; }
  40%{ opacity: .83; }
  50%{ opacity: .87; }
  60%{ opacity: .81; }
  70%{ opacity: .89; }
  80%{ opacity: .84; }
  90%{ opacity: .86; }
  100%{ opacity: .82; }
}

a{
  color: var(--link);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
a:hover{
  color: var(--link2);
}

.wrapper{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 12px 48px;
  position: relative;
  z-index: 2; /* above CRT overlays */
}

.topbar{
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(30,33,70,.85), rgba(14,16,32,.85));
  padding: 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5) inset;
}

.grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
}

.panel{
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.55) inset,
    0 8px 30px rgba(0,0,0,.35);
}

h1,h2,h3{ margin: 0 0 10px; }
h1{ font-size: 26px; letter-spacing: 0.5px; }
h2{
  font-size: 16px;
  text-transform: lowercase;
  color: var(--accent);
}
.lead{ color: var(--muted); }

.hr{
  border:0;
  border-top: 1px dashed rgba(255,255,255,.25);
  margin: 12px 0;
}

.kbd{
  display:inline-block;
  border:1px solid rgba(255,255,255,.25);
  padding: 0 6px;
  margin: 0 2px;
  background: rgba(255,255,255,.06);
}

.buttons{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}

.buttons img{
  width: 88px;
  height: 31px;
  image-rendering: pixelated;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.20);
}

.gifs img{
  image-rendering: pixelated;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,.15);
}

.small{
  font-size: 12px;
  color: var(--muted);
}

/* AwayMessage slot: combina com o look */
#away-slot{
  margin-top: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.25);
  padding: 10px;
  white-space: pre;
}

/* Footer (estrutura igual ao resto) */
.footer{
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
  color: var(--muted);
}
.footer a{ color: var(--text); text-decoration: underline; }
.footer-warning{
  margin-top: 6px;
  opacity: .9;
}

/* status gifs layout */
.gifbar{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.gifbar a{
  text-decoration: none;
}
.gifbar img{
  image-rendering: pixelated;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.20);
}
