/* RookieGamers home page. Two images (hero, Web3 strip); everything else is drawn here. */
:root {
  --bg: #0b0b0b; --panel: #141414; --panel2: #1b1b1b; --line: #2c2c2c; --line2: #3a3a3a;
  --text: #f4f1ea; --muted: #a9a6a0; --lime: #c8f53a; --lime2: #b3e021; --ink: #101010;
  --purple: #7c3aed; --lilac: #d38cff; --gold: #f5b82e;
  --rail: 116px; --r: 12px;
  --display: 'Bangers', 'Impact', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.rg-home { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 16px; height: 16px; }

/* ---------- left rail ---------- */
.rail {
  position: absolute; z-index: 20; left: 6px; top: 62px; width: calc(var(--rail) - 10px);
  display: flex; flex-direction: column; gap: 8px; padding: 30px 0 10px;
  background: #0e0e0e; border: 1px solid #1f1f1f; border-radius: 14px;
}
.rail a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 6px; padding: 9px 8px 10px 12px; border-radius: 10px; color: #e9e6df; font-weight: 600; font-size: 15px; line-height: 1.15; }
.rail a .ic { width: 25px; height: 25px; }
.rail a:hover { background: #1a1a1a; }
.rail a.on { background: var(--lime); color: var(--ink); }
.rail a.w3 { margin-top: 12px; border: 2px solid var(--lime); color: var(--lime); font-family: var(--display); font-size: 25px; letter-spacing: .6px; line-height: .95; padding: 10px 10px 12px; }
.rail a.w3 .ic { width: 28px; height: 28px; }

.main { margin-left: var(--rail); min-width: 0; }

/* ---------- top bar ---------- */
.bar { position: relative; z-index: 5; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 22px 0 calc(21.5% + 26px); }
.search { flex: 0 1 636px; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px 0 16px; background: #0d0d0d; border: 1.5px solid #3b3b3b; border-radius: 10px; color: #cfcac2; }
.search:focus-within { border-color: var(--lime); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 500 16px var(--sans); }
.search input::placeholder { color: #9e9a93; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.search kbd { font: 600 12px var(--sans); color: #bdb8b0; background: #1e1e1e; border: 1px solid #333; border-radius: 6px; padding: 3px 7px; }
.acts { margin-left: auto; display: flex; gap: 16px; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 10px; font: 600 17px var(--sans); white-space: nowrap; border: 1.5px solid transparent; background: none; transition: filter .15s, transform .15s; }
.b:hover { filter: brightness(1.1); }
.b:active { transform: translateY(1px); }
.b .ic { width: 22px; height: 22px; }
.b.ai { background: linear-gradient(180deg, #8b3ff0, #6b24d6); border-color: #a669ff; padding: 0 16px 0 20px; }
.b.out { border-color: #d9d5cd; color: #fff; }
.b.me { border-color: #555; padding: 0 14px 0 6px; }
.b.me img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.b.lime { background: var(--lime); color: var(--ink); font-weight: 700; border-color: var(--lime); }
.b.lime:hover { background: #d6ff52; }
.b.big { height: 46px; font-size: 19px; padding: 0 22px; border-radius: 9px; }

/* ---------- hero ---------- */
/* The art starts under the top bar; only the logo corner shows above the bar line, as in the mockup. */
.hero { position: relative; margin: -60px 0 0; overflow: hidden; aspect-ratio: 3 / 1; 
  -webkit-mask: linear-gradient(90deg, #000 17%, transparent 22%) 0 0 / 100% 60px no-repeat, linear-gradient(#000, #000) 0 60px / 100% 100% no-repeat;
          mask: linear-gradient(90deg, #000 17%, transparent 22%) 0 0 / 100% 60px no-repeat, linear-gradient(#000, #000) 0 60px / 100% 100% no-repeat; }
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cta { position: absolute; left: 4.9%; top: 85.4%; display: flex; gap: 16px; }
.cta .b.lime { padding: 0 16px 0 22px; box-shadow: 0 4px 0 #0008; }
.cta .b.lime .ic:first-child { width: 20px; height: 20px; }
.cta .b.out { background: rgba(10,10,10,.82); border-width: 2px; padding: 0 20px; box-shadow: 0 4px 0 #0008; }

/* ---------- category chips ---------- */
.chips { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 22px 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button, .pt button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 17px; border-radius: 999px; background: #161616; border: 1.5px solid #3a3a3a; color: #e8e4dc; font-size: 14px; font-weight: 500; white-space: nowrap; flex: none; }
.chips button:hover, .pt button:hover { border-color: #5a5a5a; }
.chips button .ic { width: 18px; height: 18px; }
.chips button.on { background: var(--lilac); border-color: var(--lilac); color: #1b0b26; font-weight: 600; }
.more { position: relative; flex: none; }
.morelist { position: absolute; right: 0; top: 40px; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; width: 320px; padding: 12px; background: #151515; border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 12px 30px #000a; }
.morelist[hidden] { display: none; }
.morelist em { color: var(--muted); font-size: 13px; }
.chips .morelist button { height: 30px; padding: 0 12px; }

/* ---------- trending ---------- */
.trend { padding: 4px 14px 14px; }
.th { display: flex; align-items: center; gap: 22px; padding: 8px 8px 12px; flex-wrap: wrap; }
.th h2 { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 29px var(--sans); letter-spacing: -.3px; }
.th h2 .fire { font-size: 30px; }
.th p { margin: 0; color: #c9c5bd; font-size: 15.5px; }
.pt { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pt > span { font-weight: 600; font-size: 17px; margin-right: 4px; }
.pt button { height: 34px; padding: 0 22px; font-size: 16px; background: #121212; border-color: #555; }
.pt button .ic { width: 22px; height: 22px; }
.pt button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }
.th .all { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); font-weight: 600; font-size: 16px; margin-left: 30px; }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.gc { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1.5px solid #2e2e2e; border-radius: 10px; overflow: hidden; transition: border-color .15s, transform .15s; }
.gc:hover { border-color: #555; transform: translateY(-2px); }
.gc[hidden] { display: none; }
.gc .hit { position: absolute; inset: 0; z-index: 1; }
.cover { aspect-ratio: 248 / 155; background: linear-gradient(135deg, var(--c), #160f22 85%); display: grid; place-items: center; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster { font-family: var(--display); font-size: 34px; line-height: .95; text-align: center; padding: 0 14px; color: #fff3c4; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 3px 4px 0 #0007; transform: rotate(-4deg); letter-spacing: .5px; }
.badge { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; background: rgba(12,12,12,.88); border: 1.5px solid #e9e6df; font-size: 12px; font-weight: 500; }
.badge .ic { width: 15px; height: 15px; }
.gc[data-wallet="optional"] .badge { border-color: #b98cff; }
.gc[data-wallet="required"] .badge { border-color: var(--lime); }
.gb { display: flex; flex-direction: column; flex: 1; padding: 7px 10px 9px; }
.gb h3 { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb .by { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; max-width: 100%; color: #bdb7ad; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.gb .by:hover { color: #fff; }
.gb .by img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; flex: none; }
.gb .by span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb p { margin: 2px 0 8px; color: #d7d3cb; font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; min-height: 22px; overflow: hidden; max-height: 24px; }
.tags span { font-size: 11.5px; padding: 2px 11px; border-radius: 999px; background: #232323; border: 1px solid #3c3c3c; color: #e5e1d9; white-space: nowrap; }
.foot { margin-top: auto; padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stat { display: inline-flex; align-items: center; gap: 6px; color: #d9d5cd; font-size: 14px; font-weight: 600; }
.stat .ic { width: 14px; height: 14px; color: var(--gold); }
.pn { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 27px; padding: 0 12px; border-radius: 6px; background: var(--lime); color: var(--ink); font-weight: 700; font-size: 13.5px; }
.pn .ic { width: 13px; height: 13px; }
.pn:hover { background: #d6ff52; }
.empty { color: var(--muted); padding: 24px 8px; font-size: 15px; }
.empty a { color: var(--lime); }

/* ---------- Web3 Arcade strip ---------- */
.w3a { padding: 0 0 8px; margin-left: calc(-1 * var(--rail)); scroll-margin-top: 20px; }
.strip { position: relative; }
.strip > img { display: block; width: 100%; height: auto; }
.w3in { position: absolute; inset: 9% 1.2% 9% 36.2%; display: flex; align-items: center; gap: 18px; }
.thumbs { flex: 1; min-width: 0; display: flex; gap: 9px; height: 100%; overflow-x: auto; scrollbar-width: none; padding-left: 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.th3 { position: relative; flex: 0 0 auto; aspect-ratio: 130 / 82; height: 100%; border-radius: 7px; border: 2px solid #e9e1cf; overflow: hidden; background: linear-gradient(135deg, var(--c), #0f0c18 85%); box-shadow: 0 2px 6px #0009; }
.th3 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th3 i { position: absolute; inset: 0; display: grid; place-items: center; font: normal 20px/1 var(--display); color: #fff3c4; text-align: center; padding: 6px; text-shadow: 2px 2px 0 #000; transform: rotate(-4deg); }
.th3 span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 3px; font-size: 13.5px; font-weight: 600; text-align: center; background: linear-gradient(transparent, #000d 55%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th3:hover { border-color: var(--lime); }
.soon { margin: auto 0; color: #f1ecdf; font-weight: 600; font-size: 15px; text-shadow: 0 1px 3px #000; max-width: 520px; }
.w3in .b.lime { height: 48px; font-size: 20px; padding: 0 16px 0 18px; border-radius: 9px; box-shadow: 0 3px 0 #0009; flex: none; }

/* ---------- footer + dialog ---------- */
.ft { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 22px 22px 34px; color: var(--muted); font-size: 13px; border-top: 1px solid #1c1c1c; }
.ft span:first-child { font-family: var(--display); font-size: 20px; color: var(--lime); letter-spacing: .5px; }
.ft a:hover { color: var(--text); }
.ft span:last-child { flex-basis: 100%; }
.dlg { background: #151515; color: var(--text); border: 1px solid var(--line2); border-radius: 14px; padding: 22px 24px; max-width: 420px; }
.dlg::backdrop { background: #000b; }
.dlg h3 { margin: 0 0 8px; font-family: var(--display); font-size: 28px; letter-spacing: .5px; color: var(--lime); font-weight: 400; }
.dlg p { color: #cfcac2; margin: 0 0 18px; line-height: 1.5; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1400px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .th .all { margin-left: 0; }
}
@media (max-width: 1180px) {
  .bar { padding-left: calc(21.5% + 16px); }
  .search kbd { display: none; }
  .b.ai span { display: none; }
  .b.ai { padding: 0 12px; }
  .pt { margin-left: 0; }
}
@media (max-width: 900px) {
  :root { --rail: 0px; }
  body.rg-home { padding-bottom: 68px; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border-width: 1px 0 0; background: #0b0b0bf2; backdrop-filter: blur(8px); }
  .rail a, .rail a.w3 { margin: 0; flex: 1; align-items: center; text-align: center; padding: 6px 2px; font-size: 10.5px; gap: 3px; border-width: 0; font-family: var(--sans); letter-spacing: 0; }
  .rail a .ic, .rail a.w3 .ic { width: 22px; height: 22px; }
  .rail a { min-width: 0; }
  .rail a span { max-width: 100%; overflow-wrap: anywhere; }
  .rail a.w3 { color: var(--lime); }
  .bar { height: auto; padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .search { order: 2; flex: 1 1 100%; height: 40px; }
  .search kbd { display: none; }
  .acts { margin-left: 0; width: 100%; gap: 8px; }
  .acts .b { height: 38px; font-size: 14px; padding: 0 12px; gap: 6px; }
  .acts .b .ic { width: 18px; height: 18px; }
  .acts .b.lime { margin-left: auto; }
  .hero { aspect-ratio: auto; overflow: visible; margin: 0; -webkit-mask: none; mask: none; }
  .hero img { height: auto; }
  .cta { position: static; padding: 12px 12px 4px; gap: 10px; }
  .cta .b, .cta .b.lime, .cta .b.out { flex: 1 1 0; min-width: 0; font-size: 15px; height: 44px; padding: 0 8px; gap: 6px; }
  .cta .b .ic.sm { display: none; }
  .chips { gap: 8px; padding: 10px 12px 6px; }
  .trend { padding: 4px 10px 12px; }
  .th { gap: 6px 14px; padding: 8px 2px 12px; }
  .th h2 { font-size: 23px; }
  .th p { font-size: 13.5px; flex-basis: 100%; order: 3; }
  .th .all { margin-left: auto; font-size: 14px; }
  .pt { order: 4; width: 100%; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .pt > span { font-size: 14px; margin: 0; white-space: nowrap; }
  .pt button { height: 32px; padding: 0 12px; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gb h3 { font-size: 15px; }
  .poster { font-size: 26px; }
  .stat { font-size: 12px; }
  .pn { padding: 0 9px; font-size: 12.5px; gap: 5px; }
  .w3a { margin-left: 0; padding: 0 0 6px; }
  .feat { font-size: 0; gap: 0; padding: 4px; }
  .strip { background: #2b3410 linear-gradient(180deg, #3b4415, #222a0b); border-top: 2px solid #e2d6b8; border-bottom: 2px solid #e2d6b8; }
  .strip > img { height: 64px; width: auto; max-width: none; object-fit: cover; object-position: left center; aspect-ratio: auto; clip-path: inset(0 0 0 0); width: 820px; }
  .strip { overflow: hidden; }
  .w3in { position: static; flex-direction: column; align-items: stretch; padding: 4px 10px 12px; gap: 10px; }
  .thumbs { height: 86px; flex: none; }
  .th3 { height: 86px; }
  .w3in .b.lime { height: 44px; font-size: 17px; }
}
@media (max-width: 420px) {
  .acts .b.out span { display: none; }
  .grid { gap: 7px; }
  .tags span { padding: 2px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gc, .b { transition: none; }
}
.stat.new { color: var(--lime); font-size: 12px; letter-spacing: .6px; text-transform: uppercase; border: 1px solid #c8f53a66; border-radius: 6px; padding: 2px 7px; }
.feat { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 7px; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 700; box-shadow: 0 2px 6px #0008; }
.feat .ic { width: 14px; height: 14px; fill: currentColor; }
.gc[data-featured="1"] { border-color: #c8f53a88; }
/* Icon frames (src/frames.js): a gradient ring around the icon, the inside kept dark. */
.av{display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:50%;line-height:0}
.av img{display:block;object-fit:contain}
.av[class*=" fr-"]{border:3px solid transparent;background:linear-gradient(var(--av-bg,#221e33),var(--av-bg,#221e33)) padding-box,var(--ring,transparent) border-box}
.fr-bronze{--ring:linear-gradient(135deg,#f6c08f,#8a4b1f 50%,#d9925a)}
.fr-silver{--ring:linear-gradient(135deg,#ffffff,#8c94a6 50%,#e3e7ef)}
.fr-scenespot{--ring:linear-gradient(135deg,#fff1b0,#f5b82e 45%,#b97400);box-shadow:0 0 12px rgba(245,184,46,.55)}
.fr-champion{--ring:conic-gradient(#ffd76a,#8f6bff,#ffd76a,#8f6bff,#ffd76a);box-shadow:0 0 14px rgba(143,107,255,.6)}
.fr-neon{--ring:linear-gradient(135deg,#2ef2ff,#8f6bff);box-shadow:0 0 12px rgba(46,242,255,.6)}
.fr-inferno{--ring:linear-gradient(160deg,#ffe14d,#ff5c39 45%,#b3124f);box-shadow:0 0 14px rgba(255,92,57,.6)}
.fr-rainbow{--ring:conic-gradient(#ff4d4d,#ffb84d,#fff04d,#4dff88,#4dd2ff,#9b6bff,#ff4dd2,#ff4d4d)}
.fr-diamond{--ring:conic-gradient(#ffffff,#9fe6ff,#ffffff,#b9c2ff,#ffffff,#9fe6ff,#ffffff);box-shadow:0 0 16px rgba(170,225,255,.75)}
.b.me .av img{object-fit:contain;border-radius:0}.b.me .av[class*=" fr-"]{border-width:2px}
