:root {
  --console-header: 82px;
  --console-gutter: clamp(20px, 4vw, 72px);
  --console-ease: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: auto; }
body { background: #05060a; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 15%, rgba(119, 84, 255, .13), transparent 34%),
    radial-gradient(circle at 18% 85%, rgba(48, 238, 201, .08), transparent 30%),
    #05060a;
}

.console-boot {
  background:
    radial-gradient(circle at 50% 48%, rgba(90, 73, 180, .16), transparent 32%),
    #020307;
  overflow: hidden;
  transition: opacity .7s var(--console-ease), visibility .7s;
}
.console-boot::before,
.console-boot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.console-boot::before {
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 58px 58px;
  transform: perspective(500px) rotateX(64deg) scale(1.5) translateY(38%);
  transform-origin: center bottom;
  animation: bootGrid 2.7s ease-out both;
}
.console-boot::after {
  background: linear-gradient(transparent 48%, rgba(255,255,255,.022) 50%, transparent 52%);
  background-size: 100% 5px;
  opacity: .22;
}
.console-boot.done { opacity: 0; visibility: hidden; }
.boot-space i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px #fff;
  animation: bootStar 1.8s ease-in-out infinite alternate;
}
.boot-space i:nth-child(1) { left: 16%; top: 24%; animation-delay: -.4s; }
.boot-space i:nth-child(2) { left: 79%; top: 18%; width: 2px; height: 2px; }
.boot-space i:nth-child(3) { left: 88%; top: 72%; animation-delay: -.9s; }
.boot-space i:nth-child(4) { left: 25%; top: 78%; width: 2px; height: 2px; }
.boot-space i:nth-child(5) { left: 68%; top: 82%; animation-delay: -.6s; }
.boot-console {
  position: relative;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  animation: consoleAwake 1.25s var(--console-ease) both;
}
.boot-console .boot-mark {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  font-size: 52px;
  transform: none;
  box-shadow: 0 18px 80px rgba(255, 91, 65, .32), inset 0 1px 0 rgba(255,255,255,.25);
  animation: bootMarkPulse 1.6s .45s ease-in-out infinite alternate;
}
.boot-rings,
.boot-rings i { position: absolute; inset: 0; border-radius: 50%; }
.boot-rings i { border: 1px solid rgba(255,255,255,.12); animation: bootRing 2.2s var(--console-ease) infinite; }
.boot-rings i:nth-child(2) { animation-delay: .32s; }
.boot-rings i:nth-child(3) { animation-delay: .64s; }
.boot-copy {
  position: relative;
  z-index: 2;
  width: min(380px, 76vw);
  margin-top: 24px;
  text-align: center;
  animation: bootCopyIn .7s .55s both;
}
.boot-brand {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px) !important;
  font-weight: 800;
  letter-spacing: -.055em !important;
  text-transform: none !important;
}
.boot-brand small {
  display: block;
  margin-top: 4px;
  font: 500 10px/1 var(--mono);
  letter-spacing: .42em;
  color: var(--mint);
}
.boot-status {
  margin: 30px 0 10px !important;
  font: 500 9px/1 var(--mono) !important;
  letter-spacing: .24em !important;
  color: rgba(255,255,255,.58);
  text-transform: uppercase;
}
.console-boot .boot-track {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.console-boot .boot-track span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--coral), var(--violet), var(--mint));
  box-shadow: 0 0 18px rgba(57,230,201,.55);
  animation: consoleLoad 2.65s .35s var(--console-ease) both;
}
.boot-hint {
  display: block;
  margin-top: 15px;
  font: 500 8px/1 var(--mono);
  letter-spacing: .21em;
  color: rgba(255,255,255,.26);
}

.app-shell { min-height: 100svh; }
.topbar {
  min-height: var(--console-header);
  padding-inline: var(--console-gutter);
  border-radius: 0;
  border-inline: 0;
  border-top: 0;
  background: rgba(5, 6, 10, .82);
}
.main-nav a {
  gap: 7px;
  min-width: 116px;
  justify-content: center;
}
.main-nav a span {
  color: rgba(255,255,255,.45);
  font-family: var(--mono);
}
.main-nav a.active span { color: var(--mint); }

