:root {
  /* Logo ranglari */
  --sky: #2ec5f7;
  --sky-light: #8be6ff;
  --sky-deep: #0f8fd6;
  --purple: #7b2ff2;
  --purple-2: #a43cf5;
  --magenta: #d64dff;
  --lilac: #f3cdfd;
  --ink: #160b2b;
  --tile: 64px;
  /* Pixelify Sans — SIL Open Font License, tijoriy foydalanish mumkin. Faqat 700 yuklanadi. */
  --title: 'Pixelify Sans', 'Silkscreen', ui-monospace, monospace;
  --hud: 'Silkscreen', ui-monospace, monospace;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Raqamlar uchun — piksel shriftda raqamlar yomon o'qiladi */
  --num: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
/* Raqam ko'rsatadigan joylar: aniq, qalin, bir xil kenglikdagi raqamlar */
.nav-online b, .hstat .value, .step .num, .buy-steps .num, .pop, .pack .amount,
.lb-place, .lb-val, .lb-empty b, .gsteps li::before, .rnum {
  font-family: var(--num) !important; font-weight: 800 !important;
  font-variant-numeric: tabular-nums; letter-spacing: 0 !important;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: #f4efff; background: #05020f; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img.px, .px { image-rendering: pixelated; }

/* ---------- Umumiy ---------- */
.logo-circle { position: relative; border-radius: 50%; overflow: hidden; aspect-ratio: 1; }
.logo-circle img { display: block; width: 151.66%; margin-left: -25.83%; margin-top: -7.35%; }

.mc-title {
  font-family: var(--title); font-weight: 400; line-height: 1; margin: 0; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--lilac) 0%, var(--magenta) 45%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  filter: drop-shadow(0 4px 0 #3b137a) drop-shadow(0 4px 0 var(--ink));
}

.mc-btn {
  display: inline-block; font: 700 15px var(--body); color: #fff; padding: 11px 22px; cursor: pointer;
  border: 3px solid #000; background: linear-gradient(180deg, var(--purple-2), var(--purple));
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .35), inset -3px -4px 0 rgba(0, 0, 0, .35);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .45); transition: transform .1s, filter .15s;
}
.mc-btn:hover { filter: brightness(1.15); }
.mc-btn:active { transform: translateY(3px); }
.mc-btn.small { padding: 6px 14px; font-size: 13px; }
.mc-btn.cyan { background: linear-gradient(180deg, var(--sky), var(--sky-deep)); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-weight: 600; font-size: 14px;
  background: rgba(22, 11, 43, .75); border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); }
