@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-VF.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #1a120d;
  --bg2: #22180f;
  --panel: #2b1e14;
  --panel2: #35261a;
  --line: #4a3524;
  --text: #f6ecdf;
  --muted: #bda98f;
  --gold: #f2b84b;
  --gold-d: #b9792a;
  --choc: #6b4226;
  --green: #5fa13a;
  --green-d: #3d6e22;
  --red: #e0533d;
  --pink: #f4a7c9;      /* the game's cherry leaves: #E5ACC2 on average, #FCCBE7 at the light end */
  --pink-l: #fccbe7;
  --pink-d: #d97aa8;
  --px: 4px;
  --pixel: "Press Start 2P", monospace;
  --body: "Rubik", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
code {
  font-family: var(--pixel);
  font-size: .78em;
  background: #00000055;
  padding: .25em .45em;
  color: var(--gold);
  white-space: nowrap;
}
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; line-height: 1.35; margin: 0; }

/* pixel frame: square corners cut like a Minecraft panel */
.px {
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line),
    0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line),
    var(--px) 0 0 0 var(--line);
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px;
  background: #1a120dee;
  backdrop-filter: blur(8px);
  border-bottom: var(--px) solid #00000066;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { image-rendering: pixelated; }
.brand span { font-family: var(--pixel); font-size: 14px; }
.nav { display: flex; gap: 20px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--pink-l); }
::selection { background: var(--pink); color: #2b1a0c; }
.status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--pixel); font-size: 11px; color: var(--muted); white-space: nowrap;
}
.dot { width: 10px; height: 10px; background: #777; display: inline-block; }
.status.on .dot { background: #6fdc4a; box-shadow: 0 0 10px #6fdc4a; }
.status.off .dot { background: var(--red); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: grid; place-items: center;
  overflow: hidden;
  padding: 80px 16px 120px;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
  transform: scale(1.03);
}
.hero-bg, .hero-shade { z-index: 0; }
.hero-in { z-index: 3; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, #f4a7c92e 0%, #f4a7c900 70%),
    radial-gradient(ellipse 80% 65% at 50% 42%, #1a120d00 0%, #1a120d33 65%, #1a120daa 100%),
    linear-gradient(#1a120d44, #1a120d00 20%, #1a120d00 62%, #1a120dd9 90%, var(--bg));
}
.hero-in { position: relative; text-align: center; max-width: 760px; }
.hero-icon {
  margin: 0 auto 18px; image-rendering: pixelated;
  filter: drop-shadow(0 8px 0 #00000088);
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-8px); } }
.hero h1 {
  font-size: clamp(30px, 7vw, 68px);
  color: var(--gold);
  text-shadow: 0 6px 0 var(--choc), 0 10px 0 #00000088, 0 0 28px #000000aa;
  letter-spacing: 2px;
}
.motd {
  display: table; margin: 20px auto 26px; padding: 6px 14px;
  font-size: 18px; color: var(--text); background: #00000066;
  text-shadow: 0 2px 0 #000; min-height: 1.5em;
}
/* the server's entry, as the game's multiplayer screen draws it (mc.js) */
.server {
  position: relative; display: flex; justify-content: center; outline: none;
  width: min(915px, calc(100vw - 32px)); margin: 22px 0 18px 50%; transform: translateX(-50%);
}
.server .mc-entry { display: block; cursor: pointer; image-rendering: pixelated; box-shadow: 0 10px 30px #00000066; }
.server:focus-visible .mc-entry { outline: 3px solid #fff; outline-offset: 3px; }
.mc-tip { position: absolute; z-index: 5; pointer-events: none; image-rendering: pixelated; }
.ip {
  display: inline-flex; align-items: stretch; gap: 0;
  background: #000000aa;
  border: var(--px) solid #00000099;
}
.ip code { background: none; font-size: clamp(11px, 2.6vw, 16px); padding: 14px 16px; color: var(--text); align-self: center; }
.chips { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 0; margin: 22px 0 28px; }
.chips li {
  font-size: 14px; padding: 6px 12px;
  background: #00000088; border: 2px solid #ffffff22; color: var(--text);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: url("../img/mc/grass_edge.png") 0 0 / 48px 48px repeat-x;
  image-rendering: pixelated;
}
.grass-top { position: static; height: 32px; background-size: 32px 32px; margin-bottom: 24px; }

/* ---------- cherry boughs and their petals (the game's cherry_leaves blocks; js/petals.js) ---------- */
.sakura {
  position: absolute; top: 0; z-index: 2; height: auto; pointer-events: none; image-rendering: pixelated;
  filter: drop-shadow(0 6px 0 #00000044) drop-shadow(0 14px 18px #00000055);
  animation: bough 7s ease-in-out infinite;
}
.sakura-l { left: 0; width: 320px; transform-origin: 0 0; }
.sakura-r { right: 0; width: 256px; transform-origin: 100% 0; animation-delay: -3.5s; }
@keyframes bough { 50% { transform: rotate(1.2deg); } }
.sakura-r { animation-name: bough-r; }
@keyframes bough-r { 50% { transform: rotate(-1.2deg); } }
/* the far layer of each bough: wider, darker, soft, swaying slower - the canopy has depth */
.sakura-back {
  position: absolute; top: -10px; z-index: 0; height: auto; pointer-events: none; opacity: .92;
  animation: bough 9.5s ease-in-out infinite;
}
.sakura-back-l { left: 70px; width: 384px; transform-origin: 0 0; animation-delay: -2s; }
.sakura-back-r { right: 56px; width: 320px; transform-origin: 100% 0; animation-name: bough-r; animation-delay: -6s; }
#petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
@media (max-width: 600px) {
  .sakura-l { width: 180px; }
  .sakura-r { width: 144px; }
  .sakura-back-l { left: 36px; width: 216px; }
  .sakura-back-r { right: 30px; width: 180px; }
}
@media (prefers-reduced-motion: reduce) { .sakura, .sakura-back { animation: none; } }

/* ---------- buttons ---------- */
.btn {
  --c: #6d6d6d; --d: #3e3e3e; --t: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--pixel); font-size: 12px; line-height: 1;
  padding: 14px 20px;
  color: var(--t); text-decoration: none; cursor: pointer;
  background: var(--c);
  border: 0;
  box-shadow: inset 0 -4px 0 var(--d), inset 0 3px 0 #ffffff44, 0 0 0 3px #000;
  text-shadow: 0 2px 0 #00000088;
  transition: filter .12s, transform .12s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--d), inset 0 3px 0 #ffffff44, 0 0 0 3px #000; }
.btn:disabled { filter: grayscale(1) brightness(.7); cursor: not-allowed; }
.btn-green { --c: var(--green); --d: var(--green-d); }
.btn-gold { --c: var(--gold); --d: var(--gold-d); --t: #2b1a0c; text-shadow: none; }

/* ---------- blocks ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.block { padding: 64px 0 16px; position: relative; z-index: 2; }
.block h2 {
  font-size: clamp(18px, 3.2vw, 26px);
  color: var(--gold);
  margin-bottom: 28px; padding-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, var(--pink), #f4a7c900) left bottom / 160px 4px no-repeat;
}
.block h2::before {
  content: ""; width: 28px; height: 28px; flex: none;
  background: url("../img/mc/cookie.png") center / contain no-repeat;
  image-rendering: pixelated;
}
[hidden] { display: none !important; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { position: relative; background: var(--panel); padding: 26px 22px 22px; border: var(--px) solid var(--line); }
.steps b {
  position: absolute; top: -18px; left: 18px;
  font-family: var(--pixel); font-weight: 400; font-size: 14px;
  background: var(--gold); color: #2b1a0c; padding: 8px 11px;
  box-shadow: 0 0 0 3px #000;
}
.steps h3 { font-size: 13px; margin: 6px 0 10px; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- shop ---------- */
.notice {
  background: #f2b84b1a; border: 2px dashed var(--gold-d); color: var(--text);
  padding: 14px 16px; margin-bottom: 22px;
}
.nick {
  display: grid; grid-template-columns: auto minmax(0, 320px) 1fr; align-items: center; gap: 8px 14px;
  background: var(--panel); border: var(--px) solid var(--line); padding: 16px 18px; margin-bottom: 22px;
}
.nick label { font-family: var(--pixel); font-size: 11px; }
.nick input {
  font: 600 17px var(--body); color: var(--text);
  background: #000; border: 3px solid #a0a0a0; padding: 10px 12px; outline: none; width: 100%;
}
.nick input:focus { border-color: #fff; }
.nick input.bad { border-color: var(--red); }
.nick-hint { color: var(--muted); font-size: 14px; }
.nick-hint.bad { color: var(--red); }

.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tab {
  font-family: var(--pixel); font-size: 11px; color: var(--muted);
  background: var(--bg2); border: 3px solid var(--line); padding: 10px 14px; cursor: pointer;
}
.tab[aria-selected="true"] { color: #2b1a0c; background: var(--gold); border-color: #000; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: linear-gradient(var(--panel2), var(--panel));
  border: var(--px) solid var(--line);
  padding: 18px;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold-d); }
.card .art {
  height: 120px; display: grid; place-items: center;
  background: radial-gradient(circle, #f2b84b22, transparent 70%);
  margin-bottom: 14px;
}
.card .art img { max-height: 104px; }
.card .art img.item { width: 80px; height: 80px; image-rendering: pixelated; filter: drop-shadow(0 6px 0 #00000088); }
.card h3 { font-size: 13px; margin-bottom: 10px; }
.card .desc { color: var(--muted); font-size: 15px; flex: 1; overflow-wrap: anywhere; }
.card .desc p { margin: 0 0 .5em; }
.card .desc ul { padding-left: 1.1em; margin: 0 0 .5em; }
.card .buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.price { font-family: var(--pixel); font-size: 15px; color: var(--gold); }
.price s { color: var(--muted); font-size: 11px; margin-right: 6px; }
.badge {
  align-self: flex-start; font-family: var(--pixel); font-size: 9px; color: #2b1a0c;
  background: var(--muted); padding: 5px 7px; margin-bottom: 10px;
}
.fine { color: var(--muted); font-size: 14px; margin-top: 22px; }

/* a rank as an offer: the picture with the buyer's name tag and the TAB row; what it gives, the price, the nick, buy */
.offer {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  background: linear-gradient(var(--panel2), var(--panel)); border: var(--px) solid #000;
  box-shadow: 0 0 0 var(--px) var(--gold-d), 0 18px 40px #00000066;
}
.offer-side { display: flex; background: #000; min-width: 0; }
.offer-pic { position: relative; flex: 1; min-height: 100%; aspect-ratio: 1200 / 760; overflow: hidden; }
.offer-pic img, .offer-vid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.offer-vid { opacity: 0; transition: opacity .3s; }
.offer-vid.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .offer-vid { display: none; } }
.offer-tag { position: absolute; transform: translate(-50%, -50%); image-rendering: pixelated; }
.offer-note {
  position: absolute; left: 10px; bottom: 10px; font-size: 13px; color: var(--text);
  background: #000000b0; padding: 4px 8px;
}
.offer-tab { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); line-height: 0; }
.offer-tab canvas { image-rendering: pixelated; }
.offer-body { padding: 26px 28px; display: flex; flex-direction: column; min-width: 0; }
.offer-name { font-size: clamp(20px, 3vw, 28px); color: var(--text); text-shadow: 0 4px 0 #000; }
.offer-sub { margin: 8px 0 18px; color: var(--muted); }
.offer-sub .forever { margin-left: 6px; font: 400 13px var(--pixel); color: var(--pink-l); letter-spacing: 1px; text-shadow: 0 2px 0 #000; }
.perks-head { margin: 0 0 6px; font: 400 11px var(--pixel); color: var(--pink-l); letter-spacing: 1px; }
.perks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; }
.perks li {
  display: flex; align-items: center; gap: 14px; padding: 10px 0; min-width: 0;
  border-bottom: 1px solid #ffffff12;
}
.perks li:last-child { border-bottom: 0; }
.slot {
  flex: none; width: 32px; height: 32px; padding: 4px; box-sizing: content-box;
  background: #00000066; box-shadow: inset 0 0 0 2px #ffffff14;
}
.slot img { width: 32px; height: 32px; display: block; image-rendering: pixelated; }
.perk { display: flex; flex-direction: column; min-width: 0; }
.perk-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text); }
.perk-title em { font-style: normal; color: var(--gold); }
.perk-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.perk-note s { color: #e0533dcc; text-decoration-thickness: 2px; }
.offer-price { display: flex; align-items: baseline; gap: 12px; margin-top: auto; margin-bottom: 14px; }
.offer-price b { font-family: var(--pixel); font-weight: 400; font-size: 28px; color: var(--gold); text-shadow: 0 4px 0 var(--choc); }
.offer-price span { color: var(--muted); }
.offer-price s { color: var(--muted); font-family: var(--pixel); font-size: 13px; }
.offer-buy .nick { grid-template-columns: 1fr; gap: 6px; padding: 0; margin: 0 0 14px; background: none; border: 0; }
.btn-big { width: 100%; font-size: 15px; padding: 18px 20px; }
.offer-fine { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.skeleton { height: 330px; background: linear-gradient(90deg, var(--panel), var(--panel2), var(--panel)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- rules ---------- */
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li {
  counter-increment: r; display: grid; grid-template-columns: 48px 1fr; align-items: start; gap: 12px;
  background: var(--panel); border-left: var(--px) solid var(--gold-d); padding: 14px 16px;
}
.rules li::before { content: counter(r); font-family: var(--pixel); color: var(--gold); font-size: 14px; padding-top: 3px; }
.placeholder { border: 2px dashed var(--line); color: var(--muted); padding: 28px; text-align: center; }

/* ---------- videos ---------- */
.videos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.video {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden;
  border: var(--px) solid var(--line); color: var(--text); text-decoration: none;
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.video:hover img { transform: scale(1.05); }
.video span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 12px;
  font-family: var(--pixel); font-size: 10px; line-height: 1.6;
  background: linear-gradient(#0000, #000000cc 40px, #000000ee);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.video.skeleton { height: auto; }
.more { margin-top: 24px; }
.more[hidden] { display: none; }
.video .play {
  position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  background: #000000aa; border: 3px solid #fff; display: grid; place-items: center;
}
.video .play::after { content: ""; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }

/* ---------- community ---------- */
.social { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-discord { --c: #5865f2; --d: #3a45b5; }
.btn-telegram { --c: #2aa3e0; --d: #1a77a6; }
.btn-tiktok { --c: #222; --d: #000; }
.btn-youtube { --c: #e62b2b; --d: #a51717; }

/* ---------- footer, toast ---------- */
.foot { position: relative; z-index: 2; margin-top: 80px; background: var(--bg2); text-align: center; padding: 0 16px 40px; color: var(--muted); font-size: 14px; }
.foot p { margin: 6px 0; }
.foot .legal { font-size: 12px; opacity: .8; max-width: 640px; margin: 10px auto 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: #000; color: var(--text); border: 3px solid var(--gold);
  padding: 14px 18px; max-width: calc(100% - 32px);
  transition: transform .25s, visibility .25s; z-index: 50; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

@media (max-width: 860px) {
  .offer { grid-template-columns: 1fr; }
  .offer-body { padding: 22px 18px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .videos { grid-template-columns: repeat(2, 1fr); }
  .nick { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top { gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; gap: 16px; font-size: 15px; }
  .brand span { font-size: 12px; }
  .hero { padding-top: 48px; }
  .ip { flex-direction: column; width: 100%; }
  .ip .btn { width: 100%; }
  .btn { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
