/* Retro System — premium arcade theme.
   Dark by design: there is no light variant, the identity is the neon-on-black
   arcade cabinet look. */

:root {
  --bg-void: #05060b;
  --bg-deep: #0a0c16;
  --bg-panel: rgba(18, 21, 38, 0.72);
  --bg-panel-solid: #121526;
  --bg-elevated: rgba(28, 32, 56, 0.85);

  --line-soft: rgba(126, 140, 255, 0.14);
  --line-strong: rgba(126, 140, 255, 0.32);

  --text-bright: #f2f4ff;
  --text: #c8cce8;
  --text-dim: #8189ad;

  --gold: #f5c451;
  --gold-deep: #c99320;
  --magenta: #ff3d8b;
  --cyan: #35e6ff;
  --violet: #8b5cff;
  --green: #46e88a;
  --danger: #ff5470;

  --glow-gold: 0 0 18px rgba(245, 196, 81, 0.45);
  --glow-cyan: 0 0 22px rgba(53, 230, 255, 0.35);
  --glow-magenta: 0 0 22px rgba(255, 61, 139, 0.35);

  --radius: 14px;
  --radius-sm: 9px;
  --shell-max: 1440px;

  --font-display: 'Orbitron', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-ui: 'Rajdhani', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-void);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Layered ambience: radial neon pools + a very subtle scanline veil.
   Kept on fixed pseudo-elements so it never scrolls or costs layout. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 12% -10%, rgba(139, 92, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 88% 0%, rgba(255, 61, 139, 0.16), transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 108%, rgba(53, 230, 255, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-void) 55%, #03040a 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.028) 0px,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 3px
  );
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- typography ---------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-bright);
  letter-spacing: 0.04em;
  margin: 0;
  font-weight: 700;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- shell ---------- */

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5, 6, 11, 0.94), rgba(5, 6, 11, 0.62));
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--gold), var(--gold-deep));
  color: #12131c;
  box-shadow: var(--glow-gold);
  flex-shrink: 0;
}

.brand__mark svg {
  width: 22px;
  height: 22px;
}

.brand__text b {
  color: var(--gold);
}

.site-header__spacer {
  flex: 1;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-panel);
  font-size: 0.92rem;
  white-space: nowrap;
}

.user-chip__name {
  color: var(--text-bright);
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- buttons ---------- */

.btn {
  --btn-bg: var(--bg-elevated);
  --btn-fg: var(--text-bright);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--gold), var(--gold-deep));
  --btn-fg: #12131c;
  --btn-border: transparent;
  box-shadow: 0 6px 20px rgba(245, 196, 81, 0.22);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: var(--line-soft);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.74rem;
}

.btn--block {
  width: 100%;
}

/* ---------- forms / auth ---------- */

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 34px 32px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  text-align: center;
}

.auth-card__logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--gold), var(--gold-deep));
  color: #12131c;
  box-shadow: var(--glow-gold);
}

.auth-card__logo svg {
  width: 34px;
  height: 34px;
}

.auth-card h1 {
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card h1 b {
  color: var(--gold);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(5, 6, 11, 0.6);
}

.tab {
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.tab[aria-selected='true'] {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #12131c;
}

.tab:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(5, 6, 11, 0.72);
  color: var(--text-bright);
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.field__hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.form-msg {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}

.form-msg--error {
  display: block;
  border: 1px solid rgba(255, 84, 112, 0.4);
  background: rgba(255, 84, 112, 0.12);
  color: #ffb3c0;
}

.form-msg--ok {
  display: block;
  border: 1px solid rgba(70, 232, 138, 0.4);
  background: rgba(70, 232, 138, 0.12);
  color: #a9f5c8;
}

/* ---------- layout: catalog ---------- */

.page {
  padding: 32px 0 72px;
}

.page-head {
  margin-bottom: 26px;
}

.page-head h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin-top: 6px;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--text-dim);
  max-width: 62ch;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.system-bar {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 22px;
  scrollbar-width: thin;
}

.system-bar::-webkit-scrollbar {
  height: 6px;
}

.system-bar::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.chip:hover {
  transform: translateY(-1px);
  color: var(--text-bright);
  border-color: var(--line-strong);
}

.chip[aria-pressed='true'] {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: var(--glow-gold);
}

.chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.chip__count {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search input {
  width: 100%;
  padding: 12px 15px 12px 42px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(5, 6, 11, 0.72);
  color: var(--text-bright);
  font-family: var(--font-ui);
  font-size: 0.98rem;
}

.search input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.search svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.result-count {
  font-size: 0.86rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ---------- game grid ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), var(--glow-gold);
  outline: none;
}

.game-card__art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(139, 92, 255, 0.28), transparent 68%),
    linear-gradient(160deg, #171b30, #0b0d18);
  border-bottom: 1px solid var(--line-soft);
}