.dot { width: 10px; height: 10px; background: #8f86b3; flex: none; }
.dot.on { background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: blink 1.6s steps(2) infinite; }
.dot.off { background: #f05264; }
.copy { cursor: pointer; }
.copy:hover { border-color: var(--sky); }

/* ---------- Nav va HUD ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px; transition: background .3s, border-color .3s; border-bottom: 3px solid transparent;
}
/* Logo chapda, havolalar aniq o'rtada */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; }
.nav .links { grid-column: 2; justify-self: center; }
.nav-online { grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  font-size: 14px; font-weight: 600; color: #fff; background: rgba(22, 11, 43, .75); border: 3px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1); transition: border-color .2s; }
.nav-online:hover { border-color: var(--sky); }
.nav-online b { font: 700 17px var(--title); }
.nav-online .lbl { color: #c9c0e6; font-weight: 600; }
.nav.solid { background: rgba(10, 5, 24, .82); backdrop-filter: blur(8px); border-color: #000; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--title); font-size: 22px; color: #fff;
  text-shadow: 0 3px 0 var(--purple), 0 5px 0 var(--ink); }
.brand .logo-circle { width: 38px; border: 3px solid #000; }
.links { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: 14px; }
.links a:not(.mc-btn) { text-shadow: 0 2px 0 rgba(0, 0, 0, .5); opacity: .9; }
.links a:not(.mc-btn):hover { opacity: 1; color: var(--lilac); }

.hud {
  position: fixed; left: 14px; top: 72px; z-index: 35; padding: 6px 10px; font: 13px/1.5 var(--hud); color: #fff;
  background: rgba(0, 0, 0, .45); text-shadow: 2px 2px 0 #3f3f3f; pointer-events: none;
}
.hud b { color: #ffe066; font-weight: 400; }
.hud .v { color: var(--magenta); }

/* ---------- Qatlamlar ---------- */
.layer {
  position: relative; min-height: 100vh; padding: 150px 16px 140px;
  background-image: var(--tex); background-size: var(--tile); image-rendering: pixelated;
  background-position: 0 var(--py, 0px);
}
.layer > * { image-rendering: auto; }
.layer::before { content: ''; position: absolute; inset: 0; background: var(--shade, transparent); pointer-events: none; }
.edge { position: absolute; left: 0; right: 0; top: 1px; transform: translateY(-100%); display: flex; align-items: flex-end;
  pointer-events: none; z-index: 3; overflow: hidden; }
.edge i { flex: none; width: var(--tile); background: var(--etex, var(--tex)) 0 0 / var(--tile); image-rendering: pixelated;
  box-shadow: inset 0 0 0 999px var(--eshade, transparent); }

.wrap { position: relative; z-index: 6; max-width: 1040px; margin: 0 auto; }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.split.flip { grid-template-columns: 1.25fr 1fr; }
.split.flip .scene { order: 2; }
.split + .split { margin-top: 110px; }

.panel {
  background: rgba(12, 6, 28, .84); border: 4px solid #000; padding: 26px 28px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08), 10px 10px 0 rgba(0, 0, 0, .45);
}
.panel .kicker { font: 12px var(--hud); letter-spacing: .08em; color: var(--accent, var(--sky-light)); margin-bottom: 8px; text-shadow: 2px 2px 0 #000; }
.panel h2 { font: 400 clamp(30px, 5vw, 46px) var(--title); margin: 0 0 12px; color: #fff;
  text-shadow: 0 4px 0 var(--accent-dark, var(--purple)), 0 7px 0 #000; letter-spacing: .02em; }
.panel p { margin: 0; color: #d6cfee; font-size: 17px; }

/* Pikselli ochilish */
.reveal { clip-path: inset(0 100% 0 0); }
.reveal.in { animation: wipe .7s steps(12) forwards; }
.reveal.from-right { clip-path: inset(0 0 0 100%); }
.reveal.from-right.in { animation-name: wipeR; }

/* 3D aylanuvchi blok */
.scene { display: grid; place-items: center; perspective: 900px; min-height: 260px; }
.cube-wrap { animation: bob 4s ease-in-out infinite; position: relative; }
.cube-wrap::after { content: ''; position: absolute; left: 50%; bottom: -60px; width: 70%; height: 18px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%); animation: shadow 4s ease-in-out infinite; }
.cube { --s: 150px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; animation: spin 12s linear infinite; cursor: grab; }
.cube .f { position: absolute; inset: 0; background-size: cover; image-rendering: pixelated; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.cube .f1 { transform: translateZ(calc(var(--s) / 2)); }
.cube .f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.82); }
.cube .f3 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(.7); }
.cube .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.9); }
.cube .f5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.1); }
.cube .f6 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.5); }
.cube-wrap.glow .cube .f { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 0 40px var(--glow, transparent); }

.item-spin { width: 150px; height: 150px; image-rendering: pixelated; animation: itemspin 3s linear infinite, bob 3s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(78, 230, 224, .55)) drop-shadow(6px 6px 0 rgba(0, 0, 0, .5)); }

/* ---------- 1. Osmon ---------- */
.sky {
  background: linear-gradient(180deg, #1aa9ec 0%, var(--sky) 45%, #79deff 100%);
  display: grid; place-items: center; text-align: center; padding-bottom: 180px; overflow: hidden;
}
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; left: -300px; width: 192px; height: 32px; background: #fff; opacity: .92; animation: drift linear infinite;
  box-shadow: 0 8px 0 rgba(220, 240, 255, .9); }
.cloud::before { content: ''; position: absolute; left: 48px; top: -24px; width: 96px; height: 24px; background: #fff; }
.cloud::after { content: ''; position: absolute; left: 80px; top: -40px; width: 48px; height: 16px; background: #fff; }
.hero { position: relative; z-index: 5; }
.logo-wrap { position: relative; width: min(300px, 66vw); margin: 0 auto 26px; animation: bob 5s ease-in-out infinite; }
.logo-wrap::before { content: ''; position: absolute; inset: -12%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(139, 230, 255, .3) 50%, transparent 70%); animation: pulse 3s ease-in-out infinite; }
.logo-wrap .logo-circle { border: 6px solid var(--ink); box-shadow: 0 0 0 5px #fff, 0 14px 0 var(--ink); }
.logo-wrap .logo-circle::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .45) 47%, transparent 60%); background-size: 250% 100%; animation: shine 5s ease-in-out infinite; }
.hero h1 { font-size: clamp(48px, 11vw, 96px); }
.tagline { font: 400 clamp(17px, 3vw, 26px) var(--title); color: #fff; margin: 10px 0 4px; letter-spacing: .05em;
  text-shadow: 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 5px 0 var(--ink); }
