:root {
  --bg: #0f1923;
  --bg-2: #16222e;
  --panel: #1b2733;
  --line: #2a3a49;
  --text: #ece8e1;
  --muted: #8b97a3;
  --red: #ff4655;
  --red-dim: #c93a47;
  --night: #8a5cf6;
  --radius: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 70, 85, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif;
}

h1, h2, h3 { margin: 0; font-weight: 400; }

h1, h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.04em;
}

code {
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg);
  padding: 1px 4px;
  border-radius: 3px;
  word-break: break-all;
}

/* --- Header ------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 30px; line-height: 1; }

.mark {
  width: 22px;
  height: 22px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.account { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.account #account-name:not(:empty) { margin-right: 4px; color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }

/* --- Buttons & inputs --------------------------------------------------- */

button, .button {
  font: 600 14px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
  border-radius: var(--radius);
  padding: 13px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, opacity 0.15s;
}

.primary { background: var(--red); color: #fff; }
.primary:hover { background: var(--red-dim); }
button:disabled { opacity: 0.5; cursor: default; }

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-size: 12px;
}
.ghost:hover { border-color: var(--muted); }

textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

textarea:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; }

select { padding: 11px 10px; }

/* --- Login -------------------------------------------------------------- */

.login {
  max-width: 640px;
  margin: 24px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
}

.login h2 { font-size: 40px; line-height: 1; }
.lede { color: var(--muted); margin: 6px 0 24px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; }

.step-n {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 20px;
  border-radius: 50%;
}

.step-title { margin: 4px 0 2px; font-weight: 700; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.hint strong { color: var(--text); }

.row { display: flex; gap: 10px; align-items: end; margin-top: 10px; flex-wrap: wrap; }
.row .primary { flex: 1 1 auto; }
.region { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }

.phone-help { margin-top: 14px; font-size: 14px; color: var(--muted); }
.phone-help summary { cursor: pointer; color: var(--text); }
.phone-help p { margin: 8px 0 0; }

.fine { margin: 24px 0 0; font-size: 12px; color: var(--muted); }

.error {
  max-width: 640px;
  margin: 16px auto 0;
  padding: 12px 14px;
  border-left: 3px solid var(--red);
  background: rgba(255, 70, 85, 0.1);
  border-radius: var(--radius);
}

.loading { text-align: center; color: var(--muted); margin-top: 24px; }

/* --- Store -------------------------------------------------------------- */

.panel { margin-top: 28px; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.panel-head h2 { font-size: 30px; line-height: 1; }
.timer { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.night .panel-head h2 { color: #b79bff; }

.grid { display: grid; gap: 12px; }
.grid-skins { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-skins { grid-template-columns: repeat(2, 1fr); }
}
.grid-acc { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid-bundles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  --tier: var(--line);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card .art {
  --pad: 18px;
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--pad);
  aspect-ratio: 16 / 9;
}

/* Absolutely placed so tall art (player cards) can never stretch the frame. */
.card .art img {
  position: absolute;
  inset: var(--pad);
  width: calc(100% - 2 * var(--pad));
  height: calc(100% - 2 * var(--pad));
  object-fit: contain;
}

.skin { border-top: 3px solid var(--tier); }
.skin .art {
  background:
    radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--tier) 35%, transparent), transparent 70%),
    var(--bg-2);
}
.skin .art img { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }

.acc .art { aspect-ratio: 1; background: var(--bg-2); }
.title-art {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 26px;
  text-align: center;
  color: var(--red);
  line-height: 1.1;
}

.bundle .art { --pad: 0px; aspect-ratio: 2 / 1; background: var(--bg-2); }
.bundle .art img { object-fit: cover; }

.meta { padding: 12px 14px 14px; display: grid; gap: 6px; flex: 1; align-content: start; }
.meta-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 20px; }

.tier { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tier); }
.tier img { width: 16px; height: 16px; }

.kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }

.name { font-size: 16px; font-weight: 700; line-height: 1.25; }

.price { display: flex; align-items: center; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
.cost { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cost img { width: 16px; height: 16px; }
.was { color: var(--muted); font-size: 13px; }

.discount {
  background: var(--night);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
}

.bundle .timer { margin-left: auto; }

@media (max-width: 520px) {
  .login { padding: 20px 16px; margin-top: 8px; }
  .login h2 { font-size: 32px; }
  .steps li { grid-template-columns: 1fr; gap: 8px; }
  .grid-skins { grid-template-columns: 1fr; }
  .grid-acc { grid-template-columns: repeat(2, 1fr); }
  .grid-bundles { grid-template-columns: 1fr; }
}
