/* ==========================================================================
   webGameUniverse - stylesheet
   Dark, cozy, arcade-shelf. No framework, no build step.
   Edit the tokens below to re-skin the whole site.
   ========================================================================== */

/* ------------------------------- tokens ---------------------------------- */
:root {
  --bg:        #0a0912;
  --bg-2:      #100e1c;
  --panel:     #17142a;
  --panel-2:   #201b38;
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  --ink:       #f4eeff;
  --muted:     #a79ec6;
  --muted-2:   #7d7499;

  --amber:     #ffb454;
  --pink:      #ff5fa2;
  --cyan:      #5fd3ff;
  --mint:      #7ef0c0;
  --violet:    #9d7bff;

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 22px 45px -22px rgba(0, 0, 0, 0.95);
  --glow:      0 0 0 1px rgba(255, 180, 84, 0.25), 0 18px 40px -20px rgba(255, 180, 84, 0.35);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --wrap: 1180px;
}

/* ------------------------------- reset ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 12% -10%, rgba(157, 123, 255, 0.20), transparent 60%),
    radial-gradient(900px 520px at 92% 4%,   rgba(255, 95, 162, 0.14), transparent 60%),
    radial-gradient(1200px 700px at 50% 115%, rgba(95, 211, 255, 0.10), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, #0b0a13 100%);
  background-attachment: fixed;
}

/* faint grid, like the back wall of an arcade */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 85%);
}

img { max-width: 100%; display: block; }

a { color: var(--amber); text-decoration: none; }
a:hover { color: #ffd39a; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.02em; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel-2);
  padding: .6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 99;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ------------------------------- header ---------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(10, 9, 18, 0.92), rgba(10, 9, 18, 0.62));
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: 1.06rem;
}
.brand:hover { color: var(--ink); }
.brand .mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--pink), var(--violet) 55%, var(--cyan));
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -8px rgba(255, 95, 162, 0.9);
}
.brand .mark svg { width: 18px; height: 18px; display: block; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .94rem;
}
.nav a {
  color: var(--muted);
  padding: .42rem .72rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 180, 84, 0.09);
}

/* ------------------------------- hero ------------------------------------ */
.hero { padding: 62px 0 26px; text-align: center; position: relative; }

.hero-kicker {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 14px;
  opacity: .85;
}
.hero-kicker::before,
.hero-kicker::after { content: "·"; margin: 0 10px; color: var(--muted-2); }

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  font-weight: 900;
  margin: 0 0 14px;
  letter-spacing: -0.045em;
}
.hero-title .uni {
  background: linear-gradient(100deg, var(--amber), var(--pink) 46%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 42px rgba(255, 95, 162, 0.22);
}

.hero-tag {
  max-width: 46ch;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
}
.pill {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: .3rem .78rem;
  background: rgba(255, 255, 255, 0.03);
}
.pill b { color: var(--amber); font-weight: 700; }

/* ---- marquee: a little "insert coin" folk art --------------------------- */
.marquee {
  margin: 34px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
  overflow: hidden;
  padding: 9px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.6rem;
  width: max-content;
  animation: slide 32s linear infinite;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.marquee-track span:nth-child(3n+1) { color: var(--amber); }
.marquee-track span:nth-child(3n+2) { color: var(--cyan); }
.marquee-track span:nth-child(3n)   { color: var(--pink); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------------------------------- shelf ----------------------------------- */
.shelf { padding: 46px 0 90px; }

.shelf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.shelf-title {
  font-size: 1.3rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.shelf-title::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--amber);
  box-shadow: 0 0 14px 2px rgba(255, 180, 84, 0.6);
}

.search {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}
.search input {
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .52rem 1rem .52rem 2.2rem;
  min-width: 210px;
  transition: border-color .18s ease, background .18s ease;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus {
  border-color: rgba(95, 211, 255, 0.5);
  background: rgba(95, 211, 255, 0.06);
  outline: none;
}
.search svg {
  position: absolute;
  left: .78rem;
  width: 15px; height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}

/* the plank the games sit on */
.plank-area { position: relative; }
.plank-area::after {
  content: "";
  position: absolute;
  left: -22px; right: -22px;
  bottom: 26px;
  height: 14px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.35)),
    linear-gradient(90deg, #2a2140, #382b52 40%, #2a2140);
  box-shadow: 0 22px 40px -20px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 26px;
  position: relative;
  z-index: 1;
}

/* ------------------------------- card ------------------------------------ */
.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.2, .7, .3, 1.2), border-color .2s ease, box-shadow .2s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-6px) rotate(-0.35deg);
  border-color: rgba(255, 180, 84, 0.42);
  box-shadow: var(--glow);
}

