/* ==========================================================
   MACCHIA PLACE ~ y2k cyber bedroom edition
   colours are pulled off the avatar's outfit. always night-time here.
   ========================================================== */
@import url("https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&family=Bagel+Fat+One&family=Gaegu:wght@400;700&display=swap");

:root {
  --violet: #6b35f0;
  --violet-lt: #9c6bff;
  --cyan: #29e6f0;
  --red: #ff3b5c;
  --pink: #ff8ace;
  --yellow: #ffd35c;
  --mint: #8cffc8;
  --cream: #fff4e6;
  --ink: #140a2e;
  --choc: #7a4628;

  --pixel: "Silkscreen", monospace;
  --bubble: "Bagel Fat One", "Silkscreen", sans-serif;
  --hand: "Gaegu", "Comic Sans MS", cursive;
  --body: Verdana, Tahoma, "Segoe UI", sans-serif;

  /* pixel cursors (img/px, baked at 2x because browsers can't scale cursors) */
  --cursor: url("../img/px/cursor.png") 2 2, auto;
  --cursor-hand: url("../img/px/pointer.png") 12 2, pointer;
}

/* ---------- night palette ---------- */
:root {
  --bg: #16093a url("../img/tile-night.png");
  --win: #1d0f47;
  --win-2: #2a1763;
  --text: #fff4e6;
  --muted: #c9b8ff;
  --edge: #29e6f0;
  --edge-2: #6b35f0;
  --bar: linear-gradient(90deg, #6b35f0, #ff3b5c 70%, #ffd35c);
  --bar-text: #fff4e6;
  --link: #29e6f0;
  --link-hover-bg: #ffd35c;
  --shadow: #0a0420;
  --note: #ffd35c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.55;
  cursor: var(--cursor);
}
body { background: var(--bg); background-attachment: fixed; }

a, button, label, summary, [data-poke] { cursor: var(--cursor-hand); }
a { color: var(--link); font-weight: bold; text-decoration: underline dotted; }
a:hover { background: var(--link-hover-bg); color: var(--ink); text-decoration: none; }
a:has(> img):hover { background: none; }
a > img { vertical-align: middle; }
::selection { background: var(--pink); color: var(--ink); }
img { max-width: 100%; }

/* custom scrollbars (a neocities essential) */
* { scrollbar-color: var(--violet-lt) var(--win); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--win); }
::-webkit-scrollbar-thumb { background: repeating-linear-gradient(45deg, var(--violet) 0 4px, var(--violet-lt) 4px 8px); border: 2px solid var(--win); }

h1, h2, h3 { font-weight: normal; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--bubble); font-size: 34px; letter-spacing: 1px; text-transform: uppercase; }
h2 { font-family: var(--pixel); font-size: 16px; color: var(--muted); }
h3 { font-family: var(--pixel); font-size: 13px; color: var(--yellow); }