.app-shell main {
  display: block;
  min-height: calc(100svh - var(--console-header));
  padding: 0;
}
.console-page {
  display: none !important;
  width: 100%;
  min-height: calc(100svh - var(--console-header));
  padding: 44px var(--console-gutter) 38px;
  opacity: 0;
}
.console-page.active {
  display: block !important;
  animation: consolePageIn .62s var(--console-ease) both;
}
.console-page.page-leaving {
  display: block !important;
  pointer-events: none;
  animation: consolePageOut .22s ease both;
}
.app-shell footer { display: none; }

.home-page {
  position: relative;
  overflow: hidden;
}
.home-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,6,10,.2), #05060a 88%),
    radial-gradient(circle at 38% 38%, rgba(255,87,61,.08), transparent 29%),
    radial-gradient(circle at 78% 24%, rgba(65,226,197,.08), transparent 28%);
}
.console-home-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}
.console-home-head h1 {
  margin: 8px 0 0;
  font-size: clamp(40px, 5vw, 76px);
  letter-spacing: -.065em;
  line-height: .92;
}
.console-overline {
  margin: 0;
  font: 500 9px/1 var(--mono);
  color: rgba(255,255,255,.48);
  letter-spacing: .18em;
}
.console-overline i,
.console-status-bar > div i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation: livePulse 1.4s infinite;
}
.console-clock { text-align: right; }
.console-clock strong {
  display: block;
  font: 500 24px/1 var(--mono);
  color: var(--paper);
}
.console-clock span {
  font: 500 8px/1 var(--mono);
  color: rgba(255,255,255,.36);
  letter-spacing: .18em;
}

.console-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(270px, .72fr);
  gap: 16px;
}
.spotlight-game {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background: #101118;
  cursor: pointer;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
  transition: transform .45s var(--console-ease), border-color .3s ease, box-shadow .45s ease;
}
.spotlight-game:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 38px 120px rgba(0,0,0,.5), 0 0 0 1px rgba(255,91,65,.14);
}
.spotlight-game > img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 1.15s var(--console-ease), filter .4s ease;
}
.spotlight-game:hover > img { transform: scale(1.045); filter: saturate(1.12); }
.spotlight-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,6,10,.96) 0%, rgba(5,6,10,.68) 42%, rgba(5,6,10,.1) 78%), linear-gradient(0deg, rgba(5,6,10,.72), transparent 48%);
}
.spotlight-copy {
  position: relative;
  z-index: 2;
  width: min(510px, 66%);
  padding: clamp(32px, 4vw, 60px);
}
.spotlight-kicker {
  font: 600 9px/1 var(--mono);
  color: var(--mint);
  letter-spacing: .2em;
}
.spotlight-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: .88;
  letter-spacing: -.065em;
}
.spotlight-copy > p {
  max-width: 420px;
  color: rgba(255,255,255,.68);
  font-size: clamp(14px, 1.3vw, 18px);
}
.spotlight-copy > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
.spotlight-copy > div span {
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: rgba(0,0,0,.25);
  font: 500 7px/1 var(--mono);
  letter-spacing: .1em;
}
.spotlight-copy .primary-button { width: min(220px, 100%); }
.spotlight-index {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  font: 500 8px/1 var(--mono);
  letter-spacing: .16em;
  color: rgba(255,255,255,.55);
}
.system-panel {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}
.system-tile {
  position: relative;
  min-height: 116px;
  padding: 20px 52px 18px 76px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  color: var(--paper);
  background: rgba(18,19,27,.78);
  overflow: hidden;
  transition: transform .35s var(--console-ease), border-color .3s, background .3s;
}
.system-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -65px;
  bottom: -95px;
  border-radius: 50%;
  background: var(--tile-glow, var(--violet));
  opacity: .16;
  filter: blur(18px);
  transition: transform .45s var(--console-ease), opacity .3s;
}
.system-tile:hover,
.system-tile:focus-visible {
  transform: translateX(-7px);
  border-color: rgba(255,255,255,.28);
  background: rgba(26,27,38,.94);
}
.system-tile:hover::after { transform: scale(1.45); opacity: .28; }
.library-tile { --tile-glow: var(--coral); }
.ranking-tile { --tile-glow: var(--mint); }
.random-tile { --tile-glow: var(--violet); }
.system-icon {
  position: absolute;
  left: 22px;
  top: 25px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  font: 500 20px/1 var(--mono);
  color: var(--mint);
}
.system-tile small {
  display: block;
  margin-bottom: 5px;
  font: 500 7px/1 var(--mono);
  color: rgba(255,255,255,.37);
  letter-spacing: .17em;
}
.system-tile strong { display: block; font-size: 19px; line-height: 1.05; }
.system-tile em {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-style: normal;
}
.system-tile > b {
  position: absolute;
  right: 20px;
  top: 50%;
  color: rgba(255,255,255,.55);
  transform: translateY(-50%);
}