.welcome { font-weight: 700; color: var(--ink); margin: 6px 0 20px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.jump { margin-top: 26px; animation: nudge 1.6s ease-in-out infinite; }
.tree { position: absolute; bottom: 0; right: 9%; z-index: 4; display: grid; grid-template-columns: repeat(5, 48px); image-rendering: pixelated; }
.tree i { width: 48px; height: 48px; background-size: cover; }
.tree.left { right: auto; left: 6%; transform: scale(.75); transform-origin: bottom; }

/* ---------- 2. Yer yuzasi ---------- */
.surface { --tex: var(--t-dirt); --shade: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .45)); --accent: #9be36a; --accent-dark: #3f8f2f; }
.surface .edge { --etex: var(--t-grassSide); }

/* ---------- 3. G'orlar ---------- */
.caves { --tex: var(--t-stone); --shade: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(5, 2, 20, .65)); --accent: var(--sky-light); --accent-dark: #1a9e98; overflow: hidden; }
.caves .edge { --eshade: rgba(0, 0, 0, .1); }
.ores { position: absolute; inset: 0; z-index: 2; }
.ore { position: absolute; width: var(--tile); height: var(--tile); background-size: cover; image-rendering: pixelated; cursor: pointer;
  transition: transform .1s, opacity .25s; box-shadow: 0 0 24px var(--g, transparent); }
