/* TrickPvP store: Nether theme. Needs tokens.css, components.css and scene.css. */

/* ---------- page basics ---------- */
html { scroll-behavior: smooth; }
.pixel-ui [hidden] { display: none !important; }
.pixel-ui img.pixel { image-rendering: pixelated; }
.pixel-ui section[id] { scroll-margin-top: 92px; }
.pixel-ui section.journey { scroll-margin-top: var(--head, 70px); }

/* ruby button: white text needs the darker middle */
.pixel-ui .btn.ruby { color: var(--on-ruby); background: linear-gradient(#d4355a, #bd143c 45%, #a30f34); box-shadow: var(--bevel-ruby); text-shadow: 0 2px 0 rgb(40 0 8 / 0.7); }
.pixel-ui .btn.ruby:hover { background: linear-gradient(#df4466, #cb1d46 45%, #b01339); }
.pixel-ui .btn.tab[aria-current="page"] { color: var(--on-ruby); background: #b61a40; box-shadow: var(--bevel-ruby); transform: translateY(3px); }

/* ---------- header ---------- */
.brand { color: inherit; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.pixel-ui .player-chip img { width: 22px; height: 22px; image-rendering: pixelated; }
.head-actions { display: flex; gap: 12px; }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; min-height: max(620px, calc(100svh - var(--head, 70px) - 40px)); align-content: center; padding: 36px 0 90px; isolation: isolate; }
.hero > canvas { z-index: -1; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
.hero-logo { position: relative; width: 148px; height: 148px; margin-bottom: 6px; }
/* a plain drop shadow lifts the logo off the sky; glow is kept for items only */
.hero-logo img { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 12px 14px rgb(0 0 0 / 0.65)); }
.hero .pixel-title { font-size: var(--text-page); }

/* the "Who is this for?" form */
.who { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 22px 20px 30px; }
.who label, .who p { grid-column: 1 / -1; }
.who label { font: 24px/1 var(--font-display); }
.who p { font-size: var(--text-small); color: var(--ink-muted); }
.who p.error { color: var(--ruby-shine); }
.who .slot { width: 44px; height: 44px; }
.who .slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.pixel-ui .who .btn { grid-column: 1 / -1; }

/* ---------- lava seam between sky and ground ---------- */
.lava { position: relative; height: 30px; background: var(--tex-lava) 0 0 / var(--tile) var(--tile); animation: flow 9s steps(48) infinite; box-shadow: 0 -4px 0 var(--edge), 0 4px 0 var(--edge); z-index: 2; }
@keyframes flow { to { background-position: var(--tile) 0; } }
.netherrack { height: var(--tile); background: var(--tex-netherrack) 0 0 / var(--tile) var(--tile); box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.45); }
.underground { padding-bottom: 1px; background: var(--tex-blackstone) 0 0 / 288px 288px; }

.section-gap { margin-top: 56px; }

/* ---------- enchantment shimmer, clipped to the item's own shape as in game (--sprite is the item) ---------- */
.glint { position: relative; }
.glint::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: var(--sprite-size, 48px); height: var(--sprite-size, 48px);
  transform: translate(-50%, -50%); pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: var(--sprite) center / 100% 100% no-repeat; mask: var(--sprite) center / 100% 100% no-repeat;
  background: repeating-linear-gradient(115deg, transparent 0 14px, rgb(190 90 255 / 0.55) 20px, rgb(255 120 220 / 0.3) 25px, transparent 31px 48px);
  background-size: 160px 100%; animation: glint 3.2s linear infinite;
}
@keyframes glint { to { background-position: 160px 0; } }
.hero-item .item-art { --sprite-size: 176px; }
.side-item .item-art { --sprite-size: 96px; }

/* ---------- kits and extras: one wide kit, two stacked extras ---------- */
.loot { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.item { --tier: var(--ruby); position: relative; background: var(--row); box-shadow: var(--outline), inset 0 3px 0 rgb(255 255 255 / 0.06); transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
/* hover lifts the card: an outline marks it, a dark shadow gives the height */
.item:hover, .item:focus-within { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--tier), 0 14px 22px -10px rgb(0 0 0 / 0.7); }
.item h3 { font: 400 30px/1 var(--font-display); }
.item p { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }
.price { font: 38px/1 var(--font-display); color: var(--ink); }
.price small { margin-left: 8px; font: 16px var(--font-pixel); color: var(--ink-muted); }
.price.tbc { font-size: 24px; color: var(--ink-muted); }
.buy-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }

/* item pictures: display sizes are whole multiples of the 16px textures. The glow is on items only. */
.item-art { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--well); box-shadow: var(--bevel-well); }
.item-art img { width: 128px; height: 128px; image-rendering: pixelated; filter: drop-shadow(0 8px 6px rgb(0 0 0 / 0.6)) drop-shadow(0 0 16px var(--tier)); }

.item.hero-item { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.hero-item .item-art { flex: 1; min-height: 250px; }
.pixel-ui .hero-item .item-art img { width: 176px; height: 176px; }
.stack { display: grid; gap: 20px; }
.item.side-item { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 18px; }
.side-item .item-art { min-height: 150px; }
.pixel-ui .side-item .item-art img { width: 96px; height: 96px; }
.side-item > div:last-child { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.item:hover .wobble img { animation: wobble 0.5s steps(6) 1; }
@keyframes wobble { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.pixel-ui button.item-art { width: 100%; height: 100%; background: var(--well); cursor: pointer; }
.kill-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kill-art img { position: relative; }

/* ---------- Minecraft hover tooltip ---------- */
.mc-tip { position: fixed; z-index: 60; max-width: 260px; padding: 10px 12px 11px; pointer-events: none; background: rgb(14 3 6 / 0.96); box-shadow: 0 0 0 2px #0e0306, inset 0 0 0 2px #7c1130, 0 10px 22px rgb(0 0 0 / 0.5); font: 17px/1.25 var(--font-pixel); }
.mc-tip b { display: block; font-weight: 400; font-size: 21px; color: var(--tier, var(--ruby-shine)); }
.mc-tip span { display: block; margin-top: 3px; color: #c9aab0; }

/* ---------- particle layers ---------- */
.bursts { position: fixed; inset: 0; z-index: 55; width: 100%; height: 100%; pointer-events: none; }
.embers { position: fixed; inset: 0; z-index: 15; width: 100%; height: 100%; pointer-events: none; }

/* ---------- popups ---------- */
.pixel-ui dialog .btn.discord { width: 100%; }
.pixel-ui #sum-img { width: 48px; height: 48px; }
.notice { padding: 12px 14px; background: var(--ruby-wash); box-shadow: inset 0 0 0 2px var(--ruby-shade); font-size: 14px; }

/* checkout popup: scrolls on short phones */
.pixel-ui dialog#checkout { max-height: calc(100svh - 24px); overflow: auto; }
.checkout-part { display: grid; gap: 10px; }
.checkout-part label { font: 19px var(--font-pixel); }
.checkout-part .fine { font-size: var(--text-small); color: var(--ink-muted); }
.checkout-status { font-size: 14px; color: var(--ink-soft); }
.checkout-status.error { padding: 10px 12px; color: var(--ink); background: var(--ruby-wash); box-shadow: inset 0 0 0 2px var(--ruby-light); }
.terms-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; }
.checkout-part .agree { display: flex; align-items: center; gap: var(--space-3); min-height: var(--hit); font: 14px var(--font-body); cursor: pointer; }
.pixel-ui .agree input { appearance: none; flex: none; width: 24px; height: 24px; padding: 0; background: var(--well); box-shadow: var(--bevel-well); cursor: pointer; }
.pixel-ui .agree input:checked { background: var(--ruby-hover); box-shadow: inset 3px 3px 0 var(--ruby-shine), inset -3px -3px 0 var(--ruby-shade); }
.agree input:checked::after { content: ""; display: block; width: 14px; height: 14px; margin: 5px; background: #fff; clip-path: polygon(0 55%, 15% 40%, 38% 62%, 85% 10%, 100% 25%, 38% 90%); }
.terms-row a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--ink); }

/* shown after coming back from Tebex */
.return-note { position: fixed; z-index: 70; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; width: min(560px, 100% - 24px); padding: 14px 18px; background: var(--panel-bottom); box-shadow: var(--frame-window); }
.return-note p { flex: 1 1 240px; }

/* ---------- footer ---------- */
.footer { align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; font: 17px var(--font-pixel); }
.footer a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--ink); }
.footer a:hover { color: var(--ruby-shine); }

/* ---------- "Pause motion": stops every loop. animation: none, so nothing freezes half-faded ---------- */
html.motion-off .pixel-ui *, html.motion-off .pixel-ui *::before, html.motion-off .pixel-ui *::after { animation: none !important; }
html.motion-off .glint::after, html.motion-off .inv-slot.enchanted::after, html.motion-off .embers { display: none; }
html.motion-off .reveal.waiting { opacity: 1; transform: none; }
html.motion-off { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { [data-motion] { display: none !important; } }
/* pause bars while playing, a play triangle while paused */
.motion-icon { width: 10px; height: 12px; background: currentColor; clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
[data-motion][aria-pressed="true"] .motion-icon { clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .hero .wrap, .loot { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
}
@media (max-width: 680px) {
  .item.side-item { grid-template-columns: 1fr; }
  .pixel-ui .head-actions .discord { display: none; }
  .pixel-ui .topbar { gap: 8px; padding-inline: 12px; justify-content: space-between; }
  .head-actions { gap: 8px; }
  /* keep the header to two rows: icon-only buttons, with their names still read out */
  .motion-compact span, .player-chip span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pixel-ui .btn.motion-compact, .pixel-ui .btn.player-chip { width: var(--hit); padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pixel-ui .item { transition: none; }
  .glint::after { display: none; }
}
