/* Vice City Stories — shared styles (every page) */
/* ---- page shell ---- */
#site {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 12px 30px;
  overflow: auto;
  z-index: 20;
  background: radial-gradient(ellipse at 50% 20%, #3a0f66, #12051f 60%, #05010a);
  color: #fff;
  font-family: monospace;
}

#hdr {
  margin-bottom: -12px;
  position: relative;
  width: min(1040px, 96vw);
  height: min(200px, 34vw);
  min-height: 130px;
  flex: none;
  overflow: hidden;
}
#hdrc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: saturate(0.95) brightness(1.02);
}
#rbg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
#hdr img {
  position: absolute !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 88%;
  width: auto !important;
  margin: 0 !important;
  mix-blend-mode: normal !important;
  filter: saturate(1.05) drop-shadow(0 0 10px rgba(255, 150, 200, 0.4));
}
#trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}
#gameFrame {
  width: min(1040px, 96vw);
  height: calc(min(1040px, 96vw) * 0.53 + 40px);
  flex: none;
  border: 0;
  background: #1a0b2e;
  display: block;
}
@media (pointer: coarse) {
  #gameFrame {
    height: calc(min(1040px, 96vw) * 0.53 + 190px);
  }
}
/* ---- top navigation ---- */
#nav {
  width: min(1040px, 96vw);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px 26px;
  padding: 14px 22px;
  flex: none;
  background: #07030f;
  border: 0;
  border-top: 3px solid var(--nc, #27e8ff);
  border-bottom: 2px solid var(--nc, #27e8ff);
  border-radius: 0;
  box-shadow: 0 0 16px var(--nc, #27e8ff);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.nb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: pointer;
  touch-action: manipulation;
  background: none;
  border: 0;
  padding: 0;
  color: #fff;
  font-family: "Courier New", monospace;
  text-decoration: none;
}
.nb span.lb {
  position: relative;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.06em;
  padding: 6px 2px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--c);
  text-shadow: 0 0 8px var(--glow);
  transition: all 0.15s;
}
.nb:hover span.lb,
.nb.on span.lb {
  color: var(--c);
  filter: brightness(1.25);
  text-shadow: 0 0 12px var(--glow);
}
.nb:active span.lb {
  transform: scale(0.96);
}
.nb.on span.lb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--c);
  box-shadow: 0 0 8px var(--glow);
}
/* ALLOWLIST call-to-action button */
.nb[data-p="allow"] {
  margin-left: auto;
  order: 1;
}
.nb[data-p="allow"] span.lb {
  padding: 10px 16px;
  background: var(--c);
  color: #07030f;
  border: 2px solid rgba(255, 255, 255, 0.55);
  text-shadow: none;
  box-shadow:
    4px 4px 0 #000,
    0 0 14px var(--glow);
}
.nb[data-p="allow"] span.lb::before {
  content: "▮ ";
  color: #07030f;
}
.nb[data-p="allow"]:hover span.lb {
  background: #ff3d8b;
  color: #07030f;
}
.nb[data-p="allow"].on span.lb {
  color: #07030f;
}
.nb[data-p="allow"]:active span.lb {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #000;
}
.nb[data-p="allow"].on span.lb::after {
  display: none;
}
@media (max-width: 600px) {
  #nav {
    gap: 4px 14px;
  }
  .nb[data-p="allow"] {
    margin-left: 0;
  }
  .nb span.lb {
    font-size: 13px;
  }
}
/* round profile button */
#avbtn {
  position: relative;
  order: 2;
  flex: none;
  margin-left: -8px;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid #27e8ff;
  background: #050108;
  overflow: hidden;
  box-shadow:
    0 0 14px #27e8ff,
    inset 0 0 8px rgba(39, 232, 255, 0.5);
  cursor: pointer;
  display: block;
  touch-action: manipulation;
}
#avbtn img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
#avbtn:hover {
  box-shadow:
    0 0 22px #ff2d95,
    inset 0 0 10px rgba(255, 45, 149, 0.6);
  border-color: #ff2d95;
}
#avbtn.in {
  border-color: #2dff7a;
  box-shadow:
    0 0 14px #2dff7a,
    inset 0 0 8px rgba(45, 255, 122, 0.5);
}
#avname {
  order: 2;
  flex: none;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font:
    9px "Press Start 2P",
    "Courier New",
    monospace;
  color: #2dff7a;
  text-shadow: 0 0 8px #2dff7a;
  margin-left: -14px;
}
#avname:empty {
  display: none;
}

