/* ZeldaFiles.com — 1999 forever, 2026 polish */
html {
  margin: 0;
  padding: 0;
  background-color: #000;
  overflow-x: hidden;
  color-scheme: dark;
}
body {
  margin: 0;
  padding: 0;
  background: #000 url("../img/stars.gif?v=1") repeat;
  color: #c8ff9a;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", Geneva, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  max-width: 100%;
}

body.banner {
  background: #000 url("../img/stars.gif?v=1") repeat;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.banner-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}
.banner-table td.torch { width: 70px; }
.banner-table td.banner-mid {
  width: auto;
  overflow: hidden;
  max-width: 100%;
}
body.nav {
  background: #050805 url("../img/stars.gif?v=1") repeat;
}
a {
  color: #ffd24a;
  font-weight: bold;
}
a:visited { color: #e08a2a; }
a:hover { color: #fff; background: #3a2a00; }
a:focus { outline: 1px dotted #ffd24a; }
img { border: 0; image-rendering: pixelated; image-rendering: -moz-crisp-edges; }
a.nav-hero,
a.nav-hero:link,
a.nav-hero:visited,
a.nav-hero:hover,
a.nav-hero:active,
a.nav-hero:focus {
  border: 0;
  outline: none;
  text-decoration: none;
  background: none;
  box-shadow: none;
  display: inline-block;
  padding: 0;
}
.center { text-align: center; }
h1, h2, h3 {
  font-family: Impact, "Arial Black", Haettenschweiler, sans-serif;
  color: #ffd24a;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #3a2200;
  margin: 0.4em 0;
}
h1 { font-size: 28px; }
h2 { font-size: 20px; color: #9f6; }
hr.rainbow {
  border: 0;
  height: 8px;
  background: url("../img/rainbow.gif?v=1") repeat-x;
  margin: 12px 0;
}
.marquee-wrap {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 2px inset #666;
  background: #110800;
  color: #ffd24a;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  padding: 3px 0;
}
.marquee-wrap span {
  display: inline-block;
  white-space: nowrap;
  /* padding-% of a definite-width wrap = start at the right edge, no page stretch */
  padding-left: 100%;
  animation: scroll-left 16s linear infinite;
}
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.blink {
  animation: blink 1.1s step-end infinite;
  color: #ff4d4d;
  font-weight: bold;
}
@keyframes blink {
  50% { opacity: 0; }
}
.panel {
  background: #0a0a0a;
  border: 4px ridge #c8a84b;
  padding: 12px 16px;
  margin: 10px auto;
  max-width: 640px;
  box-shadow: 0 0 18px #1a1400;
}
.counter {
  display: inline-block;
  background: #111;
  border: 2px inset #444;
  padding: 2px 6px;
  font-family: "Courier New", Courier, monospace;
  color: #0f0;
  letter-spacing: 3px;
  font-size: 16px;
}
nav ul, .navlist {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.navlist li { margin: 7px 0; }
.navlist a {
  display: block;
  padding: 4px 6px;
  text-decoration: none;
  border: 2px outset #355;
  background: #031a08;
}
.navlist a:hover {
  border-style: inset;
  background: #0a3;
  color: #000;
}
table.midi {
  width: 100%;
  border-collapse: collapse;
  background: #050505;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
}
table.midi th, table.midi td {
  border: 1px solid #3a3a00;
  padding: 5px 8px;
  text-align: left;
}
table.midi th {
  background: #1a1400;
  color: #ffd24a;
}
table.midi tr:nth-child(even) { background: #0e0e00; }
table.midi th.play, table.midi td.play {
  text-align: center;
  width: 4.2em;
  white-space: nowrap;
}
button.midi-play {
  display: inline-block;
  width: 28px;
  height: 24px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
  background: #1a1400;
  color: #ffd24a;
  border: 2px outset #ca8;
  box-sizing: border-box;
}
button.midi-play:hover { background: #3a2a00; }
button.midi-play.on {
  background: #0a3;
  border-style: inset;
}
.midi-play-icon {
  display: block;
  margin: 4px auto 0 auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #ffd24a;
}
button.midi-play.on .midi-play-icon {
  width: 9px;
  height: 11px;
  margin-top: 4px;
  border: 0;
  background: repeating-linear-gradient(
    90deg,
    #031a08 0 3px,
    transparent 3px 5px
  );
}
.badges { margin-top: 14px; }
.badges img { margin: 3px; vertical-align: middle; }
.tiny { font-size: 11px; color: #8a8; font-family: Geneva, Arial, sans-serif; }
.easter {
  color: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
}
.affiliates img {
  margin: 0 6px;
  vertical-align: middle;
  image-rendering: auto;
}
.gold { color: #ffd24a; }
.new { color: #ff4d4d; font-weight: bold; }
.hero-row {
  overflow: visible;
  max-width: 100%;
  white-space: nowrap;
}
.hero-row img { vertical-align: middle; margin: 0 6px; }
body.main { padding: 8px; overflow-x: hidden; }
body.main img { max-width: 100%; }
.wordmark {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(16px, 5vw, 32px);
  color: #ffd24a;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px #c8a84b, 3px 3px 0 #3a2200;
  vertical-align: middle;
}

/* Banner frame is full window width, so this is safe. Do not restyle
   nav here — the nav frame is only 200px and would match this query. */
@media (max-width: 700px) {
  body.banner .torch { display: none; }
  .hero-row img { width: 32px; height: 32px; margin: 0 4px; }
  .wordmark { letter-spacing: 0.04em; }
  .marquee-wrap { font-size: 11px; }
}

/* Compact nav strip on phones. Must NOT use max-width: 700px — that
   matches the 200px desktop nav iframe and hides the left menu.
   Phone stacks nav as a short full-width pane; desktop nav is 200px
   wide and tall, so this stays off there. */
@media (min-width: 240px) and (max-height: 200px) {
  body.nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    box-sizing: border-box;
    min-height: 100%;
  }
  body.nav .nav-brand,
  body.nav .nav-extra,
  body.nav .nav-footer { display: none; }
  .navlist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin: 0;
  }
  .navlist li { margin: 0; }
  .navlist a {
    display: block;
    text-align: center;
    font-size: 13px;
    padding: 8px 10px;
    white-space: nowrap;
    touch-action: manipulation;
  }
  .navlist a img { display: none; }
}

/* Guestbook — GeoCities / Matt's Script Archive, 1995–1999 */
.gb-table { width: 100%; }
.gb-label { width: 140px; vertical-align: top; }
.gb-form input[type="text"],
.gb-form textarea {
  background: #111;
  color: #c8ff9a;
  border: 2px inset #444;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  padding: 3px;
  max-width: 100%;
  box-sizing: border-box;
}
.gb-form input[type="submit"],
.gb-form input[type="reset"] {
  font-family: Geneva, Arial, sans-serif;
  font-size: 13px;
  padding: 4px 10px;
  background: #c8a84b;
  color: #000;
  border: 2px outset #edc;
  font-weight: bold;
  cursor: pointer;
}
.gb-form input[type="submit"]:active,
.gb-form input[type="reset"]:active { border-style: inset; }
.gb-entry { margin: 12px 0 18px; }
.gb-comments {
  white-space: pre-wrap;
  margin: 6px 0 10px;
  font-family: Geneva, Arial, sans-serif;
}
.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.icekey-row { text-align: center; margin: 4px 0; }
.icekey-row img { vertical-align: middle; margin: 0 8px; }
.ornament {
  text-align: center;
  margin: 4px 0 2px;
  line-height: 0;
}
.ornament img { vertical-align: middle; }
video.clip {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 10px auto;
  background: #000;
  border: 3px ridge #c8a84b;
}
img.shot {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  border: 3px ridge #c8a84b;
  cursor: zoom-in;
}
.caption { text-align: center; margin-top: -4px; }
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
  overflow: auto;
}
.lightbox.is-on { display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img {
  max-width: 96%;
  max-height: 96%;
  width: auto;
  height: auto;
  border: 3px ridge #c8a84b;
  image-rendering: auto;
  cursor: zoom-out;
}

/* Top Games — N64 ranking. Grey-violet plastic, not the gold MIDI panels. */
.panel.rank-panel {
  max-width: 720px;
  background: #0b0b14;
  border-color: #6a6a88;
  box-shadow: 0 0 18px #101018;
}
table.rank {
  width: 100%;
  border-collapse: collapse;
}
table.rank td {
  vertical-align: middle;
  padding: 10px 8px;
  border-bottom: 1px solid #2a2a40;
}
table.rank tr:last-child td { border-bottom: 0; }
.rank-num {
  width: 48px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 28px;
  color: #6a6a82;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.rank-num.gold { color: #ffd24a; }
.rank-num.silver { color: #c8c8d8; }
.rank-num.bronze { color: #c88848; }
.rank-box {
  width: 168px;
}
.rank-box img {
  display: block;
  width: 160px;
  height: auto;
  border: 3px ridge #6a6a88;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}
table.rank tr.rank-1 .rank-box img {
  border-color: #c8a84b;
  box-shadow: 0 0 12px #c8a84b;
}
.rank-meta b {
  color: #ffd24a;
  font-size: 16px;
}
.rank-meta .tiny { display: block; margin-top: 2px; }
@media (max-width: 700px) {
  .rank-box { width: 120px; }
  .rank-box img { width: 112px; }
  .rank-num { font-size: 22px; width: 36px; }
}