.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #2a2140, #141122);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.045); }

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 9, 18, 0.75));
  pointer-events: none;
}

.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .26rem .6rem;
  border-radius: 999px;
  color: #12101c;
  background: var(--mint);
  font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(126, 240, 192, 0.9);
}
.card-badge[data-status="soon"] { background: var(--cyan); }
.card-badge[data-status="wip"]  { background: var(--amber); }
.card-badge[data-status="playable"] { background: var(--mint); }

.card-body {
  padding: 16px 17px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.card-title { font-size: 1.12rem; margin: 0; }

.card-pitch {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.card-tags span { border: 1px solid var(--line); border-radius: 5px; padding: .12rem .42rem; }

.card-foot { display: flex; gap: 9px; margin-top: 4px; }

/* ------------------------------- buttons --------------------------------- */
.btn {
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: .58rem 1.15rem;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .14s ease, filter .16s ease, background .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-play {
  flex: 1;
  color: #1a1206;
  background: linear-gradient(180deg, #ffcd82, var(--amber));
  box-shadow: 0 12px 26px -14px rgba(255, 180, 84, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-play:hover { filter: brightness(1.07); color: #1a1206; }
.btn-play::before { content: "▶"; font-size: .68rem; }

.btn-ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.09); }

.btn-sm { padding: .42rem .8rem; font-size: .82rem; border-radius: 9px; }

/* ------------------------------- states ---------------------------------- */
.shelf-status {
  margin: 8px 0 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: .94rem;
}
.shelf-status h3 { color: var(--ink); font-size: 1rem; margin-bottom: .3rem; }
.shelf-status code {
  font-family: var(--mono);
  font-size: .84rem;
  background: rgba(255, 255, 255, 0.07);
  padding: .1rem .4rem;
  border-radius: 5px;
  color: var(--amber);
}

.skeleton {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.skeleton .b {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton .b.thumb { aspect-ratio: 16/9; }
.skeleton .b.line { height: 13px; border-radius: 6px; margin: 12px 17px 0; }
.skeleton .b.line.short { width: 45%; margin-bottom: 20px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------- game page ------------------------------- */
.crumbs { padding: 26px 0 4px; font-size: .92rem; }
.crumbs a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.crumbs a:hover { color: var(--amber); }
.crumbs a::before { content: "←"; font-size: 1rem; }

.play-head { padding: 12px 0 22px; max-width: 78ch; }
.play-head h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
.play-head p { color: var(--muted); margin: 0 0 12px; }
.play-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-2);
}
.play-chips span { border: 1px solid var(--line); border-radius: 6px; padding: .2rem .5rem; }

/* the cabinet */
.cabinet {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #1c1830, #12101f);
  padding: 12px;
  box-shadow: 0 40px 80px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cabinet-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 12px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.cabinet-lamp {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px 2px rgba(126, 240, 192, 0.75);
}
.cabinet-lamp.b2 { background: var(--pink);  box-shadow: 0 0 12px 2px rgba(255, 95, 162, 0.75); }
.cabinet-lamp.b3 { background: var(--cyan);  box-shadow: 0 0 12px 2px rgba(95, 211, 255, 0.75); }
.cabinet-name { margin-left: auto; color: var(--muted); }

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #05040a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}
.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #05040a;
}
.frame :fullscreen { border-radius: 0; }

.frame-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: .94rem;
}
.frame-note b { color: var(--ink); display: block; font-size: 1.05rem; }

.cabinet-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 2px;
}
.cabinet-bottom .spacer { flex: 1; }
.coin {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.game-body { display: grid; gap: 26px; grid-template-columns: 1.55fr 1fr; padding: 34px 0 0; }
@media (max-width: 860px) { .game-body { grid-template-columns: 1fr; } }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  padding: 20px 22px;
}
.panel h2 { font-size: .82rem; font-family: var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--amber); }
.panel p { margin: 0 0 10px; color: var(--muted); }
.panel p:last-child { margin-bottom: 0; }
.panel ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.panel li { margin-bottom: .35rem; }
.panel code { font-family: var(--mono); font-size: .84rem; color: var(--cyan); background: rgba(95, 211, 255, 0.09); padding: .08rem .38rem; border-radius: 5px; }

/* ------------------------------- about ----------------------------------- */
.prose { max-width: 68ch; margin: 0 auto; padding: 8px 0 90px; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: .5em; }
.prose h2 {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 2.1em 0 .7em;
}
.prose p { color: #cfc7e6; margin: 0 0 1.05em; }
.prose .lead {
  font-size: 1.16rem;
  color: var(--ink);
  border-left: 3px solid var(--pink);
  padding-left: 16px;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-style: italic;
}
.signoff { font-family: var(--mono); font-size: .82rem; color: var(--muted-2); letter-spacing: .1em; }

/* ------------------------------- footer ---------------------------------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: .88rem;
  position: relative;
  z-index: 1;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
}
.site-foot nav { margin-left: auto; display: flex; gap: 16px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--amber); }
.site-foot .tiny { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; }

/* ------------------------------- motion ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .card:hover { transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 42px; }
  .grid { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .site-head .wrap { min-height: 56px; }
  .brand span.full { display: none; }
}

@media (max-width: 400px) {
  .grid { gap: 18px; }
}

/* ==========================================================================
   accounts, profiles and progression
   --------------------------------------------------------------------------
   Everything below dresses the account link in the header, the sign in page,
   the profile page, and the "your progress" panel on a game page.
   ========================================================================== */

/* ---- the account link in the nav, once wgu-account.js has dressed it ---- */
.nav a[data-account-link] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}

.chip-avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.25), rgba(255, 95, 162, 0.2));
  border: 1px solid rgba(255, 180, 84, 0.35);
  color: var(--ink);
  font: 700 13px/1 var(--font);
  flex: none;
  overflow: hidden;
}

