/* mallriot.com -- best viewed in netscape 4 at 800x600 */

* { box-sizing: border-box; }

html {
  background: #000;
}
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #c8c8c8;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  overflow-x: hidden;
  cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpolygon points='2,2 2,16 6,12 9,18 11,17 8,11 14,11' fill='white' stroke='black' stroke-width='1'/%3E%3C/svg%3E") 2 2, auto;
}
body { background: transparent; }

body {
  position: relative;
  min-height: 1180px;
  padding-bottom: 60px;
}

/* ---- BACKGROUND VIDEO ---- */
#bg {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -3;
  /* muted, washed-out, slightly sickly */
  filter: saturate(0.45) hue-rotate(8deg) contrast(1.35) brightness(1.25) blur(0.6px);
  opacity: 0.5;
}
#bg-fallback {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -4;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, #1a0a2e 0%, #000 70%);
}
/* extra distortion: chromatic shift + static noise on top of video */
#bg-distort {
  position: fixed; inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.18;
  mix-blend-mode: overlay;
  animation: noiseshift 0.4s steps(6) infinite;
}
@keyframes noiseshift {
  0%   { background-position: 0 0; }
  20%  { background-position: -40px 17px; }
  40%  { background-position: 27px -33px; }
  60%  { background-position: 11px 9px; }
  80%  { background-position: -19px 22px; }
  100% { background-position: 0 0; }
}
/* warm color wash to push it toward the mall's sickly palette */
#bg-tint {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(180, 30, 110, 0.18), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(20, 120, 180, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.55) 100%);
  mix-blend-mode: multiply;
}
#scanlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0px, rgba(0,0,0,0.18) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
}
#vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99;
  box-shadow: inset 0 0 200px 60px #000;
}

/* ---- TOP CRAWL ---- */
#topcrawl {
  position: relative;
  z-index: 5;
  background: #000080;
  color: #ffff00;
  font-family: "Courier New", monospace;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px ridge #ffff00;
  letter-spacing: 1px;
}