.ore:hover { transform: scale(1.06); }
.ore.hit { transform: scale(.9) rotate(-4deg); }
.ore.gone { opacity: 0; transform: scale(.2); pointer-events: none; }
.spark { position: absolute; width: 6px; height: 6px; background: #fff; pointer-events: none; z-index: 3;
  box-shadow: 0 0 8px #fff; animation: spark 1.2s ease-out forwards; }

/* ---------- 4. Deepslate ---------- */
.deep { --tex: var(--t-deepslate); --shade: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(10, 0, 20, .6)); --accent: #ff8a8a; --accent-dark: #8a0c0c; overflow: hidden; }
.lava-pool { position: absolute; z-index: 2; left: -2%; bottom: 120px; width: 40%; height: 128px; border: 4px solid #000; border-left: 0;
  background: var(--t-lava) 0 0 / var(--tile); image-rendering: pixelated; animation: flow 5s linear infinite;
  box-shadow: 0 0 80px 20px rgba(242, 125, 12, .45); }
.lava-pool.r { left: auto; right: -2%; bottom: auto; top: 160px; width: 22%; height: 96px; border-left: 4px solid #000; border-right: 0; animation-direction: reverse; }
.rules { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; background: rgba(0, 0, 0, .4); border-left: 4px solid var(--accent); }
.rules li::before { content: ''; flex: none; width: 20px; height: 20px; margin-top: 2px; background: var(--t-deepRedstone) center/cover; image-rendering: pixelated; }

/* ---------- 5. Bedrock ---------- */
.bedrock { position: relative; z-index: 7; display: flex; flex-wrap: wrap; background: #000; height: calc(var(--tile) * 2); overflow: visible; }
.bedrock i { width: var(--tile); height: var(--tile); background: var(--t-bedrock) 0 0 / cover; image-rendering: pixelated; }
.bedrock.break i { animation: fall 1.1s cubic-bezier(.5, 0, .9, .6) forwards; animation-delay: var(--d); }

/* ---------- 6. Void ---------- */
.void { position: relative; min-height: 100vh; padding: 140px 16px 160px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 45% at 50% 30%, rgba(123, 47, 242, .45), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 85%, rgba(46, 197, 247, .18), transparent 70%), #05020f; }
.void-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.portal { position: relative; width: min(320px, 70vw); aspect-ratio: 1; margin: 0 auto 30px; }
.portal .ring { position: absolute; inset: -9%; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--sky), var(--purple), var(--magenta), var(--sky-light), var(--purple-2), var(--sky));
  filter: blur(16px); animation: rot 6s linear infinite; }
.portal .ring.thin { inset: -3%; filter: none; animation-duration: 3s; animation-direction: reverse;
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%); mask: radial-gradient(circle, transparent 64%, #000 65%); }
.portal .logo-circle { position: absolute; inset: 0; border: 5px solid #000; animation: bob 5s ease-in-out infinite; }
.void h2 { font-size: clamp(40px, 9vw, 84px); margin-bottom: 8px; }
.void .sub { color: #c9c0e6; margin: 0 0 40px; font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; text-align: left; margin-bottom: 30px; }
.step { position: relative; padding-top: 34px; }
.step .num { position: absolute; top: -22px; left: 22px; width: 48px; height: 48px; display: grid; place-items: center; font: 400 26px var(--title);
  color: #fff; background: linear-gradient(135deg, var(--sky), var(--purple)); border: 4px solid #000; }
.step h3 { margin: 0 0 4px; font-size: 18px; }
.step p { margin: 0; color: #c9c0e6; font-size: 15px; }
.tag { display: inline-block; padding: 1px 8px; margin: 2px 0; font-size: 13px; font-weight: 600; background: rgba(46, 197, 247, .15); color: var(--sky-light); border: 1px solid rgba(46, 197, 247, .4); }
.tag.warn { background: rgba(250, 204, 21, .1); color: #fde68a; border-color: rgba(250, 204, 21, .35); }
.players-panel { text-align: left; margin-top: 18px; }
.players-panel h3 { margin: 0 0 10px; font: 13px var(--hud); color: var(--lilac); letter-spacing: .06em; }
.players { display: flex; flex-wrap: wrap; gap: 8px; }
.player { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: rgba(255, 255, 255, .06); border: 2px solid #000; }
.player img { width: 24px; height: 24px; image-rendering: pixelated; }
.muted { color: #8f86b3; }

/* Donat havolalari */
.links .nav-donat { display: inline-flex; align-items: center; gap: 6px; color: #fff; opacity: 1; text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(214, 77, 255, .8); }
.nav-donat img, .donat-cta img { width: 20px; height: 20px; image-rendering: pixelated; animation: bob 2s ease-in-out infinite; }
.donat-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 17px; padding: 14px 24px; }
.donat-cta img { width: 28px; height: 28px; }

footer { position: relative; z-index: 6; text-align: center; padding: 26px 16px; color: #8f86b3; font-size: 14px; background: #05020f; border-top: 3px solid #1d1240; }
footer a { color: var(--sky-light); }

.pop { position: fixed; z-index: 60; font: 400 18px var(--title); color: #fff; pointer-events: none; text-shadow: 2px 2px 0 #000; animation: popup .9s ease-out forwards; }

/* ---------- Animatsiyalar ---------- */
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes shadow { 50% { transform: translateX(-50%) scale(.75); opacity: .6; } }
@keyframes spin { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes itemspin { 0% { transform: scaleX(1); } 25% { transform: scaleX(.12); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(.12); } 100% { transform: scaleX(1); } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes wipeR { to { clip-path: inset(0 0 0 0); } }
@keyframes drift { to { transform: translateX(calc(100vw + 560px)); } }
@keyframes pulse { 50% { opacity: .55; transform: scale(.93); } }
@keyframes shine { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes nudge { 50% { transform: translateY(6px); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes flow { to { background-position: var(--tile) var(--tile); } }
@keyframes spark { 0% { transform: scale(0) rotate(0); opacity: 1; } 50% { transform: scale(1) rotate(45deg); } 100% { transform: scale(0) rotate(90deg); opacity: 0; } }
@keyframes fall { to { transform: translate(var(--dx), 70vh) rotate(var(--r)); opacity: 0; } }
@keyframes popup { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -60px); opacity: 0; } }

@media (max-width: 820px) {
  :root { --tile: 48px; }
  .links a:not(.mc-btn) { display: none; }
  .links a.nav-donat { display: inline-flex; }
  .nav-online .lbl { display: none; }
  .nav-online { padding: 4px 8px; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 20px; }
  .split.flip .scene { order: 0; }
  .scene { min-height: 200px; }
  .cube { --s: 110px; }
  .item-spin { width: 110px; height: 110px; }
  .hud { top: auto; bottom: 10px; left: 10px; font-size: 10px; opacity: .85; }
  .tree.left { display: none; }
  .lava-pool { width: 60%; }
  .lava-pool.r { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { clip-path: none; }
}
