/* Old-homepage look: twinkling star background, boxes floating on top. */
:root {
  --sky: #000033;
  --star: #ffffff;
  --ink: #ffff00;
  --text: #ffffff;
  --link: #00ffff;
  --panel: #000080;
  --edge: #c0c0c0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.4 "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Times New Roman", serif;
  background-color: var(--sky);
  /* the starfield lives on a fixed layer behind everything (see body::before) */
}

/* Fixed star background: stays put while the page scrolls over it.
   A fixed layer works on phones too, where background-attachment: fixed often doesn't. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--sky) url("deco/stars.gif");
  image-rendering: pixelated;
}

main { max-width: 720px; margin: 0 auto; padding: 16px; }

.center { text-align: center; }
.small { font-size: 13px; }

.banner-head { text-align: center; }
.banner-head .small { margin: 0; color: var(--link); }
h1 {
  margin: 4px 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 48px;
  color: var(--ink);
  text-shadow: 3px 3px 0 #ff00ff;
}
.subtitle { margin: 0; color: #ff99ff; font-weight: bold; }

h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }

hr.rainbow {
  border: 0;
  height: 6px;
  margin: 16px 0;
  background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
}

.uc-bar { max-width: 100%; height: auto; image-rendering: pixelated; }

table.layout { width: 100%; border-spacing: 8px; }
table.layout td { vertical-align: top; width: 50%; }

.panel {
  background: var(--panel);
  border: 3px ridge var(--edge);
  padding: 10px;
  margin: 12px 0;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
}
table.layout .panel { margin: 0; }

label { display: block; margin-bottom: 8px; }
input {
  width: 100%; margin-top: 4px; padding: 4px;
  font: 14px "Courier New", Courier, monospace;
  color: #000; background: #fff; border: 2px inset var(--edge);
}
button {
  font: bold 14px Arial, Helvetica, sans-serif;
  padding: 3px 10px; cursor: pointer;
  color: #000; background: var(--edge); border: 2px outset #fff;
}
button:active { border-style: inset; }

.code {
  font: bold 20px "Courier New", Courier, monospace; letter-spacing: 1px; text-align: center;
  word-break: break-all; color: #000; background: #ffffcc; padding: 8px; border: 2px dashed #ff00ff;
}
.save { border-color: #ff00ff; }

#codes { padding-left: 20px; }
#codes li { margin-bottom: 4px; }
#codes button { font-size: 12px; padding: 0 6px; margin-left: 6px; }

#msg { min-height: 1.4em; font-weight: bold; color: #ff6666; }

.counter-box { margin: 8px 0; }
.counter {
  display: inline-block; margin-top: 4px; padding: 2px 6px;
  font: bold 20px "Courier New", Courier, monospace; letter-spacing: 4px;
  color: #00ff00; background: #000; border: 2px inset var(--edge);
}

table.webring {
  width: 100%; margin: 12px 0; border: 3px ridge var(--edge);
  background: var(--panel); border-collapse: collapse;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
}
table.webring td { padding: 6px; color: var(--link); }
table.webring td:last-child { text-align: right; }

/* ---------- logged-in views ---------- */