/* ---- LOGO ---- */
#logo-table {
  margin: 30px auto 0;
  position: relative;
  z-index: 4;
}
#logo {
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 84px;
  margin: 0;
  padding: 0;
  text-align: center;
  letter-spacing: -2px;
  text-shadow:
    3px 3px 0 #ff00ff,
    -3px -3px 0 #00ffff,
    0 0 30px #fff;
  transform: rotate(-1.5deg);
}
#logo span { display: inline-block; }
#logo .l1 { color: #ff0000; transform: rotate(-4deg) translateY(-4px); }
#logo .l2 { color: #ff8800; transform: rotate(2deg); }
#logo .l3 { color: #ffff00; transform: rotate(-1deg) translateY(2px); }
#logo .l4 { color: #00ff00; transform: rotate(3deg) translateY(-2px); }
#logo .l5 { color: #00ffff; transform: rotate(-2deg); }
#logo .l6 { color: #0088ff; transform: rotate(4deg) translateY(3px); }
#logo .l7 { color: #ff00ff; transform: rotate(-3deg); }
#logo .l8 { color: #ffffff; transform: rotate(2deg) translateY(-1px); }
#logo sup {
  font-size: 18px;
  color: #aaa;
  font-family: "Courier New", monospace;
  letter-spacing: 0;
  text-shadow: none;
  vertical-align: super;
}
#tagline {
  text-align: center;
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 18px;
  color: #ff66ff;
  margin: 4px 0 0;
  text-shadow: 1px 1px 0 #000;
}
.dim { color: #666; }
.bright { color: #fff; text-shadow: 0 0 6px #ff00ff; }

/* ---- FRAMES (geocities-style) ---- */
.frame {
  background: #1a1a1a;
  border: 3px outset #888;
  padding: 10px;
  position: absolute;
  z-index: 6;
  box-shadow: 4px 4px 0 #000;
}
.frame-title {
  background: linear-gradient(to right, #000080, #4040c0);
  color: #fff;
  font-family: "MS Sans Serif", "Tahoma", sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  margin: -10px -10px 8px;
  letter-spacing: 1px;
}

/* ---- DIRECTORY ---- */
#directory {
  top: 220px;
  left: 30px;
  width: 360px;
  transform: rotate(-0.6deg);
}
#directory table {
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #ccc;
}
#directory th {
  color: #ffff00;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
}
#directory td { padding: 4px 6px; }
.store { color: #00ffff; text-decoration: underline; }
.store:visited { color: #ff66ff; }
.store.open { color: #00ff00; font-weight: bold; }
.open { color: #00ff00; }
.closed { color: #ff4040; text-decoration: line-through; }
.weird { color: #ff8800; font-style: italic; }
.tinytext { font-size: 10px; color: #888; font-family: "Courier New", monospace; margin: 6px 0 0; }
#dirhint { color: #666; }

/* ---- STICKERS ---- */
.sticker {
  position: absolute;
  z-index: 7;
}
#sticker1 {
  top: 250px;
  right: 60px;
  transform: rotate(8deg);
  animation: wiggle 4s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(8deg) scale(1); }
  50% { transform: rotate(10deg) scale(1.04); }
}

/* ---- CONSTRUCTION ---- */
#construction {
  position: absolute;
  top: 480px;
  right: 90px;
  z-index: 6;
  background: #ffff00;
  color: #000;
  border: 2px dashed #000;
  padding: 6px 10px;
  transform: rotate(3deg);
  font-family: "Courier New", monospace;
}
#construction .ascii {
  margin: 0;
  font-size: 11px;
  line-height: 1.1;
}

/* ---- COUNTER ---- */
#counter-block {
  position: absolute;
  top: 600px;
  left: 80px;
  background: #1a1a1a;
  border: 3px outset #888;
  padding: 10px;
  z-index: 6;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #ccc;
  text-align: center;
  transform: rotate(0.8deg);
  box-shadow: 4px 4px 0 #000;
}
#counter-block .frame-title {
  background: linear-gradient(to right, #000080, #4040c0);
  color: #fff;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 12px;
  padding: 2px 6px;
  margin: -10px -10px 8px;
}
#counter-block p { margin: 4px 0; }
#hits {
  background: #000;
  border: 2px inset #444;
  padding: 2px;
  vertical-align: middle;
  height: 22px;
}
.prev { color: #ff66ff; font-style: italic; }

/* ---- BADGES ---- */
#badges {
  position: absolute;
  top: 760px;
  right: 40px;
  z-index: 6;
  display: flex;
  gap: 10px;
  flex-direction: column;
  align-items: flex-end;
}
.badge {
  display: inline-block;
  background: #c0c0c0;
  color: #000;
  border: 2px outset #fff;
  padding: 6px 8px;
  font-family: "MS Sans Serif", "Tahoma", sans-serif;
  font-size: 10px;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
}
.badge.n { background: #003366; color: #fff; }
.badge.ie { background: linear-gradient(135deg, #0066cc, #66ccff); color: #fff; }
.badge.ring a { color: #00008b; text-decoration: underline; }

/* ---- SIDEWAYS TEXT ---- */
#sideways {
  position: fixed;
  left: 4px;
  top: 50%;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: #444;
  letter-spacing: 4px;
  z-index: 5;
  user-select: none;
}

/* ---- BASEMENT ---- */
#basement-link {
  position: fixed;
  bottom: 6px;
  right: 6px;
  width: 4px; height: 4px;
  background: #2a2a2a;
  color: transparent;
  z-index: 8;
  text-decoration: none;
}
#basement-link:hover {
  background: #ff0000;
  box-shadow: 0 0 8px #ff0000;
}

/* ---- HIDDEN TEXT ---- */
#hidden-text {
  position: absolute;
  top: 1000px;
  left: 50px;
  color: #050505;
  font-size: 11px;
  width: 600px;
  font-family: "Courier New", monospace;
  user-select: text;
  z-index: 5;
}
#hidden-text::selection { background: #ff00ff; color: #000; }

/* ---- FOOTER ---- */
#footer {
  position: absolute;
  top: 1100px;
  left: 0; right: 0;
  text-align: center;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 11px;
  color: #555;
  z-index: 6;
}
#footer p { margin: 2px 0; }