.console-shelf { margin-top: 32px; }
.shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}
.shelf-heading span {
  font: 500 8px/1 var(--mono);
  letter-spacing: .17em;
  color: rgba(255,255,255,.4);
}
.shelf-heading h2 { margin: 5px 0 0; font-size: 24px; }
.cover-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}
.cover-rail::-webkit-scrollbar { display: none; }
.console-cover-card {
  position: relative;
  height: 146px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: #151720;
  color: #fff;
  text-align: left;
  transition: transform .38s var(--console-ease), border-color .3s;
}
.console-cover-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.32); }
.console-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s var(--console-ease);
}
.console-cover-card:hover img { transform: scale(1.06); }
.console-cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4,5,8,.95), transparent 72%);
}
.console-cover-card > span { position: absolute; z-index: 2; left: 16px; bottom: 14px; }
.console-cover-card small {
  display: block;
  margin-bottom: 3px;
  font: 500 7px/1 var(--mono);
  color: var(--mint);
  letter-spacing: .12em;
}
.console-cover-card strong { font-size: 16px; letter-spacing: -.025em; }
.console-status-bar {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.console-status-bar > div { display: flex; align-items: center; gap: 6px; }
.console-status-bar > div i { width: 5px; height: 5px; margin: 0; }
.console-status-bar > div strong { font: 500 11px/1 var(--mono); }
.console-status-bar > div span { font: 500 7px/1 var(--mono); color: rgba(255,255,255,.36); }
.console-status-bar p {
  margin: 0 0 0 auto;
  font: 500 7px/1 var(--mono);
  color: rgba(255,255,255,.34);
  letter-spacing: .1em;
}
.console-status-bar p span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 3px 0 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: rgba(255,255,255,.78);
}

.library-section,
.ranking-section {
  max-width: none;
  margin: 0;
}
.library-section .section-heading,
.ranking-section .section-heading { margin-bottom: 26px; }
.library-section .section-heading h2,
.ranking-section .section-heading h2 {
  font-size: clamp(42px, 6vw, 80px);
  line-height: .9;
  letter-spacing: -.065em;
}
.page-subtitle {
  margin: 12px 0 0;
  color: rgba(255,255,255,.48);
  font-size: 15px;
}
.library-toolbar {
  position: sticky;
  top: calc(var(--console-header) + 8px);
  z-index: 15;
  margin-bottom: 26px;
  background: rgba(12,13,19,.9);
  box-shadow: 0 20px 50px rgba(0,0,0,.24);
}
.game-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 22px);
}
.game-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.game-card:hover { transform: none; border-color: transparent; box-shadow: none; }
.game-cover {
  aspect-ratio: 3 / 4;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.11);
  background: #151720;
  box-shadow: 0 18px 42px rgba(0,0,0,.32);
  overflow: hidden;
  transform: perspective(800px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
}
.game-cover::before {
  background: linear-gradient(145deg, rgba(255,255,255,.17), transparent 28%, transparent 70%, rgba(0,0,0,.45));
  opacity: .7;
}
.game-cover::after {
  content: attr(data-code);
  top: 13px;
  bottom: auto;
  left: 13px;
  right: auto;
  width: auto;
  height: auto;
  font: 600 7px/1 var(--mono);
  color: rgba(255,255,255,.82);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.game-cover:hover {
  box-shadow: 0 26px 70px rgba(0,0,0,.55), 0 0 0 1px color-mix(in srgb, var(--game-accent), transparent 55%);
}
.cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--console-ease), filter .5s ease;
}
.game-cover:hover .cover-image { transform: scale(1.055); filter: saturate(1.12) contrast(1.03); }
.cover-art {
  position: absolute;
  inset: auto 0 0;
  min-height: 44%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 42px 16px 16px;
  background: linear-gradient(0deg, rgba(4,5,8,.98) 0%, rgba(4,5,8,.78) 48%, transparent 100%);
  font-size: 11px;
  letter-spacing: 0;
  text-align: left;
  transform: none !important;
}
.cover-art strong {
  display: block;
  font-size: clamp(20px, 2vw, 30px);
  line-height: .88;
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.cover-art small {
  order: -1;
  margin-bottom: 8px;
  font: 600 7px/1 var(--mono);
  color: var(--game-accent);
  letter-spacing: .14em;
}
.play-badge {
  right: 12px;
  bottom: 13px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.92);
  color: #08090d;
  transform: translateY(54px);
}
.game-cover:hover .play-badge,
.game-cover:focus-visible .play-badge { transform: translateY(0); }
.favorite-btn {
  z-index: 5;
  top: 10px;
  right: 10px;
  background: rgba(5,6,10,.62);
  border-color: rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}
