/* TandemMC website — shared styles for index.html and store.html */

:root {
  --bg: #090d18;
  --bg-2: #0d1322;
  --surface: #111829;
  --surface-2: #161f35;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8edf7;
  --muted: #93a0bd;
  --faint: #5f6b87;
  --aqua: #22d3ee;
  --purple: #a78bfa;
  --pink: #f472b6;
  --green: #4ade80;
  --gold: #fbbf24;
  --brand: linear-gradient(120deg, #22d3ee 0%, #7aa8f5 50%, #a78bfa 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 8px; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.gradient-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pixel { image-rendering: pixelated; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(9, 13, 24, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand svg, .brand-icon { width: 36px; height: 36px; border-radius: 9px; }
.brand b { font-weight: 800; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .28); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); border: 0; color: #08111f; box-shadow: 0 10px 30px -10px rgba(34, 211, 238, .55); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(167, 139, 250, .65); }
.btn-discord { background: #5865f2; border: 0; color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 13px; border-radius: 10px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- IP pill ---------- */
.ip-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border-strong);
  cursor: pointer; transition: border-color .15s, background .15s; text-align: left;
}
.ip-pill:hover { border-color: var(--aqua); background: rgba(34, 211, 238, .06); }
.ip-pill .ip { font-family: var(--mono); font-weight: 600; letter-spacing: .01em; }
.ip-pill .copy { font-size: .8rem; color: var(--muted); padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(255, 255, 255, .05); }
.status.online .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, .05); } }

