/* ============================================
   PALETTE
   background:   #000000  (black, tiled starfield sits on top)
   ink:          #E8E8E8  (starlight off-white — body text)
   dim ink:      #9BA3AF  (secondary text, captions)
   frame:        #C7CCD1  (chrome/silver bevel highlight)
   frame dark:   #45494F  (chrome/silver bevel shadow)
   accent:       #3049B0  (pulled from the Saturn logo blue — used for glow only)

   console colors (sampled from your own logo files, used on the (system) tags):
   dreamcast:    #CF3311  (from the swirl)
   saturn:       #4A4ACB  (from the planet, brightened slightly for legibility)
   sega cd:      #E8A93E  (gold, standing in for the rainbow chrome badge)

   dreamcast-controller nav colors (used on the four tier tabs):
   green:        #4CAF50  (the greats)
   yellow:       #E8C547  (still good)
   blue:         #4A90D9  (the mids)
   red:          #D9483D  (the horrible)
   ============================================ */

* {
  box-sizing: border-box;
}

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

body {
  background-color: #000;
  background-image: url("/images/starfield_tile.jpg");
  background-repeat: repeat;
  color: #E8E8E8;
  font-family: 'VT323', monospace;
  font-size: 20px;
  line-height: 1.4;
  min-height: 100vh;
}

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

/* ============================================
   HEADER — just the title, floating on the stars
   ============================================ */

.site-header {
  padding: 40px 20px 20px;
  text-align: center;
}

.site-title {
  font-family: 'Silkscreen', monospace;
  font-weight: 700;
  font-size: clamp(22px, 4.2vw, 40px);
  letter-spacing: 1px;
  color: #E8E8E8;
  text-shadow: 0 0 6px #3049B0, 0 0 14px #3049B0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sega-wordmark {
  height: 0.9em;
  width: auto;
  filter: drop-shadow(0 0 6px #3049B0) drop-shadow(0 0 10px #3049B0);
}

/* ============================================
   TIER NAV
   ============================================ */

.tier-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 20px 10px;
}

.tier-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(10, 10, 16, 0.72);
  border-top: 2px solid #45494F;
  border-left: 2px solid #45494F;
  border-right: 2px solid #C7CCD1;
  border-bottom: 2px solid #C7CCD1;
  opacity: 0.75;
}

.tier-link:hover {
  opacity: 1;
}

.tier-link.active {
  opacity: 1;
  border-top: 2px solid #C7CCD1;
  border-left: 2px solid #C7CCD1;
  border-right: 2px solid #45494F;
  border-bottom: 2px solid #45494F;
}