.game-info { padding: 13px 3px 0; }
.game-topline h3 { font-size: 16px; }
.game-info > p {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11px;
}
.score-line { margin-top: 11px; }

.ranking-order-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: rgba(255,255,255,.55);
  font: 600 7px/1 var(--mono);
  letter-spacing: .13em;
}
.ranking-order-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(54,241,199,.75);
  animation: rankPulse 1.6s ease-in-out infinite alternate;
}
.ranking-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  gap: 18px;
  min-height: 54vh;
}
.ranking-loading {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background: rgba(15,16,23,.7);
  color: rgba(255,255,255,.45);
  font: 500 10px/1.5 var(--mono);
}
.ranking-summary-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--rank-accent) 5%, #11131b), #0b0c12 66%);
  box-shadow: 0 18px 50px rgba(0,0,0,.2);
  animation: rankingCardIn .55s var(--console-ease) both;
  animation-delay: calc(min(var(--rank-index), 8) * 45ms);
  transition: transform .32s var(--console-ease), border-color .32s ease, box-shadow .32s ease;
}
.ranking-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rank-accent);
  box-shadow: 0 0 24px var(--rank-accent);
}
.ranking-summary-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--rank-accent), transparent 58%);
  box-shadow: 0 25px 72px rgba(0,0,0,.34);
}
.ranking-summary-card > header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ranking-summary-card > header img {
  width: 58px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.ranking-summary-card > header div { min-width: 0; }
.ranking-summary-card > header span {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--rank-accent);
  font: 600 6px/1 var(--mono);
  letter-spacing: .11em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-summary-card > header h3 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.ranking-summary-card > header > strong {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: white;
  font: 600 16px/1 var(--mono);
}
.ranking-summary-card > header > strong small {
  color: rgba(255,255,255,.34);
  font-size: 6px;
  letter-spacing: .1em;
}
.ranking-summary-card ol {
  list-style: none;
  margin: 0;
  padding: 6px 16px;
}
.ranking-summary-card li {
  display: grid;
  grid-template-columns: 24px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.ranking-summary-card li:last-child { border: 0; }
.ranking-summary-card li > b {
  color: rgba(255,255,255,.3);
  font: 500 8px/1 var(--mono);
}
.rank-mini-avatar {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.8);
  font: 600 7px/1 var(--mono);
}
.ranking-summary-card li > strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-summary-card li > em {
  color: var(--mint);
  font: 500 9px/1 var(--mono);
  font-style: normal;
}
.ranking-summary-card li.empty { opacity: .34; }
.ranking-summary-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.14);
}
.ranking-summary-card > footer > span {
  color: rgba(255,255,255,.35);
  font: 500 7px/1 var(--mono);
  text-transform: uppercase;
}
.ranking-summary-card > footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  font: 600 8px/1 var(--mono);
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}
.ranking-summary-card > footer a i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rank-accent);
  color: #08090d;
  font-style: normal;
  transition: transform .25s ease;
}
.ranking-summary-card > footer a:hover i { transform: translateX(3px); }

.account-role {
  width: max-content;
  margin-top: 7px;
  padding: 5px 7px;
  border-radius: 99px;
  background: rgba(137,108,255,.12);
  color: #c9c0ff;
  font: 600 6px/1 var(--mono);
  letter-spacing: .1em;
}
.profile-settings-form {
  display: grid;
  gap: 16px;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}