/* glitter / holo text */
.glitter {
  background: linear-gradient(100deg, #ff8ace, #ffd35c, #8cffc8, #29e6f0, #9c6bff, #ff8ace) 0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  filter: drop-shadow(3px 3px 0 var(--ink));
  animation: holo 5s linear infinite;
}
@keyframes holo { to { background-position: 300% 0; } }

/* ---------- y2k windows ---------- */
.win {
  position: relative;
  background: var(--win);
  border: 2px solid var(--edge);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 4px 4px 0 var(--shadow);
  margin: 0 0 18px;
}
.win > .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 8px 8px 0 0;
  background: var(--bar);
  color: var(--bar-text);
  font-family: var(--pixel);
  font-size: 11px;
  text-shadow: 1px 1px 0 var(--ink);
  border-bottom: 2px solid var(--edge);
}
.win > .bar::after {
  content: "";
  margin-left: auto;
  width: 62px; height: 18px;   /* pixel _ [] x buttons (img/px/titlebtns.png, 31x9 at 2x) */
  background: url("../img/px/titlebtns.png") 0 0 / 62px 18px no-repeat;
  image-rendering: pixelated;
}
.win > .body { padding: 10px 12px; }
.win.flat > .bar::after { display: none; }
.win.yellow { border-color: var(--yellow); }
.win.yellow > .bar { background: linear-gradient(90deg, #ffb938, #ffd35c, #fff3a8); color: var(--ink); text-shadow: none; border-color: var(--yellow); }
.win.pink { border-color: var(--pink); }
.win.pink > .bar { background: linear-gradient(90deg, #ff8ace, #ffc2e6); color: var(--ink); text-shadow: none; border-color: var(--pink); }

/* washi tape: add class="taped" to anything */
.taped { position: relative; }
.taped::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  width: 90px; height: 24px;
  transform: translateX(-50%) rotate(-4deg);
  background: repeating-linear-gradient(90deg, #ff8acecc 0 8px, #ffd35ccc 8px 16px);
  box-shadow: 0 1px 2px #0003;
  z-index: 2;
}

/* sticky note */
.note {
  background: var(--note);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1.25;
  padding: 16px 18px;
  box-shadow: 3px 5px 0 #0004;
  transform: rotate(-1.5deg);
}
.note a { color: var(--violet); }

/* chunky pill button */
.pill {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 11px;
  padding: 5px 10px;
  color: var(--ink);
  background: linear-gradient(#fff 0%, var(--cyan) 55%, #13b8c4 100%);
  border: 2px solid var(--ink);
  border-radius: 99px;
  box-shadow: inset 0 -3px 0 #0002, 2px 2px 0 var(--ink);
  text-decoration: none;
}
.pill:hover, .pill.on { background: linear-gradient(#fff 0%, var(--yellow) 55%, #e8a91e 100%); color: var(--ink); }
.pill:active { transform: translate(1px, 1px); box-shadow: inset 0 -3px 0 #0002, 1px 1px 0 var(--ink); }
.pill.pink { background: linear-gradient(#fff 0%, var(--pink) 55%, #e45aa8 100%); }

.tiny { font-size: 11px; opacity: .85; }
.hand { font-family: var(--hand); font-size: 20px; }
.px { font-family: var(--pixel); }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row.c { justify-content: center; }
.pixelated { image-rendering: pixelated; }

hr.hearts {
  border: 0; height: 14px; margin: 18px 0;
  background: url("../img/px/divider.png") repeat-x 0 center / 24px 14px;
  image-rendering: pixelated;
}
/* blinking pixel NEW! badge (img/px/new.png, 31x11 at 2x) */
.new { width: 62px; height: 22px; image-rendering: pixelated; vertical-align: middle; margin-left: 4px; }

marquee {
  font-family: var(--pixel);
  font-size: 11px;
  padding: 2px 0;
}

/* ---------- pages inside the frame ---------- */
body.inframe { background: transparent; }
.page { max-width: 760px; margin: 0 auto; padding: 22px 18px 50px; }

/* lined notebook paper */
.paper {
  background: #fffdf6 repeating-linear-gradient(#0000 0 27px, #9ccbff 27px 28px);
  background-position: 0 14px;
  border-left: 3px double #ff8ace;
  color: #2a1d4f;
  font-family: var(--hand);
  font-size: 20px;
  line-height: 28px;
  padding: 14px 18px 14px 26px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.paper a { color: var(--violet); }

/* sparkle cursor trail bits (js/sparkles.js) */
.spk {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: var(--c, #ffd35c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: spk .7s ease-out forwards;
}
@keyframes spk { to { transform: translate(var(--dx), var(--dy)) scale(0) rotate(90deg); opacity: 0; } }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bob { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
  .glitter, .blink, .bob { animation: none; }
}
@media (max-width: 600px) {
  h1 { font-size: 28px; }
  .page { padding: 16px 16px 40px; }
}