/* ---- OVERLAY ---- */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#overlay.hidden { display: none; }
#overlay-window {
  background: #c0c0c0;
  border: 2px outset #fff;
  width: min(440px, 90vw);
  font-family: "MS Sans Serif", "Tahoma", sans-serif;
  color: #000;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}
#overlay-title {
  background: linear-gradient(to right, #000080, #4040c0);
  color: #fff;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#overlay-title a {
  color: #fff;
  text-decoration: none;
  background: #c0c0c0;
  color: #000;
  border: 1px outset #fff;
  padding: 0 4px;
  font-family: "Courier New", monospace;
}
#overlay-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
  background: #c0c0c0;
  min-height: 80px;
  white-space: pre-wrap;
}
#overlay-body a { color: #00008b; }

/* ---- TRAIL ---- */
#trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* responsive-ish (90s sites were not, but) */
@media (max-width: 900px) {
  #directory { position: relative; top: auto; left: auto; margin: 20px auto; width: 92%; }
  #counter-block { position: relative; top: auto; left: auto; margin: 20px auto; }
  #construction, #sticker1, #badges { position: relative; top: auto; left: auto; right: auto; margin: 20px auto; display: block; width: fit-content; }
  #logo { font-size: 56px; }
  #hidden-text { position: relative; top: auto; left: auto; width: auto; padding: 0 20px; }
}

blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ---- WELCOME POPUP (gates wallet-less visitors) ---- */
#overlay-window.welcome {
  width: min(680px, 96vw);
}
#overlay-window.welcome #overlay-body {
  padding: 0;
  background: #c0c0c0;
  white-space: normal;
  min-height: 240px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}