.password-settings-form { margin-top: 12px; }
.account-form-heading { display: flex; justify-content: space-between; gap: 15px; }
.account-form-heading div { display: grid; gap: 4px; }
.account-form-heading strong { font-size: 12px; }
.account-form-heading small { color: rgba(255,255,255,.42); font-size: 9px; line-height: 1.5; }
.account-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.account-fields label {
  display: grid;
  gap: 7px;
  color: rgba(255,255,255,.43);
  font: 500 7px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-fields label.wide { grid-column: 1 / -1; }
.account-fields input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  outline: 0;
  background: rgba(255,255,255,.035);
  color: white;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.account-fields input:focus {
  border-color: rgba(54,241,199,.55);
  box-shadow: 0 0 0 3px rgba(54,241,199,.07);
}
.password-fields { grid-template-columns: repeat(2, 1fr); }
.password-fields label:first-child { grid-column: 1 / -1; }
.account-save-button {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 25px;
  min-height: 39px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: var(--mint);
  color: #06100d;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.account-save-button:disabled { opacity: .5; cursor: wait; }
.account-save-button b { font-family: var(--mono); }
.account-logout { margin-top: 8px; }

.game-dialog:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}
.game-dialog:fullscreen .game-shell { border-radius: 0; }
.game-dialog:fullscreen .canvas-wrap {
  margin: 0;
  border-width: 0 1px 0 0;
  border-radius: 0;
}
.game-dialog:fullscreen .game-shell { grid-template-rows: 76px 1fr 43px; }
.game-dialog:fullscreen .game-body { grid-template-columns: minmax(0, 1fr) 260px; }
.game-dialog:fullscreen .game-sidebar { width: 260px; }
.game-dialog:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}
.game-intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(137,108,255,.17), transparent 25%),
    radial-gradient(circle at 50% 50%, #161927 0%, #07080d 55%, #020305 100%);
}
.game-intro-overlay[hidden],
.game-start-overlay[hidden] { display: none !important; }
.game-intro-overlay::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.025) 0 1deg, transparent 1deg 9deg);
  animation: introSpin 9s linear infinite;
}
.game-intro-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.025) 3px 4px);
  pointer-events: none;
}
.game-intro-scan {
  position: absolute;
  inset: -25% 0 auto;
  z-index: 2;
  height: 24%;
  background: linear-gradient(transparent, rgba(54,241,199,.12), transparent);
  animation: introScan 1.35s linear both;
}
.game-intro-core {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  text-align: center;
  animation: introCore 1.3s var(--console-ease) both;
}
.game-intro-core img {
  width: 82px;
  height: 82px;
  margin-bottom: 24px;
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(255,91,65,.28);
}
.game-intro-core p {
  margin: 0 0 12px;
  color: var(--mint);
  font: 600 8px/1 var(--mono);
  letter-spacing: .28em;
}
.game-intro-core h3 {
  max-width: min(780px, 88vw);
  margin: 0;
  font-size: clamp(38px, 7vw, 88px);
  line-height: .88;
  letter-spacing: -.075em;
  text-transform: uppercase;
}
.game-intro-core span {
  margin-top: 18px;
  color: rgba(255,255,255,.35);
  font: 500 7px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.game-start-overlay {
  display: block;
  padding: 0;
  text-align: left;
  background: #07080d;
  backdrop-filter: none;
}
.game-title-cover,
.game-title-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.game-title-cover {
  z-index: 0;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.05);
  animation: titleCoverIn 5s ease-out both;
}
.game-title-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3,4,8,.98) 0%, rgba(3,4,8,.88) 39%, rgba(3,4,8,.28) 70%, rgba(3,4,8,.58) 100%),
    linear-gradient(0deg, rgba(3,4,8,.88), transparent 45%);
}
.game-title-panel {
  position: absolute;
  z-index: 2;
  left: clamp(28px, 6vw, 86px);
  top: 50%;
  width: min(500px, 52%);
  transform: translateY(-50%);
  animation: titlePanelIn .55s var(--console-ease) both;
}
.game-title-panel .game-kicker { margin: 0 0 13px; }
.game-title-panel h3 {
  margin: 0;
  color: white;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .86;
  letter-spacing: -.075em;
  text-shadow: 0 0 34px rgba(54,241,199,.3), 5px 5px 0 rgba(255,91,61,.72);
}
.game-title-panel > p:not(.game-kicker) {
  max-width: 430px;
  margin: 18px 0 24px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
}
.retro-title-menu {
  display: grid;
  width: min(310px, 100%);
  gap: 5px;
}
.retro-title-menu button {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,.67);
  cursor: pointer;
  font: 600 10px/1 var(--mono);
  letter-spacing: .11em;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.retro-title-menu button i {
  opacity: 0;
  color: var(--mint);
  font-style: normal;
}
.retro-title-menu button:hover,
.retro-title-menu button:focus-visible {
  border-color: rgba(54,241,199,.28);
  background: rgba(54,241,199,.085);
  color: white;
  outline: none;
  transform: translateX(5px);
}
.retro-title-menu button:hover i,
.retro-title-menu button:focus-visible i { opacity: 1; }
.retro-title-menu button:disabled {
  opacity: .28;
  cursor: not-allowed;
  text-decoration: line-through;
}
.title-menu-hint {
  display: block;
  margin-top: 16px;
  color: rgba(255,255,255,.3);
  font: 500 6px/1 var(--mono);
  letter-spacing: .1em;
}
.game-start-overlay .difficulty-wrap {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 4vw, 60px);
  bottom: clamp(22px, 4vw, 50px);
  width: min(410px, 40%);
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(6,7,11,.72);
  backdrop-filter: blur(14px);
}

