/* ---------- reset / base ---------- */
* { box-sizing: border-box; }

@font-face {
  font-family: 'November';
  src: url('assets/fonts/november.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Bitmgothic';
  src: url('assets/fonts/bitmgothic.woff') format('woff'),
       url('assets/fonts/bitmgothic.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #110d1d;
  --gold: #cd9d32;
  --purple: #5b4394;
  --green: #3a745e;
  --green-dark: #245140;
  --green-title: #75c3a6;
  --cream: #fff;
  --text: #d6d4e0;

  /* sidebar (mockup: purple panel, lavender section labels, teal items) */
  --side-bg: #57335b;
  --side-border: #664769;
  --lavender: #ab96cd;

  /* center content window (mockup: layered green/mint frame, light green body) */
  --content-frame-1: #0f560a;
  --content-frame-2: #388d66;
  --content-frame-3: #436920;
  --content-frame-4: #62d49f;
  --content-titlebar: #78bc5b;
  --content-titlebar-border: #66913f;
  --content-body-bg: #a0d490;
  --content-body-strip: #b9e2c5;

  --font-display: 'November', 'VT323', 'Courier New', monospace;
  --font-body: 'Special Elite', 'Courier New', monospace;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ---------- header ---------- */
.banner {
  max-width: 1300px;
  margin: 16px auto 0;
  padding: 0 16px;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ---------- announcement ticker ---------- */
.ticker {
  display: block;
  max-width: 1300px;
  margin: 12px auto 0;
  padding: 0 16px;
}
.ticker-bar {
  display: block;
  background: var(--green);
  border: 2px solid var(--cream);
  color: #eafff2;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 1px;
  padding: 6px 0;
  text-align: center;
}

/* ---------- three-column layout ----------
   column ratio (260:1179:290) is measured pixel-for-pixel off the mockup
   canvas (sidebar/content/games widths) - don't swap this for eyeballed
   pixel widths, that's what threw the proportions off last time. */
.layout {
  display: grid;
  grid-template-columns: 260fr 1179fr 290fr;
  align-items: start;
  max-width: 1300px;
  margin: 28px auto 40px;
  gap: 20px;
  padding: 0 16px;
}

/* ---------- sidebar ----------
   real crop of the mockup's sidebar art (assets/sidebar.png) with the
   link labels laid on top at the exact box positions from that image -
   no CSS-drawn borders/bevels here, so it can't drift from the source. */
.sidebar {
  position: relative;
}

.sidebar-art {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.side-item {
  position: absolute;
  left: 11.54%;
  width: 76.54%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eafff2;
  text-decoration: none;
  font-family: 'Bitmgothic', var(--font-body);
  font-size: 0.95rem;
}

/* ---------- center content window ----------
   aspect-ratio is the box's real width:height from the mockup (1179:573)
   so it stays the right size regardless of how much placeholder text is
   inside it - don't let content length drive this box's height. */
.content-window {
  min-width: 0;
  aspect-ratio: 1179 / 573;
  display: flex;
  flex-direction: column;
  background: var(--content-body-bg);
  border: 3px solid var(--content-frame-1);
  box-shadow:
    0 0 0 3px var(--content-frame-2),
    0 0 0 15px var(--content-frame-3),
    0 0 0 18px var(--content-frame-4),
    4px 4px 0 18px rgba(0,0,0,0.6);
  margin: 18px 22px 22px 18px;
}

.content-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--content-titlebar);
  border-bottom: 3px solid var(--content-titlebar-border);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: #0d0f14;
}

.content-titletext {
  font-family: 'Bitmgothic', var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #0d0f14;
}

.close-badge {
  display: block;
  height: 1.4em;
  width: auto;
  margin-left: auto;
  image-rendering: pixelated;
}

.content-body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 22px 22px 30px 30px;
  color: #16311c;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.content-body p { margin: 0; }
.content-body::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 10px;
  background: var(--content-body-strip);
}
.content-body::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 10px;
  background: var(--content-body-strip);
}

/* ---------- games ---------- */
.games {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-card {
  position: relative;
  display: block;
  line-height: 0;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.6);
  transition: transform 0.1s ease;
}
.game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.6);
}

.game-cover {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* label sits in the blank title strip at the top of each box's art -
   top/height per card match that strip's exact proportion in the source */
.game-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d0f14;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

/* ---------- game screen pages (games/*.html) ---------- */
.game-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--green-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.game-page-header a {
  text-decoration: none;
  color: var(--green-title);
}
.game-page-header a:hover { color: var(--purple); }

.game-frame-wrap {
  width: 100%;
  height: calc(100vh - 46px);
}
.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .layout { grid-template-columns: 1fr; }
  .games { flex-direction: row; flex-wrap: wrap; }
  .games .game-card { flex: 1 1 220px; }
}

@media (max-width: 500px) {
  .logo { max-width: 100%; }
  .ticker { font-size: 0.9rem; }
  .side-item { font-size: 0.78rem; }
  .game-label { font-size: 0.85rem; }
  .content-window { margin: 12px; box-shadow: 0 0 0 3px var(--content-frame-2), 0 0 0 10px var(--content-frame-3), 0 0 0 13px var(--content-frame-4), 4px 4px 0 13px rgba(0,0,0,0.6); }
}