.game-card__initial {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: rgba(242, 244, 255, 0.9);
  text-shadow: 0 0 24px rgba(53, 230, 255, 0.5);
}

.game-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card__badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(5, 6, 11, 0.82);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.game-card__save {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(5, 6, 11, 0.82);
  border: 1px solid rgba(70, 232, 138, 0.5);
  color: var(--green);
}

.game-card__save svg {
  width: 14px;
  height: 14px;
}

.game-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.game-card__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: auto;
}

/* ---------- states ---------- */

.empty,
.loading {
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(10, 12, 22, 0.5);
}

.empty h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.empty p,
.loading p {
  margin: 0;
  color: var(--text-dim);
  max-width: 58ch;
  margin-inline: auto;
}

.empty code {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold);
  font-size: 0.88em;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- sidebar / ads ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 92px;
}

@media (max-width: 1100px) {
  .sidebar {
    position: static;
  }
}

.panel {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.panel h3 {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.panel ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.panel li + li {
  margin-top: 6px;
}

/* Ad slots: reserved boxes that collapse entirely when AdSense is not
   configured, so the layout never shows an empty hole. */
.ad-slot {
  display: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(10, 12, 22, 0.45);
  overflow: hidden;
}

.ad-slot.is-active {
  display: block;
}

.ad-slot__label {
  padding: 5px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.ad-slot__inner {
  min-height: 90px;
  display: grid;
  place-items: center;
}

.ad-slot--top .ad-slot__inner {
  min-height: 100px;
}

.ad-slot--side .ad-slot__inner {
  min-height: 250px;
}

/* ---------- player ---------- */

.player-page {
  padding: 22px 0 64px;
}

.player-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.player-head__info {
  flex: 1;
  min-width: 200px;
}

.player-head h1 {
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
}

.player-head__meta {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.player-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* The emulator canvas must never be overlapped by ads — AdSense policy and
   basic usability. Ad slots live strictly outside this frame. */
.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 86dvh;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #000;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Wide screens: cap the width so a 4:3 game does not overflow the viewport
   height, while still using far more area than a fixed small box would. */
@media (min-aspect-ratio: 1/1) {
  .player-frame {
    width: auto;
    height: 86dvh;
    aspect-ratio: 4 / 3;
  }
}

.player-frame > div {
  width: 100%;
  height: 100%;
}

/* Scaling quality. EmulatorJS renders the canvas at CSS-pixel size (it never
   consults devicePixelRatio), so the browser is what upscales the image. The
   default here is nearest-neighbour: retro art stays crisp instead of being
   smeared by bilinear filtering. */
.player-frame canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.player-frame[data-scaling='smooth'] canvas {
  image-rendering: auto;
}

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.player-toolbar__group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-panel);
}

.player-toolbar__group label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

select {
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(5, 6, 11, 0.8);
  color: var(--text-bright);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

/* ---------- admin panel ---------- */

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

@media (max-width: 1000px) {
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel--form {
  position: sticky;
  top: 92px;
}

@media (max-width: 1000px) {
  .panel--form {
    position: static;
  }
}

.field input[type='file'] {
  padding: 10px;
  font-size: 0.88rem;
  cursor: pointer;
}

.field input[type='file']::file-selector-button {
  margin-right: 10px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-bright);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.field select {
  width: 100%;
}

.cover-preview {
  margin-bottom: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(5, 6, 11, 0.6);
}

.cover-preview img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.progress {
  position: relative;
  height: 26px;
  margin-bottom: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(5, 6, 11, 0.7);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.2s ease;
}

.progress__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-bright);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.admin-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-list-head h3 {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.admin-item__art {
  flex-shrink: 0;
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #171b30, #0b0d18);
  border: 1px solid var(--line-soft);
}

.admin-item__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-item__initial {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dim);
}

.admin-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-item__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-item__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.admin-item__delete:hover {
  border-color: var(--danger) !important;
  color: #ffb3c0;
  box-shadow: 0 0 16px rgba(255, 84, 112, 0.3) !important;
}

.player-note {
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(10, 12, 22, 0.5);
  font-size: 0.88rem;
  color: var(--text-dim);
}

.player-note strong {
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 200;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 12, 22, 0.96);
  color: var(--text-bright);
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--ok {
  border-color: rgba(70, 232, 138, 0.55);
}

.toast--error {
  border-color: rgba(255, 84, 112, 0.55);
}

/* ---------- footer ---------- */

.site-footer {
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 0.84rem;
}

.site-footer__inner {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .shell {
    padding: 0 16px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
  }

  .player-frame {
    aspect-ratio: 4 / 3;
    max-height: 60dvh;
  }

  .auth-card {
    padding: 30px 22px 26px;
  }
}
