@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-ExtraBold.otf") format("opentype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("/fonts/BuilderSans-ExtraBold.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #f2f3f6;
  --card: #ffffff;
  --ink: #1b1d1f;
  --muted: #6b7280;
  --line: #e3e6ea;
  --green: #00a957;
  --green-hi: #00bd63;
  --dark: #17181b;
  --accent: #f5f6f8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.05);
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ---------------- top bar ---------------- */

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.topbar .wrap {
  width: 100%;
  margin: 0;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: #111;
  padding-right: 8px;
}
.logo span { color: var(--green); }

.nav {
  display: flex;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}
.nav a {
  padding: 9px 13px;
  border-radius: 8px;
  color: #444;
}
.nav a:hover { background: var(--accent); }
.nav a.active { color: #111; background: var(--accent); }

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: #f7f7f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  height: 38px;
  width: min(320px, 30vw);
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.search input::placeholder { color: #777f8a; }
.search button {
  border: 0;
  background: transparent;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}
.search button:hover { color: #000; }

.account { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dfe3e8;
  object-fit: cover;
  border: 1px solid var(--line);
}
.account .uname { font-size: 13px; font-weight: 700; }
.btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: #e8eaee;
  color: #222;
  transition: filter 0.12s ease;
}
.btn:hover { filter: brightness(0.95); }
.btn.green { background: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-hi); filter: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }

/* ---------------- layout ---------------- */

main.wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 19px 24px 60px;
  flex: 1;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.35px;
  margin: 4px 0 49px;
}

.feed { display: flex; flex-direction: column; gap: 32px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}
.section-head h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -.2px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
  align-items: start;
}

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
}
.card:focus-visible { outline: 2px solid #00a957; outline-offset: 2px; }

.card .thumb {
  aspect-ratio: 16 / 9;
  background: #e2e4e8;
  position: relative;
  overflow: hidden;
}
.card .thumb .rating {
  position: absolute;
  z-index: 3;
  left: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(24, 25, 28, .84);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}
.thumb-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; color: transparent;
  background: #d9dde3; font-size: 0; transition: opacity .2s ease;
}
.thumb-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .2s ease, transform .3s ease;
}
.card-play {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding-left: 3px;
  border-radius: 50%;
  background: #00b06f;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  opacity: 0;
  transition: opacity .14s ease, background .14s ease;
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; }
.card:hover .card-play { background: #00c47c; }
.thumb.image-ready .thumb-image { opacity: 1; }
.thumb.image-ready .thumb-placeholder { opacity: 0; }
.thumb.image-failed .thumb-image { display: none; }
.skeleton-card { pointer-events: none; }
.skeleton-card .thumb, .skeleton-card .body i {
  background: linear-gradient(100deg, #e8e9ec 20%, #f3f4f5 42%, #e8e9ec 64%);
  background-size: 220% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
.skeleton-card .body { gap: 9px; }
.skeleton-card .body i { display: block; width: 75%; height: 13px; border-radius: 5px; }
.skeleton-card .body i + i { width: 46%; height: 10px; }
@keyframes shimmer { to { background-position-x: -220%; } }
.card .body {
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
}
.card .name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.25em;
}
.card .stats {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.card .stats span { overflow: hidden; text-overflow: ellipsis; }
.empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 26px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------- game page ---------------- */

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}
.game-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(145deg, #e7e9ed, #d8dce2);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.game-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.panel {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.game-title { font-size: 26px; font-weight: 900; margin: 16px 0 4px; }
.game-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.game-desc {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: #333;
}
.big-play {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid #f0f2f4; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

.servers { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow: auto; }
.server {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
}
.server .meta { color: var(--muted); font-size: 12px; }

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 20, 0.55);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal .box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal p { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.modal textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  resize: vertical;
  outline: none;
}
.modal textarea:focus { border-color: var(--green); }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal .err { color: #c62828; font-size: 12px; margin-top: 8px; min-height: 14px; }

footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 22px 20px;
  font-size: 12px;
  color: var(--muted);
}
footer .wrap { max-width: 1200px; margin: 0 auto; display: flex; gap: 18px; flex-wrap: wrap; }
footer a:hover { color: #111; }

@media (max-width: 820px) {
  .game-hero { grid-template-columns: 1fr; }
  .search { width: min(240px, 32vw); }
  .nav { display: none; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .topbar .wrap { gap: 10px; padding: 0 12px; }
  .logo { font-size: 19px; padding-right: 0; }
  .search { width: auto; flex: 1; }
  .search button { padding: 0 10px; }
  .account { gap: 6px; }
  .account .uname { display: none; }
  main.wrap { padding: 18px 12px 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Desktop Roblox navigation and experience rows. */
.topbar .wrap { height: 48px; gap: 20px; padding: 0 24px; }
.topbar { position: sticky; }
.logo { font-size: 30px; line-height: 1; padding: 0; color: #17181b; }
.nav a { background: none !important; color: #202227; font-size: 16px; padding: 8px 12px; }
.search { margin-left: 8px; width: min(440px, 36vw); height: 32px; border-radius: 8px; background: #f2f4f5; }
.search input { min-width: 0; font-size: 14px; }
.account { margin-left: auto; }
.sidebar { position: fixed; top: 48px; bottom: 0; left: 0; width: 190px; padding: 24px 12px; background: #fff; z-index: 10; }
.sidebar a { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 8px; font-size: 16px; font-weight: 600; }
.sidebar a:hover, .sidebar a.selected { background: #e9eaed; }
.sidebar a span { width: 24px; font-size: 23px; line-height: 1; text-align: center; }
body:has(.sidebar) main.wrap { max-width: 1220px; width: calc(100% - 230px); margin: 0 auto; padding: 32px 24px 60px; }
.home-view .page-title { font-size: 28px; margin: 0 0 32px; }
.home-view .section-head { margin-bottom: 14px; }
.home-view .section-head h2 { font-size: 20px; }
.home-view .grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 190px); grid-template-columns: none; overflow-x: auto; gap: 12px; padding-bottom: 10px; }
.home-view .card { background: transparent; box-shadow: none; border-radius: 0; }
.home-view .card .thumb { aspect-ratio: 1; border-radius: 8px; }
.home-view .card .body { padding: 8px 0; min-height: 0; }
.home-view .card .name { font-size: 14px; }
.home-view .card .stats { font-size: 12px; }
.home-view .card .thumb .rating { position: static; background: none; color: #6b7280; padding: 0; }
@media (max-width: 820px) { .sidebar { width: 64px; overflow: hidden; } .sidebar a { white-space: nowrap; } body:has(.sidebar) main.wrap { width: calc(100% - 64px); margin-left: 64px; } }
@media (max-width: 560px) { .sidebar { display: none; } body:has(.sidebar) main.wrap { width: 100%; margin: 0; padding: 24px 16px; } .home-view .grid { grid-auto-columns: 145px; } }

/* Shared Roblox-inspired desktop theme */
:root { color-scheme: dark; --bg:#111216; --card:#202227; --ink:#f7f7f8; --muted:#b8babe; --line:#393b40; --accent:#303238; --shadow:none; }
body { background:var(--bg); color:var(--ink); }
.topbar { background:var(--card); border-color:var(--line); box-shadow:none; }
.topbar .wrap { gap:18px; height:56px; }
.logo { display:flex; align-items:center; width:40px; height:40px; color:var(--ink); }
.logo-mark { display:block; width:27px; height:27px; background:var(--ink); transform:rotate(15deg); position:relative; }
.logo-mark::after { content:""; position:absolute; width:9px; height:9px; top:9px; left:9px; background:var(--card); }
.nav a { color:var(--ink); font-size:15px; font-weight:700; }
.nav a:hover { color:var(--muted); }
.search { background:var(--accent); border:1px solid transparent; height:36px; }
.search:focus-within { border-color:var(--muted); }
.search input, .search button { color:var(--ink); }
.search button:hover { color:var(--ink); }
.search input::placeholder { color:var(--muted); }
.account { margin-left:auto; }
.btn { font:inherit; font-size:14px; background:var(--accent); color:var(--ink); }
.btn.green { background:#00b06f; color:#fff; }
.btn.ghost { color:var(--ink); }
.sidebar { top:56px; background:var(--card); border-right:1px solid var(--line); width:190px; padding:22px 12px; }
.sidebar a { color:var(--ink); font-size:15px; gap:14px; padding:10px 12px; font-weight:600; }
.sidebar a:hover,.sidebar a.selected { background:var(--accent); }
.sidebar a span { font-weight:400; }
body:has(.sidebar) main.wrap { max-width:none; width:calc(100% - 190px); margin-left:190px; padding:34px 36px 70px; min-width:0; }
.page-title,.home-view .page-title { font-size:28px; margin:0 0 28px; }
.feed { gap:32px; }
.home-view .grid { grid-auto-columns:var(--row-card-width, 184px); gap:12px; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.card,.home-view .card { background:transparent; box-shadow:none; border-radius:0; overflow:visible; }
.card .thumb,.home-view .card .thumb { aspect-ratio:1; border-radius:9px; background:var(--accent); }
.thumb-placeholder { background:var(--accent); }
.card .body,.home-view .card .body { padding:8px 0 0; min-height:0; }
.card .name { font-size:15px; line-height:1.3; }
.card .stats { color:var(--muted); font-size:12px; }
.card:hover .thumb-image { filter:brightness(.85); }
.card-play { background:#00b06f; }
.empty { background:var(--card); border:1px solid var(--line); color:var(--muted); }
.skeleton-card .thumb,.skeleton-card .body i { background:linear-gradient(100deg,var(--accent) 20%,var(--card) 42%,var(--accent) 64%); background-size:220% 100%; }
.search-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); margin:-8px 0 24px; }
.search-tabs[hidden] { display:none; }
.search-tabs button { font:inherit; font-weight:700; color:var(--muted); padding:10px 2px; background:none; border:0; border-bottom:3px solid transparent; cursor:pointer; }
.search-tabs button.active { color:var(--ink); border-color:var(--ink); }
.people-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.person-card { background:var(--card); border-radius:12px; padding:20px 14px; display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.person-card:hover { background:var(--accent); }
.person-card img { width:100px; height:100px; border-radius:50%; object-fit:cover; background:var(--accent); margin-bottom:8px; }
.person-card span,.profile-handle { color:var(--muted); font-size:14px; }
.panel,.game-desc,.modal .box { background:var(--card); color:var(--ink); box-shadow:none; }
.game-thumb { background:var(--accent); box-shadow:none; }
.game-title { font-size:28px; }
.game-sub { font-size:14px; }
.kv { border-color:var(--line); }
.modal textarea { background:var(--bg); color:var(--ink); }
footer { background:var(--bg); border-color:var(--line); color:var(--muted); }
footer a:hover { color:var(--ink); }
.profile-main { max-width:1000px !important; }
.back-link { display:inline-block; margin:0 0 24px; color:var(--muted); }
.profile-header { display:flex; align-items:center; gap:28px; background:var(--card); border-radius:12px; padding:24px; }
.profile-avatar { width:150px; height:150px; object-fit:cover; border-radius:50%; background:var(--accent); }
.profile h1 { margin:0; font-size:28px; }
.profile-handle { margin:4px 0 18px; }
.profile-stats { display:flex; gap:32px; }
.profile-stats div { display:flex; flex-direction:column; gap:3px; }
.profile-stats span { color:var(--muted); font-size:13px; }
.profile-about { margin-top:24px; background:var(--card); border-radius:12px; padding:22px; }
.profile-about h2 { font-size:20px; margin:0 0 14px; }
.profile-about p { white-space:pre-wrap; line-height:1.5; margin:0; }
@media(max-width:1000px) { .nav { display:none; } .search { flex:1; width:auto; } }
@media(max-width:820px) { .sidebar { width:64px; } body:has(.sidebar) main.wrap { width:calc(100% - 64px); margin-left:64px; padding:28px 24px 60px; } }
@media(max-width:560px) { .topbar .wrap { padding:0 12px; gap:8px; } .sidebar { display:none; } body:has(.sidebar) main.wrap { width:100%; margin:0; padding:24px 16px 60px; } .home-view .grid { grid-auto-columns:var(--row-card-width, 145px); } .search button { display:none; } .profile-header { align-items:flex-start; gap:16px; } .profile-avatar { width:90px; height:90px; } .profile-stats { gap:14px; } }

/* Catalog navigation, controls, and account dialog */
:root { --surface-hover:#393c43; --scroll-thumb:#5d6068; }
.topbar .wrap { padding:0 24px; }
.search { max-width:440px; gap:0; }
.search-icon { flex:none; width:19px; height:19px; margin-left:13px; color:var(--muted); }
.search input { padding-left:10px; }
.search button { font:inherit; font-size:13px; }
.sidebar a svg { flex:none; width:22px; height:22px; }
.sidebar a { min-height:44px; }
.section-head { align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-head h2 { line-height:1.25; }
.row-controls { display:flex; gap:6px; margin-left:auto; }
.row-controls button { width:30px; height:30px; border:0; border-radius:7px; display:grid; place-items:center; color:var(--ink); background:var(--accent); cursor:pointer; }
.row-controls button:hover:not(:disabled) { background:var(--surface-hover); }
.row-controls button:disabled { opacity:.3; cursor:default; }
.row-controls svg { width:17px; height:17px; }
body:not(.home-view) .row-controls { display:none; }
.home-view .grid { scrollbar-width:none; scroll-snap-type:x proximity; padding:2px 0 8px; }
.home-view .grid::-webkit-scrollbar { display:none; }
.home-view .grid .card { scroll-snap-align:start; min-width:0; }
.card .thumb { transition:filter .15s ease; }
.card:hover .thumb { filter:brightness(.9); }
.card .name { font-weight:700; }
.card .stats { gap:9px; line-height:1.4; }
.rating-stat { display:inline-flex; gap:4px; align-items:center; }
.rating-stat svg { flex:none; width:13px; height:13px; }
.card:focus-visible,.row-controls button:focus-visible,.modal button:focus-visible { outline:2px solid #74a7ff; outline-offset:3px; }
body:has(.sidebar) footer { margin-left:190px; }
.modal { background:rgba(0,0,0,.72); backdrop-filter:blur(3px); }
.modal .box { max-width:440px; padding:28px; border:1px solid var(--line); border-radius:16px; box-shadow:0 20px 70px rgba(0,0,0,.36); }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.modal-symbol { display:grid; place-items:center; width:44px; height:44px; background:var(--accent); border-radius:12px; }
.modal-symbol .logo-mark { width:21px; height:21px; }
.modal-symbol .logo-mark::after { width:7px; height:7px; top:7px; left:7px; background:var(--accent); }
.modal-close { display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:8px; color:var(--muted); background:transparent; font-size:25px; line-height:1; cursor:pointer; }
.modal-close:hover { background:var(--accent); color:var(--ink); }
.modal h2 { font-size:23px; letter-spacing:-.4px; margin:0 0 8px; }
.modal p { font-size:14px; color:var(--muted); margin:0 0 24px; line-height:1.5; }
.field-label { display:block; font-size:13px; font-weight:700; margin-bottom:8px; }
.cookie-field { display:flex; align-items:center; border:1px solid var(--line); border-radius:8px; background:var(--bg); }
.cookie-field:focus-within { border-color:#9cbdfb; }
.cookie-field input { flex:1; min-width:0; background:transparent; color:var(--ink); border:0; outline:0; padding:12px; font:inherit; font-size:13px; }
.cookie-field input::placeholder { color:var(--muted); }
.cookie-field button { background:transparent; color:var(--muted); border:0; padding:10px 12px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.cookie-field button:hover { color:var(--ink); }
.field-hint { margin-top:9px; color:var(--muted); font-size:12px; line-height:1.45; }
.modal .err { color:#ff8585; min-height:0; margin-top:8px; }
.modal .row { margin-top:24px; }
.modal .row .btn { min-height:40px; }
@media(max-width:820px) { body:has(.sidebar) footer { margin-left:64px; } }
@media(max-width:560px) { body:has(.sidebar) footer { margin-left:0; } .row-controls { gap:4px; } .home-view .grid { scrollbar-width:none; } .home-view .grid::-webkit-scrollbar { display:none; } .modal .box { padding:22px; } }
