@font-face {
  font-family: "FindSans Pro";
  src: url("/fonts/FindSansPro-Light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "FindSans Pro";
  src: url("/fonts/FindSansPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "FindSans Pro";
  src: url("/fonts/FindSansPro-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "FindSans Pro";
  src: url("/fonts/FindSansPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: "FindSans Pro", system-ui, sans-serif;
  color: #f7f5fc;
  background: #100f15;
  --muted: #b6b0c4;
  --line: #373244;
  --panel: #201c29;
  --accent: #b7a0ff;
  --button: #6546d9;
}
body { margin: 0; }
.wrap { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #14121b; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.35rem; }
.top nav { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.6rem; }
.top nav a { color: var(--muted); font-weight: 500; font-size: .9rem; text-decoration: none; }
.top nav a:hover { color: white; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; font-size: 1.12rem; font-weight: 700; text-decoration: none; }
.brand-mark { display: block; flex: none; width: 2.625rem; height: 2.625rem; object-fit: contain; }
a { color: var(--accent); text-underline-offset: .22em; }
a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(1.5rem, 4vw, 3.2rem); margin: 1.65rem 0 1.15rem; border: 1px solid #483761; border-radius: 1.1rem; background: radial-gradient(ellipse at 94% 90%, #54367e, transparent 52%), radial-gradient(ellipse at 80% 0%, #654386, transparent 50%), #231936; }
.hero::before { content: ''; position: absolute; z-index: -2; inset: -45% -5% -60% 47%; background: radial-gradient(ellipse at 72% 30%, #ffc799c9, transparent 31%), radial-gradient(ellipse at 74% 69%, #a186f7, transparent 57%), radial-gradient(ellipse at 48% 55%, #6456de, transparent 55%); filter: blur(23px); transform: rotate(-16deg); }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #231936 20%, #231936cb 48%, transparent 100%); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 4.2rem); font-weight: 700; line-height: 1.04; letter-spacing: -.055em; overflow-wrap: anywhere; }
.hero p { font-weight: 300; color: #ede5ff; font-size: clamp(.98rem, 2vw, 1.14rem); line-height: 1.55; margin-top: .85rem; max-width: 34rem; }
#quick-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
#quick-filters button { border-color: #756390; background: #362a4c; font-size: .86rem; }
#quick-filters button:hover, #quick-filters button[aria-pressed=true] { background: #e4d7ff; color: #261c3e; border-color: #e4d7ff; }
#filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding: .9rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: .8rem; }
#filters label { flex: 1 1 7.5rem; }
#filters .search { flex: 2 1 13rem; }
#filters label { min-width: 0; }
@media (min-width: 960px) {
  #filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #filters input, #filters select { width: 100%; min-width: 0; }
}
label { display: grid; gap: .35rem; font-size: .83rem; color: var(--muted); }
input, select, button { max-width: 100%; font: inherit; color: #f7f5fc; border: 1px solid var(--line); border-radius: .46rem; padding: .5rem .65rem; min-height: 2.4rem; background: #17141e; }
input::placeholder { color: #aaa2b8; }
button { cursor: pointer; }
button:hover { background: #362b49; }
button:disabled { opacity: .6; cursor: wait; }
.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 1.6rem 0 .9rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -.025em; }
#result { margin-top: .2rem; color: var(--muted); font-size: .88rem; }
#catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: .85rem; }
.cover { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: end; padding: .7rem .85rem; aspect-ratio: 2.08; background: #34284a; }
.cover-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cover::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #120e1be6, transparent 65%); }
.tags { padding: .28rem .48rem; color: #f7eeff; background: #181123e8; border-radius: .32rem; font-size: .75rem; font-weight: 500; }
.card-content { display: flex; flex: 1; flex-direction: column; gap: .52rem; padding: .95rem; }
h3 { font-size: 1.26rem; line-height: 1.18; letter-spacing: -.02em; }
h3 a { color: inherit; text-decoration: none; }
h3 a:hover { color: var(--accent); text-decoration: underline; }
.author, .verified, .notice { font-size: .79rem; color: var(--muted); }
.description { color: #e4deed; line-height: 1.45; font-size: .94rem; margin-bottom: auto; }
.details { color: var(--muted); font-size: .84rem; }
.price { font-size: .88rem; font-weight: 500; }
.links, .vote { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.links { margin-top: .3rem; font-size: .85rem; }
.play { color: white; background: var(--button); border-radius: .42rem; font-weight: 700; text-decoration: none; padding: .57rem .72rem; }
.play:hover { background: #7657e8; }
.vote { align-items: end; border-top: 1px solid var(--line); padding-top: .65rem; font-size: .86rem; }
.rating { flex-basis: 100%; color: #ddd0ff; font-size: .87rem; }
.notice:empty { display: none; }
.report-link {
  align-self: start;
  padding: 0;
  min-height: auto;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: .79rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.report-link:hover { background: transparent; color: var(--accent); }
#suggest-game { font-size: .85rem; }
#feedback {
  width: min(29rem, calc(100% - 1rem));
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(.8rem, 4vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--panel);
  color: inherit;
}
#feedback::backdrop { background: #0b0914c9; }
#feedback-form, .suggestion-fields:not([hidden]) { display: grid; gap: .8rem; }
#feedback textarea {
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: .46rem;
  background: #17141e;
  font: inherit;
  color: #f7f5fc;
  resize: vertical;
}
.dialog-actions { display: flex; gap: .6rem; }
#feedback :is(input, textarea) { font-size: max(1rem, 16px); min-width: 0; }
#feedback .dialog-actions { flex-wrap: wrap; }
@media (max-width: 550px), (max-height: 520px) {
  #feedback-form, #feedback .suggestion-fields:not([hidden]) { gap: .55rem; }
}
#feedback-status:empty { display: none; }
#feedback-status { color: var(--accent); font-size: .88rem; }
.admin { padding-block: 2.25rem 4rem; }
.admin h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
#admin-status { color: var(--accent); margin-block: .6rem 1.2rem; }
#admin-status:empty { margin: 0; }
.admin-panel { display: grid; gap: .95rem; padding: 1rem; margin-block: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--panel); }
.admin-panel[hidden] { display: none; }
#login { max-width: 26rem; }
#login button { justify-self: start; }
.admin-nav, .admin-row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.admin-nav { margin-top: 1.35rem; }
.admin-row h2 { margin-right: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.admin-stats div { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--panel); }
.admin-stats dt, .admin-record p { color: var(--muted); font-size: .85rem; }
.admin-stats dd { margin: 0; font-size: 1.6rem; font-weight: 700; }
.admin-record { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; padding: .8rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-record p { margin-block: .2rem; }
#section-form { align-items: end; }
#section-status, #editor-status { color: var(--accent); }
#game-editor { width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.2rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--panel); color: inherit; }
#game-editor::backdrop { background: #0b0914c9; }
#game-form { display: grid; gap: .75rem; }
.admin-mobile { display: flex; align-items: center; gap: .5rem; }
.admin-mobile input { min-height: auto; }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.verification-fields { display: grid; gap: .6rem; margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; }
.verification-fields p { color: var(--muted); font-size: .85rem; }
.verification-fields label { display: flex; align-items: center; }
.verification-fields input { min-height: auto; }
#game-editor textarea { width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .46rem; background: #17141e; font: inherit; color: inherit; resize: vertical; }
#method { margin: 2.4rem 0; border-top: 1px solid var(--line); padding-top: 1.3rem; }
#method p { max-width: 46rem; color: var(--muted); margin-top: .65rem; line-height: 1.5; }
.game-page #filters, .game-page #quick-filters, .game-page .catalog-head label, .game-page #catalog-title { display: none; }
.game-page .catalog-head { margin: .7rem 0; }
.game-page .hero { background: #241a35; }
.game-page .hero::before, .game-page .hero::after { display: none; }
.game-page #catalog { grid-template-columns: minmax(0, 1fr); }
.game-page .card-content { padding: clamp(1rem, 3vw, 1.65rem); }
@media (min-width: 760px) {
  .game-page .card { display: grid; grid-template-columns: 1fr 1fr; }
  .game-page .cover { aspect-ratio: auto; min-height: 20rem; }
}
@media (max-width: 900px) {
  #catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 1.5rem); }
  .top { align-items: flex-start; flex-direction: column; padding-block: .85rem; }
  .hero { margin-top: .9rem; }
  .hero::before { width: 80%; opacity: .45; }
  #catalog { grid-template-columns: 1fr; }
  .catalog-head { align-items: start; }
}
@media (max-width: 360px) {
  .catalog-head { flex-direction: column; }
}

/* Motion and focus for the catalog. */
.hero {
  box-shadow: 0 14px 44px #100a1b65, inset 0 1px #e1ccff24;
}

#filters:focus-within {
  border-color: #795ca6;
  box-shadow: 0 0 0 1px #b7a0ff16, 0 8px 26px #140c2466;
}

#quick-filters button[aria-pressed=true] {
  box-shadow: 0 0 18px #cbb3ff66;
}

#catalog .card:focus-within {
  border-color: #a384e1;
  box-shadow: 0 0 0 1px #b7a0ff42, 0 12px 28px #0c071957;
}

#catalog .play {
  background: linear-gradient(115deg, #623fd0, #754bd4);
  box-shadow: inset 0 1px #f5e6ff35;
}

#catalog .play:hover, #catalog .play:focus-visible {
  background: linear-gradient(115deg, #7553e2, #8359e3);
  box-shadow: 0 0 19px #9871fe66, inset 0 1px #f5e6ff50;
}

@media (hover: hover) and (pointer: fine) {
  #catalog .card:hover {
    border-color: #a384e1;
    box-shadow: 0 0 0 1px #b7a0ff33, 0 14px 34px #0c071970;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    animation: hero-glow-in 1100ms cubic-bezier(.2, .65, .3, 1) both;
  }

  .hero h1, .hero .hero-description, #quick-filters {
    animation: hero-text-in 480ms cubic-bezier(.2, .65, .3, 1) both;
  }

  .hero .hero-description { animation-delay: 65ms; }
  #quick-filters { animation-delay: 120ms; }

  #filters, #filters input, #filters select, #quick-filters button, #catalog .play {
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }

  #catalog .card {
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 220ms ease;
  }

  #catalog .cover-image {
    transition: transform 400ms cubic-bezier(.2, .65, .3, 1);
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  body:not(.game-page) #catalog .card:hover { transform: translateY(-3px); }
  #catalog .card:hover .cover-image { transform: scale(1.04); }
}

@keyframes hero-glow-in {
  from { transform: rotate(-16deg) translateX(6%) scale(.93); }
  to { transform: rotate(-16deg) translateX(0) scale(1); }
}

@keyframes hero-text-in {
  from { opacity: .55; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