.chip-name { font-weight: 600; }

.chip-level {
  font-size: 11px;
  color: var(--amber);
  background: rgba(255, 180, 84, .12);
  border: 1px solid rgba(255, 180, 84, .28);
  border-radius: 999px;
  padding: 1px 7px;
  letter-spacing: .02em;
}

/* ---- the sign in page --------------------------------------------------- */
.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 8px 0 40px;
}

.auth-head h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -.01em;
}

.auth-head p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 9, 18, .5);
  margin-bottom: 20px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 14px/1 var(--font);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.tab:hover { color: var(--ink); }

.tab.is-on {
  color: #1a1206;
  background: linear-gradient(135deg, var(--amber), #ffcf8a);
}

.auth-form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}

.field .opt {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 12px;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 9, 18, .55);
  color: var(--ink);
  font: 400 15px/1.4 var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 180, 84, .55);
  box-shadow: 0 0 0 3px rgba(255, 180, 84, .14);
}

.field-hint { font-size: 12px; color: var(--muted-2); line-height: 1.5; }

.auth-msg {
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: rgba(10, 9, 18, .5);
  color: var(--muted);
}

.auth-msg.is-good {
  border-color: rgba(126, 240, 192, .35);
  background: rgba(126, 240, 192, .08);
  color: #bff3dd;
}

.auth-msg.is-bad {
  border-color: rgba(255, 95, 162, .38);
  background: rgba(255, 95, 162, .08);
  color: #ffc4dc;
}

.auth-msg a { color: var(--amber); }

.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.auth-mode { margin: 16px 0 0; color: var(--muted-2); }
.auth-mode.is-php { color: #bff3dd; }

.auth-side h2 { margin: 0 0 12px; font-size: 18px; }

.tick-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tick-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tick-list li::before {
  content: "▸";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--amber);
}

.tick-list b { color: var(--ink); font-weight: 600; }

/* ---- the profile page --------------------------------------------------- */
.gate { text-align: center; padding: 34px 24px; margin: 8px 0 40px; }

.gate h1 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.01em;
}

.gate p { color: var(--muted); line-height: 1.7; max-width: 62ch; margin: 0 auto 18px; }
.gate .auth-actions { justify-content: center; }
.gate .tiny { margin: 18px auto 0; }

#profile-body { display: grid; gap: 22px; margin: 8px 0 40px; }

.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 22px;
  font: 700 30px/1 var(--font);
  color: #1a1206;
  background: linear-gradient(135deg, var(--amber), var(--pink) 70%, var(--violet));
  box-shadow: var(--glow);
}

