/* ═══════════════════════════════════════════════════════════════════
   ELDEVAR ONLINE — official site
   Retro MMO stylesheet, late-90s/early-00s energy. No JavaScript.
   Pixel art via PixelLab; font: Press Start 2P (OFL, see assets/OFL.txt)
   ═══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Press Start 2P';
  src: url('assets/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 18px 0 40px 0;
  background: #0b0b1e url('assets/bgtile.png') repeat;
  color: #d8d0b8;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  image-rendering: pixelated;
}

.px { font-family: 'Press Start 2P', monospace; }

/* the classic fixed centered column */
#shell {
  width: 800px;
  margin: 0 auto;
}

/* ── banner ── */
#banner {
  position: relative;
  height: 230px;
  background: url('assets/hero_bg.png') center 35% no-repeat;
  background-size: 800px auto;
  border: 3px solid #998866;
  border-bottom: none;
  image-rendering: pixelated;
}
#banner .shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,30,.15), rgba(10,10,30,.55));
}
#banner .title {
  position: absolute; left: 0; right: 0; bottom: 22px;
  text-align: center;
}
#banner .title img { vertical-align: middle; margin-right: 14px; }
#banner h1 {
  display: inline-block; vertical-align: middle;
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 26px;
  color: #ffd76a;
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  letter-spacing: 2px;
}
#banner .tagline {
  margin: 8px 0 0 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #ffe8b0;
  text-shadow: 2px 2px 0 #000;
}

/* ── nav: chunky beveled buttons, like god intended ── */
#nav {
  background: #1c1c34;
  border: 3px solid #998866;
  border-top: 2px solid #665a44;
  padding: 6px;
  text-align: center;
}
#nav a {
  display: inline-block;
  margin: 0 3px;
  padding: 7px 16px 6px 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #ffd76a;
  text-decoration: none;
  background: #2a2214;
  border: 3px outset #b09040;
}
#nav a:hover { background: #403314; color: #ffe8b0; }
#nav a:active { border-style: inset; }

/* ── main layout table ── */
#main {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #131326;
  border: 3px solid #998866;
  border-top: none;
}
#main td { vertical-align: top; }
td.newscol  { width: 508px; padding: 16px 14px 22px 18px; }
td.sidecol  { width: 292px; padding: 16px 16px 22px 6px; }

/* ── panels (pixel border-image with graceful fallback) ── */
.panel {
  border: 12px solid #7a6a4a;
  border-image: url('assets/panel.png') 12 fill / 12px stretch;
  padding: 8px 10px;
  margin-bottom: 16px;
  background: #1b1b32; /* fallback + shows through panel transparency */
}
.panel h2, .panel h3 {
  margin: 0 0 10px 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #ffd76a;
  text-shadow: 2px 2px 0 #000;
}
.panel h3 { font-size: 10px; }

.ribbonhead { position: relative; text-align: center; margin: 0 0 6px 0; }
.ribbonhead img { image-rendering: pixelated; }
.ribbonhead .ribbontext {
  position: absolute; left: 0; right: 0; top: 13px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px; color: #3a2408; text-align: center;
}