/* dreamcast controller face-button colors — green/yellow/blue/red, left to right */
.tier-greats   { color: #4CAF50; }
.tier-good     { color: #E8C547; }
.tier-mids     { color: #4A90D9; }
.tier-horrible { color: #D9483D; }

.tier-greats.active   { text-shadow: 0 0 8px #4CAF50; }
.tier-good.active     { text-shadow: 0 0 8px #E8C547; }
.tier-mids.active     { text-shadow: 0 0 8px #4A90D9; }
.tier-horrible.active { text-shadow: 0 0 8px #D9483D; }

/* ============================================
   PAGE LAYOUT — logo rail / game list / about panel
   ============================================ */

.page-layout {
  max-width: 1200px;
  margin: 20px auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 130px 1fr 260px;
  gap: 30px;
  align-items: start;
}

/* ---- left: console logo rail ---- */

.console-rail {
  display: flex;
  flex-direction: column-reverse; /* Sega CD at bottom, Dreamcast at top: oldest to newest, bottom to top */
  align-items: center;
  gap: 26px;
  position: sticky;
  top: 30px;
}

.logo {
  width: 100%;
  height: auto;
}

.logo-segacd {
  border-radius: 2px;
}

.logo-saturn,
.logo-dreamcast {
  width: 82%;
}

/* ---- center: game list ---- */

.game-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.intro-blurb {
  padding: 0 6px 10px;
}

.intro-blurb p {
  margin: 0;
  font-family: 'Silkscreen', monospace;
  font-size: 17px;
  line-height: 1.6;
  color: #E8E8E8;
}

.review-gif {
  display: block;
  width: 32px;
  height: auto;
  margin-top: 10px;
  image-rendering: pixelated;
}

.game-row {
  display: grid;
  grid-template-columns: 160px 200px 1fr;
  gap: 0;
  background: rgba(10, 10, 16, 0.72);
  border-top: 2px solid #C7CCD1;
  border-left: 2px solid #C7CCD1;
  border-right: 2px solid #45494F;
  border-bottom: 2px solid #45494F;
}

.cell {
  padding: 16px;
}

.cell-image {
  border-right: 2px solid #45494F;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.cell-image img {
  border: 2px solid #45494F;
}

.cell-title {
  border-right: 2px solid #45494F;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 8px 0;
  color: #E8E8E8;
}

.game-system {
  margin: 0;
  color: #9BA3AF;
  font-size: 18px;
}

.sys-dc  { color: #CF3311; }
.sys-sat { color: #4A4ACB; }
.sys-cd  { color: #E8A93E; }

.cell-notes {
  display: flex;
  align-items: center;
}

.cell-notes p {
  margin: 0;
}

/* ---- right: about panel ---- */

.about-panel {
  background: rgba(10, 10, 16, 0.72);
  border-top: 2px solid #C7CCD1;
  border-left: 2px solid #C7CCD1;
  border-right: 2px solid #45494F;
  border-bottom: 2px solid #45494F;
  padding: 18px;
  position: sticky;
  top: 30px;
}

.about-heading {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #4CAF50;
  margin: 0 0 14px 0;
  line-height: 1.6;
}

.about-text {
  margin: 0 0 14px 0;
  color: #E8E8E8;
  font-size: 19px;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* ============================================
   GUESTBOOK PAGE
   ============================================ */

.guestbook-wrap {
  max-width: 700px;
  margin: 30px auto 50px;
  padding: 0 20px;
  text-align: center;
}

.guestbook-heading {
  font-family: 'Press Start 2P', monospace;
  font-size: 20px;
  color: #E8E8E8;
  text-shadow: 0 0 6px #3049B0, 0 0 12px #3049B0;
  margin: 0 0 14px;
}

.guestbook-sub {
  color: #9BA3AF;
  font-size: 20px;
  margin: 0 0 30px;
}

.guestbook-frame {
  width: 100%;
  min-height: 420px;
  border: none;
  display: block;
}

.guestbook-placeholder {
  background: rgba(10, 10, 16, 0.72);
  border-top: 2px solid #C7CCD1;
  border-left: 2px solid #C7CCD1;
  border-right: 2px solid #45494F;
  border-bottom: 2px solid #45494F;
  padding: 40px 20px;
  color: #9BA3AF;
}

.guestbook-placeholder p {
  margin: 0;
}

.guestbook-back {
  margin-top: 30px;
}

.guestbook-back a {
  color: #9BA3AF;
}

.guestbook-back a:hover {
  color: #E8E8E8;
}

/* ============================================
   FOOTER
   ============================================ */

.sitefoot {
  text-align: center;
  padding: 24px;
  color: #9BA3AF;
  font-size: 16px;
}

.footer-link {
  color: #9BA3AF;
}

.footer-link:hover {
  color: #E8E8E8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .console-rail {
    flex-direction: row;
    justify-content: center;
    position: static;
    gap: 30px;
  }
  .logo {
    width: 80px;
  }
  .logo-saturn,
  .logo-dreamcast {
    width: 80px;
  }
  .about-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .game-row {
    grid-template-columns: 1fr;
  }
  .cell-image,
  .cell-title {
    border-right: none;
    border-bottom: 2px solid #45494F;
  }
}