/* FreeFrags styles.css — one shared stylesheet, system fonts only, zero assets. */

/* ===== 1. TOKENS ===== */
:root {
  --silver:  #c0c0c0;
  --navy:    #000080;
  --teal:    #008080;
  --purple:  #800080;
  --light3d: #ffffff;
  --mid3d:   #808080;
  --dark3d:  #404040;
  --ad-bg:   #ffffcc;
  --link:    #0000ee;
  --visited: #551a8b;
  --font-serif: "Times New Roman", Times, serif;
  --font-ui:    Verdana, Geneva, Tahoma, sans-serif;
  --font-comic: "Comic Sans MS", "Comic Sans", cursive;
  --font-mono:  "Courier New", Courier, monospace;
  --site-max: 1024px; /* XGA — the canonical 4:3 monitor */
}

/* ===== 2. RESET (minimal — this is a 90s site) ===== */
* { box-sizing: border-box; }
body { margin: 0; }

/* ===== 3. LAYOUT — 4:3 column pillarboxed over the wallpaper ===== */
body {
  background-color: #3a6ea5; /* flat XP-bliss-blue fallback */
  /* BLISS-SWAP: when the real wallpaper arrives, uncomment this one line.
     CSS URLs resolve relative to THIS file, so it works on every page
     at any depth (root or game folders):
     background-image: url("../assets/bliss.jpg"); */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* wallpaper stays put while the column scrolls */
  color: #000;
  font: 15px/1.5 var(--font-serif);
}

.main { /* the 4:3 column — class name preserved from the original index.html */
  width: min(100%, calc(100vh * 4 / 3), var(--site-max));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--silver);
  border-left: 2px solid var(--dark3d);
  border-right: 2px solid var(--dark3d);
  box-shadow: 0 0 24px rgba(0, 0, 0, .5); /* CRT-bezel shadow over the wallpaper */
  padding: 10px 14px;
}

/* ===== 4. BEVELS — the classic two-tone 3D border ===== */
.bevel-up   { border: 2px solid; border-color: var(--light3d) var(--dark3d) var(--dark3d) var(--light3d); }
.bevel-down { border: 2px solid; border-color: var(--dark3d) var(--light3d) var(--light3d) var(--dark3d); }