/* ---- LED promo card (home) ---- */
.led {
  position: relative;
  overflow: hidden;
  width: min(470px, 100%);
  padding: 20px 22px 22px;
  background: #0b0418;
  border: 2px solid #ff1a75;
  box-shadow:
    0 0 22px #ff1a75,
    inset 0 0 22px rgba(255, 26, 117, 0.25);
  animation: ledp 2.4s ease-in-out infinite;
}
@keyframes ledp {
  50% {
    box-shadow:
      0 0 36px #ff1a75,
      inset 0 0 30px rgba(255, 26, 117, 0.4);
  }
}
.led::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 80, 60, 0.55), rgba(255, 26, 117, 0) 70%);
  pointer-events: none;
}
.led .tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #27e8ff;
  border: 1px solid #27e8ff;
  padding: 4px 9px;
  text-shadow: 0 0 8px #27e8ff;
  box-shadow: 0 0 8px #27e8ff;
}
.led h3 em {
  font-style: normal;
  color: #ff1a75;
  text-shadow: 0 0 12px #ff1a75;
}
.led p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #d9c9f0;
}
.led .st {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.led .st div {
  border: 1px solid #3b2f54;
  padding: 8px 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.led .st small {
  display: block;
  font-size: 10px;
  margin-bottom: 3px;
}
.led .st b {
  font-size: 13px;
}
.led .bt {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.led .bt .abtn {
  font-size: 11px;
  padding: 10px 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ledrow {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
@keyframes blk {
  50% {
    opacity: 0.3;
  }
}
/* ---- window / content components ---- */
#pageWrap {
  width: min(1040px, 96vw);
  flex: none;
}
.win {
  position: relative;
  border: 2px solid var(--wc, #27e8ff);
  background: rgba(18, 5, 31, 0.92);
  box-shadow:
    0 0 22px var(--wc, #27e8ff),
    inset 0 0 22px rgba(0, 0, 0, 0.6);
  font-family: "Courier New", monospace;
  color: #ffe9f5;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}
.wbar {
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: linear-gradient(90deg, var(--wc, #27e8ff), #7a2bff);
  color: #10061c;
  font-weight: bold;
  letter-spacing: 0.2em;
  font-size: 13px;
}
.wbar .dots i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  background: #10061c;
  opacity: 0.6;
}
#pageBody {
  padding: 22px 22px 26px;
  min-height: 300px;
  line-height: 1.7;
  font-size: 14px;
}
#pfade {
  position: absolute;
  left: 0;
  top: 34px;
  pointer-events: none;
  image-rendering: pixelated;
}
.win h2 {
  font-size: 17px !important;
  line-height: 1.5;
  letter-spacing: 0.04em !important;
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow:
    0 0 12px var(--wc, #27e8ff),
    2px 2px 0 #ff2d95;
}
.win h3 {
  font-size: 11px !important;
  line-height: 1.6;
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--wc, #27e8ff);
}
.motto {
  font-size: 11px !important;
  line-height: 1.8;
  color: #ffd23c;
  text-shadow: 0 0 10px #ffa51f;
  margin: 6px 0 18px;
  font-size: 15px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 12px 0;
}
.card {
  border: 2px solid var(--cc, #ff2d95);
  padding: 14px 16px;
  background: rgba(10, 3, 20, 0.7);
  box-shadow:
    0 0 14px var(--cc, #ff2d95),
    inset 0 0 12px rgba(0, 0, 0, 0.5);
}
.card h3 {
  color: var(--cc, #ff2d95);
  text-shadow: 0 0 8px var(--cc, #ff2d95);
}
.card .dt {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #9a85b8;
  margin-bottom: 4px;
}
.ipbox {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 2px dashed #27e8ff;
  background: #0a0314;
}
.ipbox b {
  color: #27e8ff;
  letter-spacing: 0.15em;
}
.ipbox code {
  flex: 1;
  min-width: 140px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.1em;
}
.abtn {
  font-size: 10px !important;
  letter-spacing: 0.04em !important;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 0.14em;
  font-size: 13px;
  color: #10061c;
  background: var(--c, #27e8ff);
  border: 0;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.6),
    0 0 14px var(--c, #27e8ff);
  text-decoration: none;
  display: inline-block;
  touch-action: manipulation;
}
.abtn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.6),
    0 0 20px var(--c, #27e8ff);
}
.win form {
  display: grid;
  gap: 14px;
  max-width: 640px;
}
.win label {
  font-size: 9px !important;
  line-height: 1.7;
  display: grid;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #27e8ff;
}
.win input[type="text"],
.win input[type="number"],
.win input[type="password"],
.win input[type="email"],
.win textarea {
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: #fff;
  background: #0a0314;
  border: 2px solid #3b2f54;
  padding: 10px 12px;
  outline: none;
  border-radius: 0;
  width: 100%;
}
.win input:focus,
.win textarea:focus {
  border-color: #2dff7a;
  box-shadow: 0 0 12px #2dff7a;
}
.win textarea {
  min-height: 96px;
  resize: vertical;
}
.chk {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px;
  color: #ffe9f5 !important;
  letter-spacing: 0.04em !important;
}
.msg {
  padding: 12px 14px;
  border: 2px solid;
  font-size: 13px;
}
.msg.ok {
  border-color: #2dff7a;
  color: #2dff7a;
  box-shadow: 0 0 12px #2dff7a;
}
.msg.err {
  border-color: #ff2d55;
  color: #ff7a8e;
  box-shadow: 0 0 12px #ff2d55;
}
ol.rules {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: r;
  display: grid;
  gap: 12px;
}
ol.rules li {
  counter-increment: r;
  border-left: 4px solid #ff2d55;
  padding: 6px 12px;
  background: rgba(10, 3, 20, 0.6);
}
ol.rules li::before {
  content: counter(r, decimal-leading-zero) "  ";
  color: #ff2d55;
  font-weight: bold;
  letter-spacing: 0.1em;
}
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
#flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}
.win .led h3 {
  font-size: 22px;
  line-height: 1.25;
  margin: 12px 0 8px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  font-size: 14px !important;
}
.nb span.lb,
.wbar,
.win h2,
.win h3,
.abtn,
.led .tag,
.led .st small,
.ipbox b,
.mbox h3,
.mbox .sub,
.win label,
.motto {
  font-family: "Press Start 2P", "Courier New", monospace !important;
}
/* ---- modal dialogs (login, allowlist popup, console) ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 1, 10, 0.78);
  opacity: 0;
  transition: opacity 0.25s;
}
.modal.show {
  opacity: 1;
}
.modal .mbox {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 26px 26px 24px;
  background: #0b0418;
  border: 2px solid #ff1a75;
  font-family: "Courier New", monospace;
  color: #ffe9f5;
  box-shadow:
    0 0 40px #ff1a75,
    inset 0 0 30px rgba(255, 26, 117, 0.3);
  transform: scale(0.3) rotate(-4deg);
  opacity: 0;
}
.modal.show .mbox {
  animation: mpop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}
@keyframes mpop {
  0% {
    transform: scale(0.3) rotate(-4deg);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
.modal .mbox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px);
}
.modal .mbox h3 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 0 12px #ff1a75,
    2px 2px 0 #27e8ff;
}
.modal .mbox .sub {
  color: #ffd23c;
  letter-spacing: 0.18em;
  font-size: 11px;
  margin-bottom: 14px;
  text-shadow: 0 0 8px #ffa51f;
  animation: blk 1s steps(2) infinite;
}
.modal .mbox p {
  font-size: 13.5px;
  line-height: 1.7;
  color: #e6d6f7;
  margin: 0 0 12px;
}
.modal .mbox ol {
  margin: 0 0 18px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #c9f6ff;
}
.modal .mbox .bt {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mclose {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 2;
  background: none;
  border: 0;
  color: #27e8ff;
  font: bold 22px "Courier New";
  cursor: pointer;
  text-shadow: 0 0 8px #27e8ff;
}
#accbox {
  --wc: #27e8ff;
}
#accbox {
  border-color: #27e8ff !important;
  box-shadow:
    0 0 40px #27e8ff,
    inset 0 0 30px rgba(39, 232, 255, 0.25) !important;
  width: min(420px, 100%) !important;
}
#accbox h3 {
  font-size: 18px !important;
  text-shadow:
    0 0 12px #27e8ff,
    2px 2px 0 #ff2d95 !important;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}
.tabs button {
  flex: 1;
  font:
    10px "Press Start 2P",
    "Courier New",
    monospace;
  padding: 10px 6px;
  background: #0b0418;
  color: #9a85b8;
  border: 2px solid #3b2f54;
  cursor: pointer;
}
.tabs button.on {
  color: #27e8ff;
  border-color: #27e8ff;
  box-shadow: 0 0 10px #27e8ff;
}
/* ---- account window (logged-in view) ---- */
.accme {
  margin: 6px 0 10px;
}
.accn {
  font:
    16px "Press Start 2P",
    "Courier New",
    monospace;
  color: #fff;
  text-shadow: 0 0 10px #27e8ff;
  word-break: break-all;
  line-height: 1.5;
}
.accr {
  margin-top: 8px;
  font:
    10px "Press Start 2P",
    "Courier New",
    monospace;
  color: #2dff7a;
  text-shadow: 0 0 8px #2dff7a;
}
.accinfo {
  color: #c9a9e6;
  font-size: 12px;
  margin: 0 0 16px;
}
#accmode {
  margin-top: 14px;
  color: #9a85b8;
  font-size: 10px;
  letter-spacing: 0.06em;
}
/* placeholder colour while the pixel page-transition is still starting */
#pfade {
  width: 100%;
  height: calc(100% - 34px);
  background: #12051f;
}

/* logo shine on hover: a white copy of the logo, revealed only through a moving band */
@property --sh {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -20%;
}
#hdr img.shine {
  pointer-events: none;
  filter: brightness(0) invert(1) !important;
  opacity: 0;
  --sh: -20%;
  -webkit-mask-image: linear-gradient(105deg, transparent calc(var(--sh) - 14%), #000 var(--sh), transparent calc(var(--sh) + 14%));
  mask-image: linear-gradient(105deg, transparent calc(var(--sh) - 14%), #000 var(--sh), transparent calc(var(--sh) + 14%));
}
#hdr:hover img.shine {
  animation: logoshine 1.1s ease-out;
}
@keyframes logoshine {
  0% { --sh: -20%; opacity: 1; }
  95% { opacity: 1; }
  100% { --sh: 120%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #hdr:hover img.shine { animation: none; }
}

/* ============================================================
   ARCADE NAV — retro game-menu buttons (overrides the plain links above)
   ============================================================ */
#nav {
  position: relative;
  gap: 12px 12px;
  padding: 16px 18px 14px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #160830, #07030f 70%);
  border-top: 0;
  border-bottom: 3px solid #000;
  box-shadow:
    0 0 18px var(--nc, #27e8ff),
    inset 0 0 0 2px var(--nc, #27e8ff),
    inset 0 -6px 0 rgba(0, 0, 0, 0.45);
}
/* moving neon strip on top, like an arcade marquee */
#nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 4px;
  background: linear-gradient(90deg, #ff2d95, #ffa51f, #ffd23c, #2dff7a, #27e8ff, #7b8bff, #ff2d95);
  background-size: 200% 100%;
  animation: navstrip 4s linear infinite;
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.8);
}
@keyframes navstrip {
  to {
    background-position: 200% 0;
  }
}
.nb span.lb {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 10px 12px 9px;
  color: var(--c);
  background: rgba(5, 1, 10, 0.75);
  border: 2px solid var(--c);
  box-shadow:
    4px 4px 0 #000,
    inset 0 0 0 2px rgba(0, 0, 0, 0.6),
    inset 0 -3px 0 rgba(255, 255, 255, 0.08);
  text-shadow: 0 0 8px var(--glow);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    background 0.12s,
    color 0.12s;
}
.nb:hover span.lb,
.nb:focus-visible span.lb,
.nb.on span.lb {
  color: #07030f;
  background: var(--c);
  filter: none;
  text-shadow: none;
  transform: translate(-2px, -2px);
  box-shadow:
    6px 6px 0 #000,
    0 0 18px var(--glow),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.nb:focus-visible {
  outline: none;
}
.nb:active span.lb {
  transform: translate(3px, 3px);
  box-shadow:
    1px 1px 0 #000,
    0 0 10px var(--glow);
}
/* game-menu selector arrow on the current page */
.nb.on span.lb::before {
  content: "▶ ";
  animation: blk 0.8s steps(2) infinite;
}
.nb.on span.lb::after {
  display: none;
}
@media (max-width: 600px) {
  #nav {
    gap: 10px 8px;
    padding: 14px 10px 12px;
  }
  .nb span.lb {
    font-size: 9px;
    padding: 9px 8px 8px;
  }
}

/* ---- profile / login button ---- */
#avbtn {
  margin-left: auto;
  width: 46px;
  height: 46px;
  color: #27e8ff;
}
#avbtn .avico {
  display: none;
  width: 60%;
  height: 60%;
  margin: 20% auto 0;
}
#avbtn:not(.in) {
  border-color: #ffd23c;
  color: #ffd23c;
  background: #12062a;
  box-shadow:
    0 0 14px #ffd23c,
    inset 0 0 8px rgba(255, 210, 60, 0.4);
  animation: avpulse 1.6s ease-in-out infinite;
}
#avbtn:not(.in) img {
  display: none;
}
#avbtn:not(.in) .avico {
  display: block;
}
@keyframes avpulse {
  50% {
    box-shadow:
      0 0 24px #ffd23c,
      0 0 0 4px rgba(255, 210, 60, 0.25),
      inset 0 0 8px rgba(255, 210, 60, 0.4);
  }
}
#avname {
  margin-left: 2px;
  cursor: pointer;
}
#avname.out {
  display: inline-block !important;
  color: #ffd23c;
  text-shadow: 0 0 8px #ffd23c;
  padding: 7px 8px;
  border: 2px solid #ffd23c;
  background: #07030f;
  box-shadow: 3px 3px 0 #000;
}
#avname.out::before {
  content: "1P ";
  color: #ff2d95;
  text-shadow: 0 0 8px #ff2d95;
}
#avname.out:hover {
  background: #ffd23c;
  color: #07030f;
  text-shadow: none;
}
@media (max-width: 600px) {
  #avname.out {
    display: none !important;
  }
}