@keyframes rankPulse { to { opacity: .35; transform: scale(.7); } }
@keyframes rankingCardIn { from { opacity: 0; transform: translateY(20px) scale(.985); } }
@keyframes introSpin { to { transform: rotate(360deg); } }
@keyframes introScan { from { top: -25%; } to { top: 110%; } }
@keyframes introCore {
  0% { opacity: 0; transform: scale(.84); filter: blur(13px); }
  30%, 75% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.035); filter: blur(5px); }
}
@keyframes titleCoverIn { from { transform: scale(1.08); filter: saturate(.5) contrast(1.2) blur(4px); } }
@keyframes titlePanelIn { from { opacity: 0; transform: translate(-25px, -50%); } }

@keyframes consoleAwake {
  0% { opacity: 0; transform: scale(.68); filter: blur(16px); }
  65% { opacity: 1; transform: scale(1.06); filter: blur(0); }
  100% { transform: scale(1); }
}
@keyframes bootRing {
  0% { opacity: 0; transform: scale(.2); }
  35% { opacity: .75; }
  100% { opacity: 0; transform: scale(1.45); }
}
@keyframes bootMarkPulse {
  to { transform: scale(1.045); box-shadow: 0 24px 110px rgba(255,91,65,.48), inset 0 1px 0 rgba(255,255,255,.34); }
}
@keyframes bootCopyIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes consoleLoad { from { transform: scaleX(0); } }
@keyframes bootGrid { from { opacity: 0; transform: perspective(500px) rotateX(70deg) scale(1.8) translateY(55%); } }
@keyframes bootStar { to { opacity: .25; transform: scale(.5); } }
@keyframes consolePageIn {
  from { opacity: 0; transform: translateX(35px) scale(.985); filter: blur(7px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes consolePageOut {
  to { opacity: 0; transform: translateX(-24px) scale(.99); filter: blur(5px); }
}

@media (max-width: 1180px) {
  .console-dashboard { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); }
  .spotlight-game { min-height: 350px; }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .console-status-bar p { display: none; }
}
@media (max-width: 900px) {
  :root { --console-header: 68px; }
  .topbar { padding-inline: 16px; }
  .main-nav {
    position: fixed;
    z-index: 45;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 5px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(9,10,15,.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 55px rgba(0,0,0,.5);
  }
  .main-nav a {
    min-width: 0;
    padding: 11px 7px;
    flex-direction: column;
    gap: 4px;
    font-size: 9px;
  }
  .console-page { padding: 28px 18px 98px; }
  .console-dashboard { grid-template-columns: 1fr; }
  .system-panel { grid-template-columns: repeat(3, minmax(0,1fr)); grid-template-rows: none; }
  .system-tile { min-height: 150px; padding: 64px 14px 15px; }
  .system-icon { left: 14px; top: 15px; }
  .system-tile > b { top: 25px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-dialog:fullscreen .game-body { grid-template-columns: 1fr; }
  .game-dialog:fullscreen .game-sidebar { display: none; width: auto; }
  .game-title-panel { width: min(520px, 68%); }
  .game-start-overlay .difficulty-wrap { width: min(360px, 45%); }
}
@media (max-width: 640px) {
  .brand > span:last-child small,
  .network-state,
  .profile-label,
  .console-clock { display: none; }
  .header-actions { gap: 5px; }
  .status-chip { max-width: 42px; padding: 0; justify-content: center; }
  .status-chip span:last-child { display: none; }
  .console-home-head h1 { font-size: 45px; }
  .spotlight-game { min-height: 440px; }
  .spotlight-game > img { object-position: 64% center; }
  .spotlight-shade { background: linear-gradient(0deg, rgba(5,6,10,.98) 0%, rgba(5,6,10,.7) 48%, transparent 82%); }
  .spotlight-copy {
    position: absolute;
    inset: auto 0 0;
    width: 100%;
    padding: 24px;
  }
  .spotlight-copy h2 { font-size: 48px; }
  .spotlight-copy > p { font-size: 13px; }
  .spotlight-copy > div { margin: 14px 0; }
  .system-panel { display: flex; overflow-x: auto; }
  .system-tile { flex: 0 0 210px; }
  .cover-rail { grid-auto-columns: 230px; }
  .console-status-bar { gap: 15px; overflow-x: auto; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-info > p,
  .score-line { display: none; }
  .library-toolbar { top: calc(var(--console-header) + 4px); }
  .library-section .section-heading,
  .ranking-section .section-heading { align-items: start; }
  .ranking-order-note { margin-top: 16px; }
  .ranking-summary-card > header { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .ranking-summary-card > header img { width: 48px; }
  .ranking-summary-card > header h3 { font-size: 15px; }
  .ranking-summary-card > header > strong { font-size: 13px; }
  .ranking-summary-card > footer > span { display: none; }
  .ranking-summary-card > footer { justify-content: flex-end; }
  .game-title-shade {
    background:
      linear-gradient(0deg, rgba(3,4,8,.99) 0%, rgba(3,4,8,.88) 58%, rgba(3,4,8,.38) 100%),
      linear-gradient(90deg, rgba(3,4,8,.78), transparent);
  }
  .game-title-panel {
    left: 24px;
    top: 40%;
    width: calc(100% - 48px);
  }
  .game-title-panel h3 { font-size: clamp(36px, 12vw, 57px); }
  .game-title-panel > p:not(.game-kicker) { max-width: 88%; margin: 12px 0 16px; font-size: 10px; }
  .retro-title-menu { width: 260px; }
  .retro-title-menu button { min-height: 33px; font-size: 9px; }
  .title-menu-hint { display: none; }
  .game-start-overlay .difficulty-wrap {
    right: 18px;
    bottom: 16px;
    left: 18px;
    width: auto;
    padding: 10px;
  }
  .game-intro-core img { width: 64px; height: 64px; margin-bottom: 18px; border-radius: 17px; }
  .game-intro-core h3 { font-size: clamp(34px, 14vw, 62px); }
  .account-fields,
  .password-fields { grid-template-columns: 1fr; }
  .account-fields label.wide,
  .password-fields label:first-child { grid-column: auto; }
  .profile-settings-form { padding: 15px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .game-title-panel { left: 30px; top: 48%; width: 48%; }
  .game-title-panel h3 { font-size: 42px; }
  .game-title-panel > p:not(.game-kicker) { display: none; }
  .retro-title-menu { margin-top: 13px; }
  .retro-title-menu button { min-height: 31px; }
  .game-start-overlay .difficulty-wrap { right: 24px; bottom: 20px; left: auto; width: 40%; }
  .game-header { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .console-boot .boot-rings i,
  .boot-space i,
  .console-overline i,
  .game-intro-overlay::before,
  .game-intro-scan,
  .game-intro-core,
  .ranking-order-note i { animation: none !important; }
}