/* ---------- hero bento ---------- */
.hero { padding: 48px 0 28px; }
.bento { display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow);
}
.tile-main { grid-row: span 2; padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.eyebrow { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); color: var(--muted); }
.chip.live { color: var(--green); border-color: rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .08); }
.chip.soon { color: var(--purple); border-color: rgba(167, 139, 250, .3); background: rgba(167, 139, 250, .08); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.04em; margin: 0; font-weight: 800; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tile-logo { grid-column: span 2; display: grid; place-items: center; padding: 10px; background: radial-gradient(circle at 50% 50%, rgba(122, 168, 245, .28), transparent 62%), var(--surface); }
.tile-logo img { width: min(400px, 100%); height: auto; filter: drop-shadow(0 22px 40px rgba(34, 211, 238, .3)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.tile-stat { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 150px; }
.tile-stat .big { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tile-stat .label { color: var(--muted); font-size: .92rem; }
.tile-discord { background: linear-gradient(160deg, rgba(88, 101, 242, .35), rgba(88, 101, 242, .08)), var(--surface); }
.tile-discord svg { width: 34px; height: 34px; }
.tile-stats { display: grid; gap: 14px; align-content: center; }
.tile-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.tile-stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.tile-stats strong { font-size: 1.2rem; letter-spacing: -.02em; }

/* built for duos */
.features { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; }
.feature h3 { margin: 0; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: linear-gradient(135deg, rgba(34, 211, 238, .18), rgba(167, 139, 250, .18)); border: 1px solid var(--border); }
code.inline { font-family: var(--mono); font-size: .82em; color: var(--aqua); background: rgba(34, 211, 238, .08); padding: 1px 6px; border-radius: 6px; }
.link { color: var(--aqua); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 56ch; }

/* game modes */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mode { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.mode:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.mode-art { position: relative; aspect-ratio: 4 / 3; background: #0b0f1a; overflow: hidden; }
.mode-art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .5s; }
.mode:hover .mode-art img { transform: scale(1.1); }
.mode-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 2%, transparent 55%); }
.mode-art .chip { position: absolute; top: 12px; left: 12px; z-index: 1; backdrop-filter: blur(6px); }
.mode-body { padding: 4px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mode-body h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.mode-body p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.mode-body code { font-family: var(--mono); font-size: .8rem; color: var(--aqua); background: rgba(34, 211, 238, .08); padding: 3px 7px; border-radius: 6px; align-self: flex-start; }
.mode.is-soon .mode-art img { filter: saturate(.55) brightness(.75); }

/* how to join */
.join { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.steps li::before { content: counter(step); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--brand); color: #08111f; }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: .95rem; }
.mc-window { background: #1e1e1e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='16' height='16' fill='%23262626'/%3E%3Crect x='16' y='16' width='16' height='16' fill='%23262626'/%3E%3C/svg%3E"); border: 2px solid #000; border-radius: 6px; padding: 26px; box-shadow: inset 0 0 0 2px #3d3d3d, var(--shadow); font-family: var(--mono); }
.mc-title { text-align: center; color: #fff; margin: 0 0 18px; text-shadow: 2px 2px #3f3f3f; font-weight: 600; }
.mc-field { margin-bottom: 16px; }
.mc-field label { display: block; color: #a0a0a0; font-size: .85rem; margin-bottom: 6px; }
.mc-input { background: #000; border: 2px solid #a0a0a0; color: #fff; padding: 10px 12px; min-height: 44px; white-space: nowrap; overflow: hidden; }
.mc-input .caret { display: inline-block; width: 9px; background: #fff; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mc-btn { display: block; text-align: center; padding: 10px; color: #fff; background: #6f6f6f; border: 2px solid #000; box-shadow: inset 0 2px #a8a8a8, inset 0 -3px #4b4b4b; margin-top: 8px; text-shadow: 2px 2px #3f3f3f; }
.mc-btn.ready { background: #4d8f3a; box-shadow: inset 0 2px #7fd16a, inset 0 -3px #2f5b23; }

/* ranks teaser */
.rank-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.rank-tag { font-weight: 800; letter-spacing: .06em; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .95rem; }

/* CTA band */
.cta-band { border-radius: 24px; padding: 44px; text-align: center; background: radial-gradient(600px 220px at 50% 0%, rgba(34, 211, 238, .25), transparent), radial-gradient(500px 220px at 50% 100%, rgba(167, 139, 250, .25), transparent), var(--surface); border: 1px solid var(--border); display: grid; gap: 18px; justify-items: center; }
.cta-band h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.03em; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 40px 0 28px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid h4 { color: var(--text); margin: 0 0 10px; font-size: .95rem; }
.footer-grid a { display: block; padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--faint); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--surface-2); border: 1px solid var(--border-strong); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); z-index: 100; font-weight: 600; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.modal { position: fixed; inset: 0; display: none; place-items: center; z-index: 90; padding: 16px; background: rgba(4, 6, 12, .7); backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: grid; gap: 14px; animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.modal-card p { margin: 0; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; color: var(--muted); font-weight: 500; }
.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font: inherit; }
.input:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row img { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-2); }
.error { color: #fb7185; font-size: .85rem; min-height: 1.2em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-main { grid-column: span 2; grid-row: auto; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .join { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .menu-toggle { display: grid; place-items: center; }
  .nav-right .btn-play { display: none; }
  .bento { grid-template-columns: 1fr; }
  .tile-main, .tile-logo { grid-column: auto; }
  .features { grid-template-columns: 1fr; }
  .tile-main { padding: 28px 22px; }
  .modes { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .cta-band { padding: 32px 20px; }
  .ip-pill { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================== store */
.store-hero { padding: 40px 0 10px; display: grid; gap: 10px; }
.store-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.store-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.user-chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; font-weight: 600; }
.user-chip img { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-2); image-rendering: pixelated; }
.user-chip small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; line-height: 1; }

.banner { margin: 22px 0 6px; border-radius: var(--radius); padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(110deg, rgba(34, 211, 238, .16), rgba(167, 139, 250, .16) 60%, rgba(244, 114, 182, .14)); border: 1px solid rgba(167, 139, 250, .3); }
.banner strong { font-size: 1.1rem; }
.banner .countdown { display: flex; gap: 8px; font-family: var(--mono); }
.banner .countdown span { background: rgba(0, 0, 0, .3); border-radius: 10px; padding: 6px 10px; min-width: 52px; text-align: center; font-weight: 700; }
.banner .countdown small { display: block; font-family: var(--font); font-size: .65rem; color: var(--muted); font-weight: 500; }

.segmented { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.segmented button { border: 0; background: none; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.segmented .save { font-size: .72rem; color: var(--green); margin-left: 6px; }

.ranks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.rank-card { --c: var(--aqua); position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px 22px 22px; border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--surface-2)), var(--surface) 45%); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--border)); transition: transform .2s, box-shadow .2s; }
.rank-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 60%, transparent); }
.rank-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--c); }
.rank-card.is-gradient { --c: #8b9cf6; }
.rank-card.is-gradient::before { background: var(--brand); }
.rank-card.popular { border-width: 2px; }
.badge { position: absolute; top: -12px; right: 18px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; background: var(--brand); color: #08111f; }
.rank-name { font-weight: 800; letter-spacing: .08em; font-size: 1.5rem; color: var(--c); line-height: 1; }
.rank-tagline { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.price .was { color: var(--faint); text-decoration: line-through; }
.price .per { color: var(--muted); font-size: .9rem; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; font-size: .94rem; flex: 1; }
.perks li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.perks li::before { content: ""; width: 18px; height: 18px; margin-top: 2px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.rank-card .btn-buy { background: var(--c); color: #08111f; border: 0; }
.rank-card.is-gradient .btn-buy { background: var(--brand); }

.sub-card { --c: #f472b6; margin-top: 16px; display: grid; grid-template-columns: 1.1fr 1.4fr auto; gap: 26px; align-items: center; padding: 26px 28px; border-radius: var(--radius); background: linear-gradient(110deg, rgba(244, 114, 182, .14), rgba(167, 139, 250, .12)), var(--surface); border: 1px solid rgba(244, 114, 182, .3); }
.sub-card .rank-name { background: linear-gradient(120deg, #f472b6, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub-card .perks { grid-template-columns: 1fr 1fr; }
.sub-card .btn-buy { background: linear-gradient(120deg, #f472b6, #a78bfa); color: #fff; border: 0; }

.compare-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .94rem; }
.compare th, .compare td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--muted); }
.compare thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 800; letter-spacing: .06em; }
.compare tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.yes { color: var(--green); font-weight: 800; }
.no { color: var(--faint); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.info h3 { margin: 0; font-size: 1.1rem; }
.info p { margin: 0; color: var(--muted); font-size: .94rem; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pay-methods span { font-size: .78rem; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.preview-note { margin-top: 14px; font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.preview-note b { color: var(--gold); }
.preview-note[hidden] { display: none; }

@media (max-width: 1000px) {
  .ranks { grid-template-columns: repeat(2, 1fr); }
  .sub-card { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .user-chip small { display: none; }
  .user-chip { padding: 4px 10px 4px 4px; font-size: .9rem; }
  .ranks { grid-template-columns: 1fr; }
  .sub-card .perks { grid-template-columns: 1fr; }
  .store-bar { flex-direction: column; align-items: stretch; }
  .segmented { justify-content: center; }
}

/* =========================================================== rules */
.rules { display: grid; gap: 16px; padding-top: 18px; }
.rule-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; scroll-margin-top: 90px; }
.rule-block h2 { margin: 0 0 12px; font-size: 1.4rem; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 10px; }
.rule-block h2 small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.rule-block ol { margin: 0; padding-left: 22px; display: grid; gap: 9px; }
.rule-block li { color: var(--muted); }
.rule-block li::marker { color: var(--aqua); font-weight: 700; }
.rule-block li b { color: var(--text); }
.punish-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.punish-steps span { padding: 7px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; background: var(--surface-2); border: 1px solid var(--border); }
.punish-steps span:nth-child(1) { color: var(--gold); }
.punish-steps span:nth-child(2) { color: #fb923c; }
.punish-steps span:nth-child(3) { color: #f87171; }
.punish-steps span:nth-child(4) { color: #ef4444; border-color: rgba(239, 68, 68, .4); }
a.chip:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------------------------------------------------------------- leaderboards (homepage) */
.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lb-card h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.lb-votes { background: linear-gradient(180deg, rgba(34, 211, 238, .08), var(--surface) 40%); border-color: rgba(34, 211, 238, .25); }
.lb-donors { background: linear-gradient(180deg, rgba(244, 114, 182, .08), var(--surface) 40%); border-color: rgba(244, 114, 182, .25); }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-row { display: grid; grid-template-columns: 26px 28px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .02); }
.lb-row.top-1 { background: linear-gradient(90deg, rgba(251, 191, 36, .14), transparent); }
.lb-row.top-2 { background: linear-gradient(90deg, rgba(203, 213, 225, .10), transparent); }
.lb-row.top-3 { background: linear-gradient(90deg, rgba(217, 119, 6, .10), transparent); }
.lb-rank { font-family: var(--mono); font-weight: 600; color: var(--faint); text-align: center; }
.top-1 .lb-rank { color: var(--gold); }
.lb-head { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; background: var(--surface-2); }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-value { color: var(--muted); font-size: .9rem; font-family: var(--mono); white-space: nowrap; }
.lb-empty { color: var(--muted); padding: 14px 4px; font-size: .95rem; }
.lb-more { margin-top: auto; color: var(--pink); font-weight: 600; font-size: .95rem; }
.lb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-tab { font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.lb-tab[aria-selected="true"] { color: var(--text); border-color: rgba(167, 139, 250, .5); background: rgba(167, 139, 250, .14); }
.lb-tab:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.lb-note { display: none; margin: 16px 0 0; color: var(--muted); text-align: center; }
.is-preview .lb-note { display: block; }
.lb-skeleton .lb-head, .lb-skeleton .lb-name, .lb-skeleton .lb-value { display: block; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.lb-skeleton .lb-head { height: 28px; }
.lb-skeleton .lb-name { width: 70%; }
.lb-skeleton .lb-value { width: 44px; }
.lb-party { display: grid; grid-template-columns: auto 160px auto; align-items: center; gap: 10px; font-weight: 600; }
.lb-party[hidden] { display: none; }
.lb-party-label { color: var(--purple); }
.lb-party-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.lb-party-bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .6s; }
.lb-party-text { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
@media (max-width: 1000px) { .lb-grid { grid-template-columns: 1fr 1fr; } .lb-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 620px) { .lb-grid { grid-template-columns: 1fr; } .lb-party { grid-template-columns: auto 1fr; } .lb-party-text { grid-column: 1 / -1; } }

/* =========================================================== store home (welcome.html) */
/* Clickable tiles like store.donutsmp.net: 290 / 533 / 220 on top, two 533 tiles below, 24px gaps. */
.store-home { min-height: 100vh; display: flex; flex-direction: column; }
.sh { width: min(1090px, 100% - 32px); margin: 0 auto; padding: 110px 0 40px; display: grid; gap: 24px; flex: 1; align-content: start; }
.sh-top { display: grid; grid-template-columns: 290fr 533fr 220fr; gap: 24px; }
.sh-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sh-brand { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.sh-tile { position: relative; display: block; border-radius: 20px; background: var(--surface); border: 0; padding: 0; cursor: pointer; color: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.sh-tile:hover, .sh-tile:focus-visible { transform: translateY(-4px); box-shadow: 0 22px 44px -22px rgba(34, 211, 238, .45); }
.sh-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
/* Picture tiles are exactly 16:9, so art made at 1920x1080 fills them everywhere. */
.sh-wide { aspect-ratio: 16 / 9; container-type: inline-size; }
.sh-tile h2 { position: absolute; top: 3.4cqw; left: 3.2cqw; margin: 0; font-size: clamp(1.25rem, 5.6cqw, 2rem); font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .65); z-index: 2; }
.sh-tile img { width: 100%; height: 100%; }
.sh-cover { object-fit: cover; transition: transform .5s ease; }
.sh-tile:hover .sh-cover { transform: scale(1.04); }

.sh-logo { flex: 1; min-height: 0; background: linear-gradient(135deg, #22d3ee 0%, #7aa8f5 50%, #a78bfa 100%); }
.sh-logo img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(9, 13, 24, .45)); transition: transform .3s ease; }
/* Full-bleed logo art (1160x920) instead of a transparent logo: add class sh-logo-full to the tile. */
.sh-logo-full img { inset: 0; width: 100%; height: 100%; object-fit: cover; filter: none; }
.sh-logo:hover img { transform: scale(1.05) rotate(-2deg); }

.sh-ip { height: 58px; flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--surface-2); font: 800 1.15rem var(--font); letter-spacing: .02em; text-transform: uppercase; }
.sh-ip svg { width: 30px; height: 30px; flex: none; }
.sh-ip:hover, .sh-ip:focus-visible { box-shadow: 0 0 0 1px rgba(34, 211, 238, .5), 0 22px 44px -22px rgba(34, 211, 238, .45); }

.sh-discord { background: var(--surface-2); }
.sh-discord .sh-clip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px; text-align: center; }
.sh-discord svg { width: 64px; height: 64px; color: #5865f2; margin-bottom: 6px; }
.sh-discord strong { font-size: 1.9rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.sh-members { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.sh-members i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.sh-join .sh-clip { background: #3a2a1d url("../assets/dirt.png") 0 0 / 72px 72px repeat; image-rendering: pixelated; }
.sh-join .sh-clip::before { content: ""; position: absolute; inset: 0; background: rgba(8, 10, 16, .55); }
.sh-mc { position: absolute; left: 25cqw; right: -2px; top: 15cqw; z-index: 1; font-family: "Pixelify Sans", var(--mono); }
.sh-mc-label { display: block; color: #a8a8a8; font-size: 4.4cqw; line-height: 1.2; margin-bottom: 1.2cqw; }
.sh-mc-box { display: flex; align-items: center; height: 9.4cqw; margin-bottom: 3.4cqw; padding: 0 2cqw; border: 2px solid #fff; border-right: 0; background: #000; color: #fff; font-size: 4.4cqw; white-space: nowrap; overflow: hidden; image-rendering: auto; }
.sh-caret { animation: blink 1s steps(1) infinite; }

/* White tooltip above the top-right corner, like DonutSMP. */
.tip { position: absolute; top: -35px; right: 10px; z-index: 5; padding: 5px 15px; border-radius: 5px; background: #fff; color: #424549; font: 700 12px/1.7 var(--font); letter-spacing: .05em; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.tip::after { content: ""; position: absolute; right: 14px; bottom: -5px; width: 10px; height: 10px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.sh-tile:hover .tip, .sh-tile:focus-visible .tip { opacity: 1; transform: none; }

.sh-foot { text-align: center; padding: 30px 16px 34px; color: var(--muted); }
.sh-site { font-family: "Pixelify Sans", var(--mono); font-size: 2rem; font-weight: 700; color: var(--text); }
.sh-note { margin: 0; font-size: .75rem; color: var(--faint); }
.sh-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-family: "Pixelify Sans", var(--mono); }
.sh-links a:hover { color: var(--text); }
.sh-legal { margin: 14px auto 0; max-width: 60ch; font-size: .78rem; color: var(--faint); }

@media (max-width: 960px) {
  .sh { padding-top: 48px; }
  .sh-top { grid-template-columns: 1.3fr 1fr; grid-template-areas: "store store" "brand discord"; }
  .sh-store { grid-area: store; }
  .sh-brand { grid-area: brand; }
  .sh-discord { grid-area: discord; }
  .sh-logo { flex: none; aspect-ratio: 290 / 230; }
}
@media (max-width: 620px) {
  .sh { padding-top: 24px; gap: 16px; }
  .sh-top, .sh-bottom { grid-template-columns: 1fr; gap: 16px; }
  .sh-top { grid-template-areas: "brand" "store" "discord"; }
  .sh-brand { gap: 10px; }
  .sh-logo { aspect-ratio: auto; height: 200px; }
  .sh-discord { min-height: 190px; }
  .sh-tile { border-radius: 16px; }
  /* No hover on phones: tooltips would only flash on tap. */
  .tip { display: none; }
}

/* =========================================================== store page (store.html), DonutSMP-style */
.store-page { --max: 1100px; --card: #141a2a; --pixel: "Pixelify Sans", var(--mono); }
.sp-head { position: relative; display: grid; justify-items: center; gap: 2px; padding: 64px 0 12px; text-align: center; }
.sp-user { position: absolute; top: 16px; right: 0; }
.sp-badge { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, .35), rgba(167, 139, 250, .14) 60%, transparent 72%); transition: transform .2s ease; }
.sp-badge img { width: 78px; height: 78px; }
.sp-badge:hover { transform: scale(1.07) rotate(-3deg); }
.sp-title { margin: 6px 0 0; font-family: var(--pixel); font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: .04em; line-height: 1; }
.sp-tag { margin: 8px 0 0; font-family: var(--pixel); font-size: 1.2rem; color: #b7bfd0; letter-spacing: .03em; }
.sp-ip { margin-top: 4px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px; background: none; border: 0; cursor: pointer; color: var(--aqua); font-family: var(--pixel); font-size: 1.15rem; transition: color .15s; }
.sp-ip svg { width: 16px; height: 16px; opacity: .8; }
.sp-ip:hover { color: var(--purple); }

.sp { padding-bottom: 8px; }
.sp .banner { margin-top: 18px; }
.sp .banner[hidden] { display: none; }
.sp-section { padding: 34px 0; }
.sp-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 22px; }
.sp-row-head h2 { margin: 0; font-family: var(--pixel); font-size: 1.55rem; font-weight: 600; letter-spacing: .03em; }
.sp-row-head p { margin: 0; color: var(--muted); font-size: .9rem; }

.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
/* The popular card sticks out above the others (its flag), so the perk rows still line up. */
#ranks { align-items: end; }
.sp-card { --c: var(--aqua); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 22px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--border-strong); transition: transform .2s ease, border-color .2s ease; }
.sp-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.sp-card.is-gradient { --c: #8b9cf6; }
.sp-card.is-popular { padding-top: 54px; border-color: color-mix(in srgb, var(--c) 70%, transparent); background: color-mix(in srgb, var(--c) 7%, var(--card)); }
.sp-flag { position: absolute; top: 0; left: 0; right: 0; padding: 7px; border-radius: 15px 15px 0 0; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.sp-name { margin: 0; font-family: var(--pixel); font-size: 1.9rem; font-weight: 600; line-height: 1.05; color: var(--c); }
.is-gradient .sp-name { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-line { margin: 0; color: var(--muted); font-size: .88rem; }
.sp-rows { margin: 6px 0 4px; display: grid; flex: 1; align-content: start; }
.sp-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.sp-rows div:last-child { border-bottom: 0; }
.sp-rows dt { color: #c9d1e3; }
.sp-rows dd { margin: 0; font-weight: 700; }
.sp-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; width: 100%; padding: 13px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--border-strong)); background: color-mix(in srgb, var(--c) 9%, #0f1422); cursor: pointer; font-family: var(--pixel); transition: background .15s ease, transform .15s ease; }
.sp-price b { font-size: 1.45rem; font-weight: 700; color: var(--c); }
.sp-price small { font-size: .8rem; color: var(--c); opacity: .85; }
.sp-price span { font-size: .85rem; color: var(--muted); }
.sp-price:hover { background: color-mix(in srgb, var(--c) 20%, #0f1422); transform: translateY(-1px); }
.is-gradient .sp-price b, .is-gradient .sp-price small { color: #a5b4fc; }
.sp-gift { align-self: center; padding: 2px 8px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: .85rem; }
.sp-gift:hover { color: var(--text); }

.sp-sub { --c: #f472b6; display: grid; grid-template-columns: 1.2fr 1fr .9fr; gap: 30px; align-items: center; padding: 28px; background: linear-gradient(110deg, rgba(244, 114, 182, .12), rgba(167, 139, 250, .1)), var(--card); border-color: rgba(244, 114, 182, .35); }
.sp-sub:hover { transform: none; }
.sp-sub .sp-name { background: linear-gradient(120deg, #f472b6, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-sub .sp-rows { margin: 0; }
.sp-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .9rem; color: #c9d1e3; }
.sp-list li::before { content: "✦ "; color: var(--c); }
.sp-sub-buy { display: grid; gap: 10px; }

.sp-duo { align-items: center; text-align: center; padding-top: 38px; }
.sp-save { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; font-family: var(--pixel); font-size: .8rem; font-weight: 700; color: var(--green); background: rgba(74, 222, 128, .14); }
.sp-heads { display: flex; justify-content: center; margin: 6px 0 4px; }
.sp-heads img { width: 64px; height: 64px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 10px 20px rgba(0, 0, 0, .4); transform: rotate(-6deg); }
.sp-heads img + img { margin-left: -14px; transform: rotate(6deg); }
.sp-duo .sp-line s { margin-right: 4px; color: var(--faint); }
.sp-duo .sp-price { margin-top: auto; }

@media (max-width: 1000px) {
  .sp-grid { grid-template-columns: repeat(2, 1fr); }
  .sp-sub { grid-template-columns: 1fr 1fr; }
  .sp-sub-buy { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .sp-head { padding-top: 78px; }
  .sp-grid, .sp-sub { grid-template-columns: 1fr; }
  .sp-row-head { flex-direction: column; }
  .sp-section { padding: 26px 0; }
}

/* =========================================================== stats page (stats.html, stats.tandemmc.net) */
/* Same look as the homepage tiles: plain dark background, rounded cards, pixel headings (heading classes from the store page). */
.st { padding-bottom: 8px; }
.st-party { justify-content: center; margin: 22px auto 0; max-width: 520px; grid-template-columns: auto 1fr auto; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 30px 0 8px; }
.st-card { --c: var(--aqua); display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 22px 20px 20px; border-radius: 20px; background: #111829; box-shadow: inset 0 3px 0 var(--c); }
.st-card h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; font-family: var(--pixel); font-size: 1.45rem; font-weight: 600; letter-spacing: .02em; color: var(--c); }
.st-card h2 small { margin-left: auto; font: 500 .8rem var(--font); color: var(--muted); letter-spacing: 0; }
.st-card .lb-list { flex: 1; align-content: start; }
.st-hint { margin: 0; font-size: .85rem; color: var(--muted); }
.st-hint b { color: var(--text); }
.st-link { color: var(--pink); font-weight: 600; }
.st-link:hover { color: var(--text); }
.st .lb-note { margin-top: 18px; }
@media (max-width: 1000px) { .st-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .st-grid { grid-template-columns: 1fr; gap: 16px; } .st-party { grid-template-columns: auto 1fr; } }