a { color: var(--link); }
a:visited { color: #ff99ff; }

.nav { text-align: center; }
.top-bar { text-align: center; font-size: 13px; margin: 0 0 6px; padding: 4px 0; }
.dash h2 { margin-bottom: 6px; }
.dash-list { margin: 0 0 8px; padding-left: 22px; }
.dash-list li { margin-bottom: 3px; }
.dash-cols { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.dash-side { border-left: 2px dashed var(--edge); padding-left: 12px; font-weight: bold; }
.dash-side input { font-weight: normal; }
.dash-side p { margin: 0 0 3px; }
.dash-side .visit { margin-top: 6px; }
.dash-side input { width: 150px; display: block; margin: 4px 0 6px; }
.dash-pic { display: inline-block; vertical-align: middle; margin-left: 4px; }
.dash-pic img.banner { display: block; }
@media (max-width: 560px) {
  .dash-cols { grid-template-columns: 1fr; }
  .dash-side { border-left: 0; border-top: 2px dashed var(--edge); padding: 8px 0 0; }
}
.top-ticker { margin: 0 0 14px; }
.ticker-label { position: relative; z-index: 1; float: left; padding: 0 6px; margin-right: 4px; color: #000; background: #ffff00; }
.collection-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.collection-head h2 { margin: 0; }
.visit { margin-top: 8px; }
.visit input { display: inline-block; width: 140px; }

textarea, select {
  width: 100%; margin-top: 4px; padding: 4px;
  font: 14px "Courier New", Courier, monospace;
  color: #000; background: #fff; border: 2px inset var(--edge);
}

img.banner { display: block; image-rendering: pixelated; border: 2px solid transparent; }
img.rarity-uncommon { border-color: #00ffff; }
img.rarity-rare { border-color: #ffff00; }
img.rarity-ultra { border-color: #ff00ff; outline: 1px solid #ffffff; }
.card.rarity-ultra b, .variant { color: #ff99ff; font-weight: bold; }

.grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; text-decoration: none; }

.pull-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0; }
.card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 196px; padding: 8px; text-align: center;
  background: #000033; border: 3px ridge var(--edge);
}
.card.back {
  height: 120px; justify-content: center;
  font: bold 48px "Times New Roman", serif; color: var(--ink);
  background: repeating-linear-gradient(45deg, #000080 0 8px, #000060 8px 16px);
}
.card.pickable { cursor: pointer; }
.card.chosen {
  border: 4px solid #ffff00;
  background: #000066;
  box-shadow: 0 0 0 3px #ff00ff, 0 0 18px 6px #ffff00;
  animation: glow 0.8s ease-in-out infinite alternate;
}
.card.chosen::before {
  content: "\2605 KEEPING THIS 1 \2605";
  font: bold 13px Arial, Helvetica, sans-serif;
  color: #000; background: #ffff00; padding: 1px 6px; margin-top: -2px;
}
@keyframes glow {
  to { box-shadow: 0 0 0 3px #00ffff, 0 0 28px 10px #ff00ff; }
}
.radio { padding: 3px 6px; border: 2px solid transparent; }
.radio:has(input:checked) { border: 2px dashed #ffff00; background: #000066; }
.card.rarity-rare b { color: var(--ink); }
.bonus-card { justify-content: center; min-height: 120px; background: repeating-linear-gradient(45deg, #330066 0 8px, #220044 8px 16px); border-color: #ff00ff; }
.bonus-card b { color: #ffff00; }
.bonus-star { font-size: 32px; line-height: 1; }
.bonus-head b { color: #ffff00; }
.pull-form { max-width: 420px; margin: 8px auto 0; }
.gift-choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.radio { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.radio input { width: auto; margin: 0; }
.radio img.banner { display: inline-block; }

.sign-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.gift-chosen { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; padding: 4px 6px; border: 2px dashed #ffff00; background: #000066; }
.gift-chosen img.banner { display: inline-block; }
button.mini { font-size: 12px; padding: 0 6px; }
.gift-picker { margin: 8px 0; background: #000033; }
.pick-tile { background: transparent; border: 2px solid transparent; padding: 2px; color: var(--text); cursor: pointer; }
.pick-tile:hover, .pick-tile:focus { border-color: #ffff00; }
h3 { margin: 10px 0 6px; font-size: 15px; color: var(--link); }
.pick-tile.picked { border-color: #ffff00; background: #000066; box-shadow: 0 0 6px #ffff00; }
.pick-tile.busy { opacity: 0.6; cursor: not-allowed; }
.trade-note { border-top-style: solid; }
.trade-note > p:first-child { color: #ffff00; font-weight: bold; }
.tr-item { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; vertical-align: middle; }
.tr-item img.banner { display: inline-block; }
#nav-trades.has-offers { color: #ffff00; font-weight: bold; }
.entry { border-top: 2px dashed var(--edge); padding-top: 6px; margin-top: 8px; }
.entry p { margin: 4px 0; }
.stamp { display: flex; align-items: center; gap: 6px; }
.log { padding-left: 24px; }
.ledger-list { font-size: 14px; padding-left: 32px; }
.ledger-list li { margin-bottom: 6px; overflow-wrap: anywhere; }
.led-meta { font: 12px "Courier New", Courier, monospace; color: #aaaaff; }
.led-meta .hash { font-size: 12px; }
.led-what { line-height: 1.3; }
.hide-bots .from-bot { display: none; }
.bot-toggle { margin: 8px 0 0; }
.bot-toggle label { display: inline; }
.bot-toggle input { width: auto; display: inline; margin: 0 4px 0 0; }
.bot-badge, .bot-note { color: #00ff00; font-family: "Courier New", Courier, monospace; }
.credit { margin: 4px 0; }
.credits { list-style: none; padding: 0; }
.credits li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.credits .credit { display: inline; }
.hash { font-family: "Courier New", Courier, monospace; word-break: break-all; color: #00ff00; }
#ledger-ok.ok, .ok-text { color: #00ff00; }
#ledger-ok.bad, .bad-text { color: #ff6666; }
.danger-head { margin-top: 20px; color: #ff6666; }
#delete-account { color: #fff; background: #990000; border-color: #ff6666; }

/* ---------- homepage, arrange, use box, checker ---------- */
.homepage-link { font-weight: bold; color: var(--ink); }
.home-form { text-align: center; margin: 4px 0 10px; font-size: 14px; }
.home-form input { display: inline-block; width: 240px; max-width: 60%; }
.arrange-bar { margin: 10px 0 0; text-align: right; }
.grid.arranging .tile { cursor: grab; border: 2px dashed #ffff00; padding: 2px; touch-action: none; user-select: none; }
.grid.arranging .tile.dragging { opacity: 0.5; cursor: grabbing; }
.use-box { margin: 10px 0; padding: 8px; border: 2px dashed var(--edge); }
.btn-link { display: inline-block; padding: 3px 10px; color: #000 !important; background: var(--edge); border: 2px outset #fff; text-decoration: none; font: bold 14px Arial, Helvetica, sans-serif; }
.snippet { font-size: 12px; }
.drop { display: block; margin: 10px 0; padding: 18px; text-align: center; border: 3px dashed var(--edge); cursor: pointer; }
.drop.over { border-color: #ffff00; background: #000066; }
.drop input { display: none; }
img.check-pic { display: inline-block; width: 176px; height: 62px; }

/* ---------- guestbook color themes (on the guestbook page's panels) ---------- */
#view-page .panel { background: var(--gb-panel, var(--panel)); color: var(--gb-text, var(--text)); border-color: var(--gb-edge, var(--edge)); }
#view-page h2, #view-page h3 { color: var(--gb-ink, var(--ink)); }
#view-page a { color: var(--gb-link, var(--link)); }
.gb-starry { }
.gb-geo { --gb-panel: #c0c0c0; --gb-text: #000000; --gb-ink: #000080; --gb-link: #0000ee; --gb-edge: #808080; }
.gb-geo .panel { font-family: "Times New Roman", Times, serif; }
.gb-hacker { --gb-panel: #000000; --gb-text: #33ff33; --gb-ink: #00ff00; --gb-link: #00ffaa; --gb-edge: #008800; }
.gb-hacker .panel { font-family: "Courier New", Courier, monospace; }
.gb-bubblegum { --gb-panel: #ff99cc; --gb-text: #4b0033; --gb-ink: #ffffff; --gb-link: #990066; --gb-edge: #ff66b3; }
.gb-ocean { --gb-panel: #006680; --gb-text: #ffffff; --gb-ink: #aaffff; --gb-link: #ffff99; --gb-edge: #66ccff; }
.gb-goth { --gb-panel: #1a0010; --gb-text: #ddccdd; --gb-ink: #ff3355; --gb-link: #b388ff; --gb-edge: #550022; }
.gb-construction { --gb-panel: #ffcc00; --gb-text: #000000; --gb-ink: #000000; --gb-link: #003399; --gb-edge: #000000; }
.gb-construction .panel { border-style: dashed; }
.gb-vapor { --gb-panel: #2d1b4e; --gb-text: #fffb96; --gb-ink: #ff71ce; --gb-link: #01cdfe; --gb-edge: #b967ff; }
.theme-picker { margin-top: 10px; text-align: right; }
.swatch { margin: 2px; font-size: 12px; padding: 2px 6px; border: 2px outset #fff; cursor: pointer; }
.swatch.on { border-style: inset; outline: 2px solid #ffff00; }
.sw-starry { background: #000080; color: #ffff00; }
.sw-geo { background: #c0c0c0; color: #000080; }
.sw-hacker { background: #000; color: #00ff00; }
.sw-bubblegum { background: #ff99cc; color: #4b0033; }
.sw-ocean { background: #006680; color: #aaffff; }
.sw-goth { background: #1a0010; color: #ff3355; }
.sw-construction { background: #ffcc00; color: #000; }
.sw-vapor { background: #2d1b4e; color: #ff71ce; }
/* readable inputs/notes on light themes */
.gb-geo .bot-note, .gb-bubblegum .bot-note, .gb-construction .bot-note { color: #006600; }
.gb-geo .homepage-link, .gb-bubblegum .homepage-link, .gb-construction .homepage-link { color: inherit; }

/* ---------- sets & cool links ---------- */
.set-row { padding: 2px 0; }
.set-row summary { cursor: pointer; }
.set-grid { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px 16px; }
.set-item img.banner { display: block; }
.set-item.missing img { filter: grayscale(1) brightness(0.45); }
.set-badge { color: #ffff00; font-weight: bold; }
.claim-btn { background: #ffff00; }
.secret-hint { font-style: italic; opacity: 0.8; margin: 6px 0 0; }
.links-me { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.links-me img.banner { display: inline-block; }
.link-req { padding: 4px 6px; border: 2px dashed #ffff00; }
.link-tile { position: relative; }
.link-tile .unlink { position: absolute; top: -6px; right: -6px; padding: 0 4px; font-size: 11px; line-height: 14px; }
.no-card { display: inline-block; width: 88px; height: 31px; line-height: 31px; text-align: center; font-size: 11px; border: 1px dashed var(--edge); }
.hot { color: #ffff00; }

/* ---------- Wall of Buttons ---------- */
.wall-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.wall-tile img.banner { display: block; }
.wall-tile:hover img.banner, .wall-tile:hover .mystery-tile { outline: 2px solid #ffff00; }
.mystery-tile { display: block; width: 88px; height: 31px; line-height: 31px; text-align: center; font: bold 22px "Times New Roman", serif;
  color: #ffff00; border: 2px dashed #888; background: repeating-linear-gradient(45deg, #222 0 6px, #111 6px 12px); }
.mystery-tile.big { display: inline-block; width: 176px; height: 62px; line-height: 62px; font-size: 40px; }
.wall-tile.on .mystery-tile { outline: 3px solid #ffff00; }
.lg { display: inline-block; padding: 0 6px; border: 2px solid; margin: 0 2px; }
.lg-common { border-color: transparent; }
.lg-uncommon { border-color: #00ffff; }
.lg-rare { border-color: #ffff00; }
.lg-ultra { border-color: #ff00ff; }
.lg-special { border-color: #ff9900; }
img.rarity-special { border-color: #ff9900; }
.wall-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
#info-win.info-window { width: 100%; max-width: none; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; }
.info-empty { color: #333; font-style: italic; padding: 20px 4px; }
.wall-tile.on img.banner { outline: 3px solid #ffff00; }
.info-window .owners { columns: 3; }
.info-body .hash, .info-body a { overflow-wrap: anywhere; }
.wall-cols > * { min-width: 0; }
.info-body img.banner { max-width: 100%; height: auto; }
@media (max-width: 560px) { .info-window .owners { columns: 2; } }
.info-window .dialog-title { display: flex; justify-content: space-between; align-items: center; }
.win-x { padding: 0 6px; font-size: 12px; line-height: 14px; }
.info-body { overflow-y: auto; padding: 10px 12px; font: 14px/1.4 Arial, Helvetica, sans-serif; }
.info-body p { margin: 4px 0; }
.info-body h3 { color: #000080; margin: 10px 0 4px; }
.info-body a { color: #0000ee; }
.info-body .hash { color: #006600; }
.info-body .bot-badge { color: #007700; }
.info-body .variant { color: #990099; }
.info-body img.banner { display: inline-block; }
.owners { columns: 2; padding-left: 18px; margin: 4px 0; font-size: 13px; }

/* ---------- player pages: pared down ---------- */
.page-only { display: none; }
body.on-page .page-only { display: block; }
body.on-page .site-extra { display: none !important; }
.page-banner { text-align: center; margin: 14px 0; font-size: 28px; color: var(--ink); text-shadow: 2px 2px 0 #ff00ff; }
/* public view: title moves between the rainbows, collection comes before the homepage link */
body.on-page .own-title { display: none; }
body.on-page #view-page > .panel:first-child { display: flex; flex-direction: column; }
body.on-page #view-page > .panel:first-child > * { order: 1; }
body.on-page #view-page > .panel:first-child > .pub-last { order: 2; margin-top: 10px; }

/* ---------- in-game dialog window ---------- */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.dialog-window {
  width: 100%; max-width: 340px;
  background: #c0c0c0; color: #000; border: 3px outset #ffffff;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
  font-family: Arial, Helvetica, sans-serif;
}
.dialog-title { background: #000080; color: #fff; font-weight: bold; padding: 3px 6px; font-size: 14px; }
.dialog-body { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; text-align: center; }
.dialog-body p { margin: 0; }
.dialog-pic img.banner { display: block; }
#dialog-input { width: 100%; }
.dialog-buttons { display: flex; justify-content: center; gap: 10px; margin: 0 0 12px; }

/* ---------- moving bits ---------- */

.marquee {
  overflow: hidden; white-space: nowrap;
  margin: 12px 0 0; padding: 2px 0;
  color: #00ff00; background: #000; border: 2px inset var(--edge);
  font: bold 14px "Courier New", Courier, monospace;
}
.marquee span { display: inline-block; padding-left: 100%; animation: scroll-left 18s linear infinite; }
@keyframes scroll-left { to { transform: translateX(-100%); } }

.ticker {
  overflow: hidden; white-space: nowrap; margin: 0 0 12px; padding: 3px 0;
  color: #ffff00; background: #000000; border: 2px inset var(--edge);
  font: bold 14px "Courier New", Courier, monospace;
}
.ticker span { display: inline-block; padding-left: 100%; animation: scroll-left 40s linear infinite; }

.button-strip { overflow: hidden; border: 3px ridge var(--edge); background: #000; padding: 4px 0; }
.strip-track { display: flex; gap: 6px; width: max-content; animation: strip 30s linear infinite; }
.strip-track img { display: block; image-rendering: pixelated; }
/* 10 buttons x (88px + 6px gap) = one full set */
@keyframes strip { to { transform: translateX(-940px); } }

/* people who ask their system for less motion get a still page */
@media (prefers-reduced-motion: reduce) {
  .marquee span, .strip-track, .card.chosen, .ticker span { animation: none; }
  .ticker { white-space: normal; }
  .ticker span { padding-left: 0; }
  body::before { background-image: none; }
  .marquee span { padding-left: 0; }
}

/* phones: stack the two boxes */
@media (max-width: 560px) {
  table.layout, table.layout tr, table.layout td { display: block; width: 100%; }
  table.layout { border-spacing: 0; }
  table.layout td { margin-bottom: 12px; }
  h1 { font-size: 36px; }
}
