/* Kingdom SMP store */

:root {
  --bg: #0E0F13;
  --surface: #15161C;
  --surface-2: #1B1C23;
  --line: #262834;
  --line-strong: #343746;
  --text: #EEEFF3;
  --muted: #8E92A3;
  --gold: #F2B84B;
  --gold-deep: #C9852A;
  --gold-soft: rgba(242, 184, 75, .1);
  --amethyst: #9B7BFF;
  --amethyst-soft: rgba(155, 123, 255, .12);
  --green: #4ADE80;
  --danger: #FF6B7A;
  --radius: 16px;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pixel { font-family: var(--pixel); letter-spacing: .01em; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--gold { background: var(--gold); color: #24180A; }
.btn--gold:hover { background: #FFC85F; }
.btn--ghost { background: var(--surface-2); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--line-strong); }
.btn--discord { background: #5865F2; color: #fff; }
.btn--discord:hover { background: #6B76F5; }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 20px; line-height: 1; display: grid; place-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(14, 15, 19, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav__inner { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark { display: grid; place-items: center; }
.brand__mark svg, .brand__mark img { height: 30px; width: auto; display: block; }
.brand__name { font-size: 20px; font-weight: 700; }
.nav__links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.basket-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; font-weight: 600; }
.basket-btn:hover { border-color: var(--line-strong); }
.basket-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.basket-btn__count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #24180A; font-size: 12px; display: grid; place-items: center; }

/* ---------- Hero ---------- */
.hero { padding: 56px 20px 36px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__mark { margin-bottom: 6px; }
.hero__mark img { height: 170px; width: auto; display: block; filter: drop-shadow(0 10px 30px rgba(143, 107, 255, .22)); animation: logo-float 5s ease-in-out infinite; }
@keyframes logo-float { 50% { transform: translateY(-4px); } }
.hero__title { font-size: 34px; font-weight: 700; line-height: 1; margin-bottom: 8px; }
.hero__sub { color: var(--muted); margin-bottom: 18px; }
.ip { display: inline-flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s; }
.ip:hover { border-color: var(--gold); }
.ip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ip__dot.is-online { background: var(--green); box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }
.ip__address { font-family: var(--pixel); font-size: 17px; font-weight: 600; color: var(--gold); }
.ip__copy { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 7px; background: var(--surface-2); color: var(--muted); }
.hero__players { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 20px; }

.notice { margin: 0 0 24px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .07); font-size: 14px; color: var(--text); }
.notice strong { display: block; margin-bottom: 2px; }

/* ---------- Sections ---------- */
.store { padding-bottom: 20px; }
.store__status { color: var(--muted); text-align: center; padding: 40px 0; }
.section { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { font-size: 24px; font-weight: 700; }
.section-head p { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Package cards ---------- */
.card { position: relative; display: flex; flex-direction: column; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card--rank:hover { border-color: rgba(155, 123, 255, .45); }
.card--coins:hover, .card--bundles:hover { border-color: rgba(242, 184, 75, .4); }
.card__art { display: grid; place-items: center; height: 132px; margin-bottom: 8px; }
.card__badge { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(74, 222, 128, .14); color: var(--green); }
.card__badge--limited { background: var(--gold-soft); color: var(--gold); }
.card__title { font-family: var(--pixel); font-size: 22px; font-weight: 700; line-height: 1.15; text-align: center; }
/* Numbers use a regular bold font: in the pixel font a 5 looks like an S */
.card--coins .card__title { font-family: var(--sans); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--gold); }
.card__info { display: flex; flex-direction: column; }

/* A section's only package: one wide card with the art, perks and price side by side */
.card--feature { display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; gap: 28px; padding: 20px 26px; }
.card--feature .card__art { height: 150px; margin: 0; }
.card--feature .card__title { text-align: left; font-size: 28px; }
.card--feature .card__tagline { text-align: left; }
.card--feature .perks { grid-template-columns: 1fr 1fr; column-gap: 24px; margin-top: 12px; }
.card--feature .card__foot { margin: 0; padding: 0; }
.card--rank .card__title { color: #C9B8FF; }
.card__tagline { text-align: center; color: var(--muted); font-size: 13px; margin-top: 4px; }
.perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; font-size: 13.5px; }
.perks li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--text); }
.perks li::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; background: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.card--rank .perks li::before { background: var(--amethyst); box-shadow: 0 0 0 2px var(--amethyst-soft); }
.card__foot { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.buy { display: flex; align-items: baseline; justify-content: center; gap: 6px; width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); transition: border-color .15s, background .15s; }
.buy:hover { border-color: var(--gold); background: var(--gold-soft); }
.card--rank .buy:hover { border-color: var(--amethyst); background: var(--amethyst-soft); }
.buy__price { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.buy__meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.buy.is-busy { opacity: .6; pointer-events: none; }
.card__more { justify-self: center; }

/* ---------- Pixel art ---------- */
.art { width: 192px; height: 144px; overflow: visible; image-rendering: pixelated; }
.art .float { animation: art-float 3.4s ease-in-out infinite; }
.art .glow { animation: art-glow 3.4s ease-in-out infinite; }
.art .sparkle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: art-twinkle 2.6s ease-in-out infinite; }
.card:hover .art .float { animation-duration: 1.8s; }
@keyframes art-float { 50% { transform: translateY(-1.4px); } }
@keyframes art-glow { 50% { opacity: .65; } }
@keyframes art-twinkle { 0%, 100% { opacity: 0; transform: scale(.3); } 45%, 55% { opacity: 1; transform: scale(1); } }
.logo-mark { height: 30px; width: auto; }

/* ---------- Join ---------- */
.join { padding: 30px 20px 60px; border-top: 1px solid var(--line); }
.join__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.panel h3 { font-size: 16px; }
.panel p { color: var(--muted); font-size: 13.5px; }
.panel--discord .btn { margin-top: auto; align-self: flex-start; }
.field-copy { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.field-copy__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 58px; }
.field-copy code { font-family: var(--pixel); font-size: 15px; color: var(--gold); margin-right: auto; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.footer__inner { display: grid; gap: 6px; text-align: center; justify-items: center; }
.footer__inner .pixel { color: var(--text); font-weight: 600; }
.footer__links { display: flex; gap: 16px; margin-top: 6px; }
.footer__links a:hover { color: var(--text); }

/* ---------- Basket drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(420px, 100%); background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0, 0, 0, .45); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.box { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; }
.box h3 { font-size: 14px; }
.hint { font-size: 12.5px; color: var(--muted); }
.input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; }
.input:focus { outline: none; border-color: var(--gold); }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }
.seg { justify-self: start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.seg__btn { padding: 6px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.name-field { flex: 1; min-width: 0; display: flex; align-items: center; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); }
.name-field:focus-within { border-color: var(--gold); }
.name-field .input { border: 0; background: transparent; }
.name-field__prefix { display: none; padding-left: 12px; color: var(--gold); font-weight: 800; }
.name-field.is-bedrock .name-field__prefix { display: block; }
.name-field.is-bedrock .input { padding-left: 1px; }
.name-preview b { color: var(--gold); }

/* 404 page */
.lost { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 40px 16px; text-align: center; }
.lost img { height: 150px; width: auto; }
.lost h1 { font-size: 30px; }
.lost p { color: var(--muted); }
.buyer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.buyer b { font-family: var(--pixel); color: var(--gold); font-size: 16px; }
.items { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.item__name { font-weight: 600; font-size: 14px; }
.item__price { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.item__controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 28px; border: 0; background: var(--surface-2); }
.qty button:hover { background: var(--line); }
.qty span { min-width: 30px; text-align: center; font-size: 13px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
.coupons { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 12px; font-weight: 700; }
.chip button { border: 0; background: none; color: inherit; padding: 0 4px; }
.totals { display: grid; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .totals__total { color: var(--text); font-weight: 700; font-size: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.totals__total span:last-child { color: var(--gold); font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.secure { text-align: center; font-size: 12px; color: var(--muted); }
.error { color: var(--danger); font-size: 13px; }

/* ---------- Details dialog ---------- */
.details { width: min(620px, calc(100% - 24px)); max-height: calc(100% - 40px); padding: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.details::backdrop { background: rgba(0, 0, 0, .65); }
.details__inner { padding: 22px; display: grid; gap: 14px; }
.details__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.details__top h2 { font-family: var(--pixel); font-size: 26px; line-height: 1.1; }
.details__art { display: grid; place-items: center; padding: 6px 0; }
.desc { font-size: 14px; color: #C9CCD6; }
.desc h1, .desc h2 { font-size: 17px; color: var(--text); margin: 16px 0 6px; }
.desc h3, .desc h4 { font-size: 15px; color: var(--text); margin: 14px 0 4px; }
.desc p { margin: 6px 0; }
.desc ul, .desc ol { margin: 6px 0; padding-left: 20px; }
.desc li { margin: 3px 0; }
.desc blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--gold); color: var(--muted); }
.desc hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.desc code { font-family: var(--pixel); color: var(--gold); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; padding: 11px 16px; border-radius: 10px; background: var(--gold); color: #24180A; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 32px); text-align: center; }
.toast--error { background: var(--danger); color: #1A0508; }

@media (max-width: 860px) {
  .join__grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .card--feature { grid-template-columns: 1fr; gap: 6px; text-align: center; }
  .card--feature .card__title, .card--feature .card__tagline { text-align: center; }
  .card--feature .perks { grid-template-columns: 1fr; }
  .card--feature .card__foot { padding-top: 14px; }
}
@media (max-width: 480px) {
  .hero__title { font-size: 30px; }
  .hero__mark img { height: 140px; }
  .basket-btn__label { display: none; }
  .art { width: 160px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art *, .card, .btn, .hero__mark img { animation: none !important; transition: none !important; }
  .art .sparkle { opacity: .8; }
}