.profile-id { flex: 1 1 260px; min-width: 0; }

.profile-id h1 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.01em;
}

.profile-id .tiny { margin: 0 0 12px; display: block; }

.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.level-badge {
  font: 700 12px/1 var(--font);
  color: #1a1206;
  background: linear-gradient(135deg, var(--amber), #ffcf8a);
  border-radius: 999px;
  padding: 5px 11px;
  letter-spacing: .02em;
}

.level-bar {
  display: block;
  flex: 1 1 140px;
  max-width: 320px;
  height: 9px;
  border-radius: 999px;
  background: rgba(10, 9, 18, .7);
  border: 1px solid var(--line);
  overflow: hidden;
}

.level-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--pink));
  transition: width .4s ease;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 16px 18px;
  display: grid;
  gap: 4px;
}

.stat-num {
  font: 700 26px/1 var(--font);
  letter-spacing: -.01em;
  color: var(--ink);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-head h2 { margin: 0; }

.prog-list { display: grid; gap: 4px; }

.prog-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.prog-row:hover {
  background: rgba(255, 255, 255, .035);
  border-color: var(--line);
  transform: translateX(2px);
}

.prog-row.is-idle { opacity: .55; }
.prog-row.is-idle:hover { opacity: 1; }

.prog-thumb {
  flex: none;
  width: 64px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2), #2a2447);
  border: 1px solid var(--line);
}

.prog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prog-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }

.prog-title { font-weight: 600; color: var(--ink); }

.prog-ach { color: var(--amber); }

.prog-nums {
  display: flex;
  gap: 18px;
  flex: none;
  text-align: right;
}

.prog-nums span {
  display: grid;
  gap: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted-2);
}

.prog-nums b {
  font: 700 16px/1 var(--font);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.ach {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 9, 18, .35);
  opacity: .6;
}

.ach.is-earned {
  opacity: 1;
  border-color: rgba(255, 180, 84, .35);
  background: linear-gradient(135deg, rgba(255, 180, 84, .1), rgba(255, 95, 162, .06));
}

.ach-mark { font-size: 18px; line-height: 1.2; color: var(--muted-2); flex: none; }
.ach.is-earned .ach-mark { color: var(--amber); }

.ach-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.ach-main b { color: var(--ink); font-size: 14px; }
.ach-main .tiny { color: var(--muted); line-height: 1.55; }

.ach-meta { color: var(--muted-2); white-space: nowrap; flex: none; }
.ach.is-earned .ach-meta { color: var(--mint); }

.danger {
  border-color: rgba(255, 95, 162, .28);
  background: linear-gradient(180deg, rgba(255, 95, 162, .06), rgba(23, 20, 42, .9));
}

.danger h2 { color: #ffc4dc; }

/* ---- "your progress", on a game page ----------------------------------- */
.stat-grid.small { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat-grid.small .stat { padding: 13px 15px; }
.stat-grid.small .stat-num { font-size: 21px; }

/* ---- avatar customization & picker ------------------------------------- */
.avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: none;
}

.avatar-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 11px/1 var(--font);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all .2s ease;
}

.avatar-change-btn:hover {
  color: var(--ink);
  background: rgba(255, 180, 84, 0.16);
  border-color: rgba(255, 180, 84, 0.45);
  transform: translateY(-1px);
}

/* ---- player rank badges ------------------------------------------------- */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 11px/1 var(--font);
  border-radius: 999px;
  padding: 5px 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: all .2s ease;
}

.rank-badge.is-bronze {
  color: #f7d8ba;
  background: linear-gradient(135deg, rgba(193, 126, 75, 0.25), rgba(135, 78, 38, 0.35));
  border: 1px solid rgba(224, 155, 102, 0.45);
}

.rank-badge.is-silver {
  color: #f0f4fc;
  background: linear-gradient(135deg, rgba(180, 195, 215, 0.25), rgba(120, 140, 170, 0.35));
  border: 1px solid rgba(200, 215, 240, 0.5);
}

.rank-badge.is-gold {
  color: #1a1206;
  background: linear-gradient(135deg, #ffd700, #ffb454);
  border: 1px solid rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.3);
}