/* ===== 5. BUTTONS ===== */
.btn { /* XP glossy button: thin border, top-light gradient, rounded */
  display: inline-block;
  background: linear-gradient(to bottom, #ffffff, #e8e8e8 45%, #c8c8c8);
  border: 1px solid var(--mid3d);
  border-radius: 4px;
  color: #000;
  font: bold 12px var(--font-ui);
  padding: 3px 12px;
  text-decoration: none;
  text-shadow: 0 1px 0 #fff;
}
.btn:active {
  background: linear-gradient(to bottom, #c8c8c8, #e8e8e8);
  padding: 4px 11px 2px 13px; /* classic 1px press shift */
}

/* ===== 6. HEADING / NAV — Win95 title bar ===== */
.heading { /* XP Luna-style title bar: blue gloss over the old navy */
  background: linear-gradient(to bottom, #4a7bd4, #1a3fa0 55%, #12337e);
  color: #fff;
  font: bold 12px var(--font-ui);
  padding: 4px 8px;
  margin-bottom: 10px;
  border-radius: 6px;
}
.heading .wordmark {
  font: bold 18px var(--font-comic);
  color: #ffffcc;
  letter-spacing: 1px;
  margin-right: 14px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .6);
}
.heading ul { display: inline; list-style: none; margin: 0; padding: 0; }
.heading li { display: inline-block; margin: 0 2px; }
.heading a { color: #ffffcc; text-decoration: none; padding: 2px 4px; }
.heading a:visited { color: #ffffcc; } /* nav must never go purple */
.heading a:hover { background: var(--teal); }

/* ===== 7. TYPOGRAPHY ===== */
a { color: var(--link); cursor: pointer; } /* pointer on links = authentic 90s */
a:visited { color: var(--visited); }
h1 { font: bold 22px var(--font-comic); color: var(--navy); margin: 10px 0 6px; }
h2 { font: bold 16px var(--font-ui); color: var(--teal); margin: 14px 0 6px; }
p { margin: 0 0 10px; }
code {
  font: 13px var(--font-mono);
  background: #fff;
  border: 1px solid var(--mid3d);
  padding: 0 3px;
}
.rainbow-hr {
  border: 0;
  height: 6px;
  margin: 14px 0;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
}
.box { background: #fff; padding: 8px 10px; margin: 10px 0; border-radius: 6px; }

/* ===== 8. ADS ===== */
/* Swap these placeholder boxes for a real ad network embed later. */
.ad { margin: 10px 0; }
.ad-caption {
  font: 9px var(--font-ui);
  color: var(--mid3d);
  text-align: center;
  margin-bottom: 2px;
}
.ad-banner {
  width: 468px;
  max-width: 100%;
  height: 60px;
  margin: 0 auto;
  background: var(--ad-bg);
  border: 1px solid var(--mid3d);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: bold 13px var(--font-ui);
  color: var(--mid3d);
}
.ad-skyscraper {
  width: 120px;
  height: 600px;
  float: right;
  margin: 0 0 10px 10px;
  background: var(--ad-bg);
  border: 1px solid var(--mid3d);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: bold 12px var(--font-ui);
  color: var(--mid3d);
}

/* ===== 9. KITSCH (zero-asset, pure CSS) ===== */
/* CSS marquee: the text is duplicated in the HTML so the loop is seamless. */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: #000;
  color: #00ff00;
  font: bold 13px var(--font-mono);
  padding: 3px 0;
  margin-bottom: 10px;
  border-radius: 4px;
}
.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-left 12s linear infinite;
}
@keyframes scroll-left { to { transform: translateX(-50%); } }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.construction {
  background: repeating-linear-gradient(45deg, #ffcc00 0 12px, #000 12px 24px);
  border: 2px solid #000;
  text-align: center;
  padding: 4px;
  margin: 12px 0;
}
.construction-label {
  display: inline-block;
  background: #000;
  color: #fff;
  font: bold 12px var(--font-ui);
  letter-spacing: 2px;
  padding: 2px 10px;
}

.counter {
  display: inline-block;
  background: #000;
  color: #00ff00;
  font: bold 14px var(--font-mono);
  letter-spacing: 2px;
  padding: 2px 8px;
}
/* COUNTER-SWAP: static number for now; point this at a real visitor
   counter script later. */

/* ===== 10. PER-PAGE CURSORS ===== */
/* CURSOR-SWAP: when real .cur/.png files exist, each rule becomes e.g.
   cursor: url("../assets/cursors/crosshair.cur"), crosshair;
   (one line per class — CSS URLs resolve from THIS file, so every page
   at any depth gets the right path for free) */
body.cursor-crosshair,
body.cursor-crosshair a,
body.cursor-crosshair button,
body.cursor-crosshair input,
body.cursor-crosshair textarea { cursor: crosshair; }
body.cursor-help,
body.cursor-help a,
body.cursor-help button,
body.cursor-help input,
body.cursor-help textarea { cursor: help; }
/* body.cursor-arrow: default pointer — the future home of the Fistful of
   Frags revolver cursor. */

/* ===== 11. GUESTBOOK ===== */
.gb-form label {
  display: block;
  font: bold 12px var(--font-ui);
  margin: 8px 0 2px;
}
.gb-form input[type="text"],
.gb-form textarea {
  display: block;
  width: 100%;
  max-width: 480px;
  border: 2px solid;
  border-color: var(--dark3d) var(--light3d) var(--light3d) var(--dark3d); /* sunken */
  background: #fff;
  font: 13px var(--font-ui);
  padding: 3px 4px;
}
.gb-list { list-style: none; margin: 0; padding: 0; }
.gb-entry { background: #fff; padding: 6px 10px; margin-bottom: 8px; border-radius: 6px; }
.gb-entry .gb-name { font-weight: bold; color: var(--navy); }
.gb-entry .gb-time { font: 10px var(--font-mono); color: var(--mid3d); }
.gb-entry p { margin: 4px 0 0; }

/* ===== 12. SERVER INFO TABLE (game pages) ===== */
.serverinfo { border-collapse: collapse; margin: 10px 0; }
.serverinfo th {
  background: var(--accent, var(--navy));
  color: #fff;
  font: bold 12px var(--font-ui);
  text-align: left;
  padding: 4px 8px;
  border: 1px solid var(--mid3d);
}
.serverinfo td {
  background: #fff;
  font: 13px var(--font-ui);
  padding: 4px 8px;
  border: 1px solid var(--mid3d);
}
.serverinfo tr:nth-child(even) td { background: #e8e8e8; }

/* ===== 13. GAME TITLE BANNER ===== */
.game-title { /* per-game accent banner (body.game-* sets --accent, §16) */
  background: linear-gradient(to bottom, #7fb3f0, var(--accent, var(--navy)) 50%, var(--accent, var(--navy)));
  color: #fff;
  font: bold 16px var(--font-ui);
  padding: 5px 10px;
  margin: 0 0 6px;
  border-radius: 6px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4);
}
.tagline { font-style: italic; color: var(--dark3d); }

/* ===== 14. FOOTER ===== */
.footer {
  margin-top: 20px;
  padding-top: 6px;
  border-top: 1px solid var(--mid3d);
  font: 11px var(--font-ui);
  color: var(--dark3d);
  text-align: center;
}

/* ===== 16. GAME PAGES — per-game accents + spots ===== */
/* Each game page sets <body class="game-<slug>">; add a matching
   --accent rule here when you add a new game. */
body.game-ricochet { --accent: #1667b8; } /* Tron blue */
body.game-cs16     { --accent: #b07514; } /* CS orange */
body.game-fistful  { --accent: #7a4a21; } /* western leather */

/* .spot = a clearly-marked placeholder for future media (logo art, etc.) */
.spot {
  border: 2px dashed var(--mid3d);
  border-radius: 6px;
  background: rgba(255, 255, 255, .4);
  color: var(--dark3d);
  font: bold 11px var(--font-ui);
  letter-spacing: 1px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-logo { width: 400px; max-width: 100%; margin: 8px auto; text-align: center; }

/* two-column row: scoreboard | events */
.layout { width: 100%; border-collapse: collapse; }
.layout-cell { width: 50%; vertical-align: top; padding: 0 8px 0 0; }

/* SCOREBOARD-SWAP: static demo rows until live server stats exist */
.scoreboard { border-collapse: collapse; width: 100%; }
.scoreboard th {
  background: var(--accent, var(--navy));
  color: #fff;
  font: bold 11px var(--font-ui);
  text-align: left;
  padding: 3px 6px;
  border: 1px solid var(--mid3d);
}
.scoreboard td {
  background: #fff;
  font: 12px var(--font-mono);
  padding: 3px 6px;
  border: 1px solid var(--mid3d);
}

.events { list-style: none; margin: 0; padding: 0; }
.events li {
  background: #fff;
  border: 1px solid var(--mid3d);
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.event-date {
  display: inline-block;
  font: bold 10px var(--font-mono);
  color: #fff;
  background: var(--accent, var(--navy));
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 6px;
}

/* ===== 17. STEAM DATA (filled by js/steam.js via /api/* proxies) ===== */
.game-logo img { width: 100%; display: block; border-radius: 6px; }
.steam-box {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--mid3d);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 10px 0;
}
.steam-box h2 { margin-top: 0; }
.steam-shots { margin: 6px 0; }
.steam-shots a { margin-right: 6px; }
.steam-shots img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--mid3d);
  border-radius: 4px;
}
.steam-news { list-style: none; margin: 0; padding: 0; }
.steam-news li { font-size: 13px; padding: 2px 0; }
.steam-news .news-date { font: 10px var(--font-mono); color: var(--mid3d); margin-left: 6px; }
.steam-note { font: 10px var(--font-ui); color: var(--mid3d); margin-top: 4px; }

/* ===== 15. ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .blink { animation: none; }
}