/* news posts */
.post { margin: 0 0 16px 0; }
.post .date {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; color: #8a84a8;
}
.post .ptitle {
  font-weight: bold; color: #ffe8b0; font-size: 14px;
  margin: 2px 0 4px 0;
}
.post p { margin: 0; color: #c9c2ac; }

.divider { text-align: center; margin: 6px 0 14px 0; }
.divider img { image-rendering: pixelated; }

/* NEW! blinker — authentic 90s blink via CSS steps */
.blink {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #ff5a5a;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── the big download button ── */
a.playbtn {
  display: block;
  width: 240px; height: 72px;
  margin: 0 auto;
  background: url('assets/play_plate.png') no-repeat center / 240px 72px;
  text-align: center;
  text-decoration: none;
  image-rendering: pixelated;
}
a.playbtn span {
  display: inline-block;
  margin-top: 26px;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #2b1d05;
}
a.playbtn:hover { filter: brightness(1.12); }
a.playbtn:active { transform: translateY(2px); }

.dlmeta {
  text-align: center;
  font-size: 11px; color: #9a92b8;
  margin-top: 8px;
}

/* status widget (live: fetched from status.eldevaronline.com by inline JS) */
.status { text-align: center; font-family: 'Press Start 2P', monospace; font-size: 9px; line-height: 1.8; }
.status .on { color: #4cff88; animation: blink 2s steps(1) infinite; }
.status .unk { color: #8a84a8; }

.mascot { text-align: center; margin: 4px 0; }
.mascot img { image-rendering: pixelated; }

/* feature table on about page */
table.features { width: 100%; border-collapse: collapse; }
table.features td {
  border: 1px solid #3a3a5a;
  padding: 8px 10px;
  font-size: 12px;
}
table.features td.k {
  width: 150px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: #ffd76a;
  background: #20203a;
}

ul.classlist { columns: 2; margin: 6px 0; padding-left: 22px; }
ul.classlist li { margin-bottom: 3px; }

/* screenshots: photos pinned to the guild notice board. Aged-paper polaroid
   frames with push-pins, tilted a touch; hover straightens them. Sized by the
   frame (percent widths + max-width), so images can never stretch the shell. */
.shotboard { text-align: center; padding: 6px 0 2px 0; }
.shotboard a.polaroid {
  display: inline-block;
  vertical-align: top;
  width: 45%;
  max-width: 45%;
  margin: 10px 1.5%;
  padding: 8px 8px 6px 8px;
  background: #e8dfc8;
  border: 2px solid #b8a888;
  box-shadow: 4px 4px 0 rgba(0,0,0,.45); /* hard-edged shadow, no soft blur */
  transform: rotate(-2deg);
  text-decoration: none;
  position: relative;
}
.shotboard a.polaroid.tilt-r { transform: rotate(1.6deg); }
.shotboard a.polaroid:hover { transform: rotate(0deg); }
.shotboard a.polaroid::before { /* the push-pin */
  content: "";
  position: absolute; top: -7px; left: 50%; margin-left: -6px;
  width: 12px; height: 12px;
  background: #d33a3a;
  border: 2px solid #6e0f0f;
  border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.shotboard img {
  display: block; width: 100%; height: auto;
  border: 1px solid #8a7a5a;
  image-rendering: auto; /* screenshots downscale smooth, not pixelated */
}
.shotboard .cap {
  display: block; margin-top: 6px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; color: #4a3a20;
}

/* lightbox: click a polaroid to view it in-page (the one JS feature on the
   site — arrows/ESC navigate, backdrop click closes, #shot-N deep-links).
   Same aged-paper frame + beveled-button language as the rest of the site. */
.lightbox { display: none; position: fixed; inset: 0; z-index: 50; }
.lightbox.open { display: block; }
.lightbox .lb-backdrop { position: absolute; inset: 0; background: rgba(5,5,18,.88); }
.lightbox .lb-frame {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  max-width: 92vw;
  padding: 10px 10px 8px 10px;
  background: #e8dfc8;
  border: 2px solid #b8a888;
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
}
.lightbox .lb-img {
  display: block; max-width: 100%; max-height: 80vh;
  border: 1px solid #8a7a5a;
  image-rendering: auto;
}
.lightbox .lb-cap {
  display: block; margin-top: 8px; text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px; color: #4a3a20;
}
.lightbox .lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: 'Press Start 2P', monospace; font-size: 14px;
  color: #ffd76a; background: #2a2214;
  border: 3px outset #b09040;
  padding: 12px 14px; cursor: pointer;
}
.lightbox .lb-btn:hover { background: #403314; color: #ffe8b0; }
.lightbox .lb-btn:active { border-style: inset; }
.lightbox .lb-prev { left: 3vw; }
.lightbox .lb-next { right: 3vw; }
.lightbox .lb-close { top: 3vh; right: 3vw; transform: none; }

a { color: #7ec6ff; }
a:visited { color: #b89ce0; }

/* ── footer ── */
#footer {
  margin-top: 0;
  background: #101020;
  border: 3px solid #998866;
  border-top: 2px solid #665a44;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: #77719a;
}
#footer .px8 { font-family: 'Press Start 2P', monospace; font-size: 8px; }
#footer img { vertical-align: middle; image-rendering: pixelated; }