.rank-badge.is-platinum {
  color: #061c24;
  background: linear-gradient(135deg, #7ef0eb, #5fd3ff);
  border: 1px solid rgba(95, 211, 255, 0.6);
  box-shadow: 0 0 12px rgba(95, 211, 255, 0.3);
}

.rank-badge.is-diamond {
  color: #18092c;
  background: linear-gradient(135deg, #d38aff, #ff5fa2);
  border: 1px solid rgba(211, 138, 255, 0.6);
  box-shadow: 0 0 14px rgba(211, 138, 255, 0.35);
}

.rank-badge.is-mythic {
  color: #ffffff;
  background: linear-gradient(135deg, #ff5fa2, #9d7bff 50%, #5fd3ff);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 16px rgba(255, 95, 162, 0.4);
  animation: mythicShine 3s infinite alternate;
}

@keyframes mythicShine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(30deg); }
}

/* ---- platform badge rewards -------------------------------------------- */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.badge-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 9, 18, 0.4);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.badge-card.is-unlocked {
  border-color: rgba(255, 180, 84, 0.35);
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.08), rgba(157, 123, 255, 0.06));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.badge-card.is-unlocked:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
  box-shadow: 0 8px 24px -6px rgba(255, 180, 84, 0.25);
}

.badge-card.is-locked {
  opacity: 0.65;
}

.badge-card.is-locked:hover {
  opacity: 0.9;
}

.badge-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--panel-2), #2a2447);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
}

.badge-card.is-unlocked .badge-icon-wrap {
  border-color: rgba(255, 180, 84, 0.5);
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.2), rgba(255, 95, 162, 0.15));
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.2);
}

.badge-icon {
  font-size: 22px;
  line-height: 1;
}

.badge-check {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mint);
  color: #061c14;
  font: 700 10px/16px var(--font);
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.badge-info {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.badge-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.badge-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.badge-cat {
  color: var(--muted-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.badge-desc {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  font-size: 12px;
}

.badge-prog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.badge-bar {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.badge-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--mint));
  transition: width .3s ease;
}

.badge-meta {
  color: var(--muted-2);
  font-size: 11px;
  white-space: nowrap;
  flex: none;
}

.badge-card.is-unlocked .badge-meta {
  color: var(--mint);
  font-weight: 600;
}

/* ---- modal dialog & avatar picker -------------------------------------- */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 520px;
  width: 92%;
  margin: auto;
  color: inherit;
}

.modal-dialog::backdrop {
  background: rgba(5, 4, 10, 0.75);
  backdrop-filter: blur(6px);
}

.modal-box {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 180, 84, 0.15);
  display: grid;
  gap: 16px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--ink);
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s ease;
}

.modal-close:hover {
  color: var(--ink);
  background: rgba(255, 95, 162, 0.2);
  border-color: rgba(255, 95, 162, 0.4);
}

.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(10, 9, 18, 0.5);
  border: 1px solid var(--line);
}

.avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 26px;
  flex: none;
}

.avatar-preview-info {
  display: grid;
  gap: 3px;
}

.avatar-preview-info b {
  font-size: 16px;
  color: var(--ink);
}

.avatar-presets-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  font-weight: 700;
  margin-top: 4px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.avatar-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .15s ease;
  color: inherit;
}

.avatar-preset-btn:hover {
  background: rgba(255, 180, 84, 0.12);
  border-color: rgba(255, 180, 84, 0.35);
  transform: scale(1.05);
}

.avatar-preset-btn.is-active {
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.2), rgba(255, 95, 162, 0.15));
  border-color: var(--amber);
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.3);
}

.preset-icon {
  font-size: 24px;
  line-height: 1;
}

.preset-name {
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.avatar-custom-row {
  display: grid;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

.custom-avatar-inputs {
  display: flex;
  gap: 8px;
}

.custom-avatar-inputs input {
  flex: 1 1 auto;
  background: rgba(10, 9, 18, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--ink);
  font: 500 13px var(--font);
}

.custom-avatar-inputs input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(255, 180, 84, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .prog-nums { gap: 12px; }
}

@media (max-width: 640px) {
  .nav a[data-account-link] { padding-left: 9px; margin-left: 0; }
  .chip-name { display: none; }
  .profile-head { gap: 14px; }
  .avatar { width: 58px; height: 58px; border-radius: 18px; font-size: 24px; }
  .prog-row { flex-wrap: wrap; }
  .prog-thumb { width: 52px; height: 30px; }
  .prog-nums { flex: 1 1 100%; justify-content: space-between; text-align: left; }
}