.secretary {
  background: #1a0a26;
  padding: 10px;
  border-right: 4px ridge #888;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.secretary img {
  width: 100%;
  display: block;
  border: 3px inset #888;
  background: #000;
  image-rendering: pixelated;
}
.secretary-name {
  margin-top: 8px;
  font-family: "MS Sans Serif", "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #ff66ff;
  text-align: center;
  line-height: 1.2;
  text-shadow: 1px 1px 0 #000;
}
.secretary-name span {
  font-weight: normal;
  font-size: 9px;
  color: #aaa;
  font-style: italic;
}
.welcome-right {
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  background: #c0c0c0;
}
.npc-text {
  font-family: "Courier New", monospace;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.55;
  color: #0a0a0a;
  white-space: pre-wrap;
  cursor: pointer;
  min-height: 180px;
  position: relative;
}
.npc-text::after {
  content: "▌";
  display: inline-block;
  margin-left: 2px;
  color: #000080;
  animation: typecursor 0.8s steps(2, start) infinite;
}
.npc-text.done::after {
  content: "▼";
  color: #000080;
  animation: bobble 1.2s ease-in-out infinite;
}
@keyframes typecursor { to { opacity: 0; } }
@keyframes bobble {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}
.welcome-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: stretch;
}
.ugly-btn {
  flex: 1;
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 4px;
  padding: 14px 0;
  border: 4px outset;
  cursor: pointer;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  transition: transform 0.08s;
}
.ugly-btn:active { border-style: inset; transform: translate(1px, 1px); }
.ugly-yes {
  background: linear-gradient(180deg, #00ff66 0%, #008833 100%);
  border-color: #00ff66 #003311 #003311 #00ff66;
  color: #001100;
}
.ugly-yes:hover { background: linear-gradient(180deg, #33ff88 0%, #00aa44 100%); }
.ugly-no {
  background: linear-gradient(180deg, #ff3366 0%, #880022 100%);
  border-color: #ff3366 #330011 #330011 #ff3366;
  color: #fff0f0;
}
.ugly-no:hover { background: linear-gradient(180deg, #ff5588 0%, #aa0033 100%); }

@media (max-width: 600px) {
  .welcome-grid { grid-template-columns: 1fr; }
  .secretary { border-right: none; border-bottom: 4px ridge #888; flex-direction: row; gap: 12px; }
  .secretary img { width: 80px; }
  .secretary-name { margin-top: 0; text-align: left; align-self: center; flex: 1; }
  .welcome-right { min-height: auto; }
  .npc-text { min-height: 100px; }
}

/* ---- WIZARD INPUTS (in welcome modal) ---- */
.wiz-input {
  width: 100%;
  padding: 10px 12px;
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
  background: #fff;
  color: #1a1a1a;
  border: 3px inset #888;
  letter-spacing: 1px;
  margin: 12px 0 6px;
  box-sizing: border-box;
}
.wiz-input:focus { outline: 3px solid #000080; outline-offset: -3px; }
.wiz-hint {
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  min-height: 14px;
}
.wiz-hint.error { color: #c00; font-weight: bold; }

/* ---- NFT CAROUSEL ---- */
.carousel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
  background: #1a0a26;
  padding: 10px;
  border: 3px inset #888;
}
.carousel-arrow {
  background: linear-gradient(180deg, #ffff00 0%, #ccaa00 100%);
  border: 3px outset #ffff00;
  font-family: "Comic Sans MS", cursive;
  font-size: 22px;
  font-weight: bold;
  color: #000;
  width: 38px;
  height: 56px;
  cursor: pointer;
  flex-shrink: 0;
}
.carousel-arrow:active { border-style: inset; }
.carousel-arrow:disabled { opacity: 0.35; cursor: not-allowed; }
.carousel-frame {
  flex: 1;
  min-width: 0;
  background: #000;
  border: 2px solid #ffff00;
  aspect-ratio: 1 / 1;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.carousel-frame img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.carousel-frame .empty {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #888;
  text-align: center;
  padding: 12px;
}
.carousel-cap {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #1a1a1a;
  text-align: center;
  margin-top: 4px;
  font-weight: bold;
  min-height: 16px;
}
.carousel-counter {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: #555;
  text-align: center;
  margin-top: 2px;
}

/* ---- PROFILE CHIP (top-right of home) ---- */
#profile-chip {
  position: fixed;
  top: 36px;
  right: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 14, 6, 0.85);
  border: 2px outset #c8a868;
  padding: 4px 10px 4px 4px;
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #ffd6ff;
  letter-spacing: 1px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  transition: transform 0.12s;
}
#profile-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
  background: rgba(40, 24, 12, 0.95);
}
#profile-chip-img {
  width: 38px;
  height: 38px;
  background: #000;
  border: 2px solid #c8a868;
  object-fit: cover;
  display: block;
}
#profile-chip-name {
  font-weight: bold;
  text-shadow: 0 0 6px rgba(220, 140, 255, 0.6);
}

/* ---- EMERGENCY EXIT SIGN (logout) ---- */
#exit-sign {
  position: fixed;
  top: 92px;          /* sits just below the profile chip */
  right: 12px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  background: #117733;
  border: 2px solid #fff;
  font-family: "Helvetica Neue", "Arial Black", "Impact", sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 3px;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  box-shadow:
    0 0 16px rgba(0, 255, 100, 0.55),
    inset 0 0 0 2px #117733,
    3px 3px 0 #000;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  animation: exitFlicker 5s infinite;
}
#exit-sign svg { display: block; }
#exit-sign:hover {
  background: #00aa44;
  transform: scale(1.06) rotate(-1deg);
  box-shadow:
    0 0 28px rgba(0, 255, 130, 0.95),
    inset 0 0 0 2px #00aa44,
    3px 3px 0 #000;
}
#exit-sign::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(0, 255, 100, 0.35);
  pointer-events: none;
  animation: exitGlow 1.6s ease-in-out infinite;
}
@keyframes exitFlicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.35; }
  94% { opacity: 1; }
  96% { opacity: 0.6; }
  97% { opacity: 1; }
}
@keyframes exitGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.05; transform: scale(1.18); }
}
