/* Game catalog and final portal refinements. */
.topbar nav::before { width: 443px; }
.topbar nav > a { min-width: 104px; }
.hero-copy h1 { font-size: clamp(62px,6.15vw,86px); }
.hero-copy > p { max-width: 425px; }
.hero-meta { margin-top: 46px; }
.hero-card { border-color: #504b5e; background: #15151d; }
.hero-card .console-heading { padding: 27px 23px 21px; }
.hero-card .sample-code { min-height: 94px; border-radius: 8px; }
.hero-card .sample-code code { white-space: normal; font-size: 11px; }
.hero-card .sample-code code span { display: block; }
.hero-card .sample-label { font-size: 10px; }
.hero-card .sample-copy { border: 1px solid #aa90c74a; background: #aa90c716; font-weight: 800; }
.hero-card .sample-copy:hover { background: #ab8bd72b; border-color: #bc9ce7; }
.hero-card .sample-copy .copy-symbol { font-size: 15px; }
.hero-card .card-foot { margin-top: 18px; }
.terminal-next { background: #ffffff03; }
.games-section { width: 100%; background: #0f1017; }
.games-container { width: min(100%,1200px); padding-inline: 30px; margin-inline: auto; }
.games-preview { padding: 54px 0 83px; border-top: 1px solid #ffffff17; }
.games-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 26px; }
.games-heading h2 { margin: 12px 0 8px; font-size: clamp(27px,3.5vw,37px); letter-spacing: -1.5px; line-height: 1.1; }
.games-heading p { margin: 0; font-size: 12px; line-height: 1.7; color: #898795; }
.games-period { color: #bfa1f0; }
.games-see-all { border: 1px solid #655b78; border-radius: 8px; padding: 11px 16px; background: #ffffff06; color: #d7c5f3; font-size: 11px; font-weight: 800; white-space: nowrap; transition: background .18s; }
.games-see-all:hover { color: #fff; background: #b095d020; }
.games-see-all span { margin-left: 11px; }
.games-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.game-tile { display: flex; flex-direction: column; overflow: hidden; min-width: 0; border: 1px solid #363440; border-radius: 12px; background: #191922; transition: border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.game-tile:hover { color: #fff; border-color: #b49bd6a0; box-shadow: 0 14px 35px #0005; transform: translateY(-3px); }
.game-tile:focus-visible { border-color: #d7c3f4; outline: 2px solid #d7c3f4; outline-offset: 3px; }
.game-cover { position: relative; height: 186px; isolation: isolate; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid #ffffff13; background: linear-gradient(130deg,#29253b,#171b29 63%,#283044); }
.game-tile:nth-child(4n+2) .game-cover { background: linear-gradient(130deg,#223138,#161d26 63%,#252b40); }
.game-tile:nth-child(4n+3) .game-cover { background: linear-gradient(130deg,#33302a,#201c2a 63%,#302a42); }
.game-tile:nth-child(4n+4) .game-cover { background: linear-gradient(130deg,#352435,#171b29 63%,#292332); }
.game-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(0deg,#0b0d1490,transparent 54%); }
.game-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; filter: saturate(.86); transition: transform .3s ease,filter .3s ease; }
.game-tile:hover .game-cover img { transform: scale(1.05); filter: saturate(1.06); }
.game-monogram { font-size: 95px; font-weight: 800; line-height: 1; letter-spacing: -6px; color: #bba9d84b; user-select: none; }
.game-cover-index { position: absolute; z-index: 3; bottom: 14px; left: 17px; color: #e4ddf2; font: 11px 'DM Mono',monospace; }
.game-info { min-width: 0; display: flex; flex: 1; flex-direction: column; padding: 19px 19px 18px; }
.game-kicker { color: #9c91ae; font: 9px 'DM Mono',monospace; letter-spacing: 1.3px; }
.game-info h3 { margin: 10px 0 24px; font-size: 17px; line-height: 1.3; font-weight: 800; letter-spacing: -.45px; overflow-wrap: anywhere; }
.game-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid #ffffff17; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.game-bottom > span { color: #918a9e; font: 10px 'DM Mono',monospace; }
.game-bottom > strong { color: #d3c0ec; font-size: 11px; }
.games-message { grid-column: 1 / -1; margin: 0; padding: 35px 26px; border: 1px dashed #474355; border-radius: 10px; color: #aaa3b5; font-size: 13px; line-height: 1.6; text-align: center; background: #ffffff03; }
.games-page { min-height: calc(100svh - 180px); padding: 70px 0 100px; background: transparent; }
.games-page-header { margin-bottom: 35px; }
.games-page-header h1 { margin: 21px 0 10px; font-size: clamp(50px,6vw,78px); letter-spacing: -4px; line-height: 1.08; }
.games-page-header p { margin: 0; max-width: 550px; color: #a6a1b1; line-height: 1.8; font-size: 13px; }
.games-controls { display: grid; grid-template-columns: minmax(210px,1fr) minmax(135px,170px) minmax(135px,170px); align-items: end; gap: 12px; margin: 0 0 23px; }
.games-controls .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; }
.games-search { position: relative; display: flex; align-items: center; min-width: 0; }
.games-search svg { position: absolute; z-index: 1; pointer-events: none; width: 18px; height: 18px; left: 16px; color: #b8a6d2; }
.games-search input, .games-control select { box-sizing: border-box; display: block; width: 100%; min-width: 0; height: 48px; border: 1px solid #454050; border-radius: 9px; color: #ece7f4; background: #191a24; font: 600 12px Manrope,system-ui,sans-serif; outline: 0; transition: border-color .15s,background .15s; }
.games-search input { padding: 0 16px 0 46px; appearance: none; -webkit-appearance: none; }
.games-search input::placeholder { color: #858092; opacity: 1; }
.games-search input::-webkit-search-cancel-button { cursor: pointer; }
.games-control { display: flex; flex-direction: column; gap: 7px; color: #a89eb6; font: 10px 'DM Mono',monospace; letter-spacing: .65px; }
.games-control select { padding: 0 33px 0 13px; cursor: pointer; color-scheme: dark; }
.games-search input:hover, .games-control select:hover { border-color: #8f77ae; }
.games-search input:focus-visible, .games-control select:focus-visible { border-color: #d6bdf4; outline: 2px solid #ab8dd252; outline-offset: 1px; }
.games-search input:disabled, .games-control select:disabled { opacity: .55; cursor: progress; }
.games-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 29px; padding-top: 24px; border-top: 1px solid #ffffff19; }
.games-pagination[hidden] { display: none; }
.games-page-button { height: 42px; min-width: 112px; padding: 0 16px; background: #1c1b27; border: 1px solid #59506c; border-radius: 8px; color: #e3d7f2; font: 700 11px Manrope,system-ui,sans-serif; cursor: pointer; transition: border-color .15s,background .15s; }
.games-page-button:hover:not(:disabled) { background: #332842; border-color: #bea4df; }
.games-page-button:focus-visible { outline: 2px solid #d6bdf4; outline-offset: 3px; }
.games-page-button:disabled { cursor: default; opacity: .32; }
.games-page-position { min-width: 58px; text-align: center; color: #d7c5f1; font: 700 13px 'DM Mono',monospace; font-variant-numeric: tabular-nums; }
.games-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; margin-bottom: 17px; border-bottom: 1px solid #ffffff22; border-top: 1px solid #ffffff22; color: #948da0; font: 10px 'DM Mono',monospace; letter-spacing: 1px; }
.games-page .game-cover { height: 200px; }
@media (max-width:1120px) and (min-width:761px) {
  .topbar nav::before { width: 410px; }
  .topbar nav > a { min-width: 96px; padding-inline: 10px; font-size: 11px; }
  .topbar .brand { font-size: 15px; }
  .games-grid { gap: 12px; }
}
@media (max-width:760px) {
  .topbar nav::before { display: none; }
  .topbar nav > a { min-width: 0; }
  .games-container { padding-inline: 20px; }
  .games-preview { padding: 43px 0 60px; }
  .games-heading { align-items: flex-start; }
  .games-heading h2 { font-size: 29px; }
  .games-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .game-cover { height: 156px; }
  .game-info { padding: 15px; }
  .game-info h3 { margin-bottom: 20px; font-size: 15px; }
  .game-bottom > span { font-size: 9px; }
  .game-bottom > strong { font-size: 10px; }
  .games-page { padding: 55px 0 76px; }
  .games-page-header h1 { letter-spacing: -2.7px; }
  .games-page .game-cover { height: 167px; }
  .games-controls { grid-template-columns: minmax(0,1fr) minmax(110px,145px); gap: 10px; }
  .games-search { grid-column: 1 / -1; }
}
@media (max-width:520px) {
  .games-heading { gap: 10px; }
  .games-see-all { padding: 9px 10px; font-size: 10px; }
  .games-grid { grid-template-columns: 1fr; }
  .game-cover,.games-page .game-cover { height: 190px; }
  .game-info h3 { font-size: 18px; margin-bottom: 22px; }
  .game-info { padding: 18px; }
  .game-bottom > span { font-size: 10px; }
  .game-bottom > strong { font-size: 11px; }
  .games-toolbar { font-size: 9px; letter-spacing: 0; }
  .games-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .games-control select { padding-left: 10px; font-size: 11px; }
  .games-pagination { gap: 10px; }
  .games-page-button { min-width: 99px; padding-inline: 10px; }
  .games-page-position { min-width: 43px; }
}
/* Tablet layout: navigation has insufficient room beside the brand and login. */
@media (min-width:761px) and (max-width:930px) {
  .topbar { height: 68px; min-height: 68px; gap: 12px; padding: 0 24px; }
  .mobile-menu-toggle { display: flex; flex: 0 0 36px; width: 36px; height: 36px; padding: 7px 8px; flex-direction: column; justify-content: center; gap: 4px; border: 1px solid #ffffff26; border-radius: 8px; background: #ffffff08; cursor: pointer; }
  .mobile-menu-toggle span { display: block; flex: 0 0 2px; width: 18px; height: 2px; border-radius: 2px; background: #d9cfee; transition: transform .18s ease,opacity .18s ease; }
  .mobile-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
  .topbar #auth-button { position: static; margin-left: auto; height: 36px; padding: 0 14px; }
  .topbar nav { position: absolute; inset: calc(100% + 8px) auto auto 24px; display: none; width: 280px; padding: 9px; height: auto; flex-direction: column; align-items: stretch; gap: 3px; justify-content: flex-start; border: 1px solid #a891ca53; border-radius: 12px; background: #1b1a25; box-shadow: 0 20px 48px #000b; pointer-events: auto; }
  .topbar nav::before { display: none; }
  .topbar.menu-open nav { display: flex; }
  .topbar nav > a { width: 100%; min-width: 0; padding: 12px 14px; justify-content: flex-start; gap: 15px; font-size: 12px; }
  main > .hero { max-width: 730px; min-height: auto; grid-template-columns: minmax(0,1fr); gap: 40px; padding: 60px 30px 70px; }
  .hero-copy h1 { font-size: clamp(56px,9vw,70px); line-height: 1.06; }
  .hero-meta { margin-top: 38px; }
  .hero-card { max-width: 580px; justify-self: start; }
  .games-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:350px) {
  .hero-copy h1 { font-size: 45px; line-height: 1.06; letter-spacing: -2.7px; }
  .checkpoint-label { font-size: 9px; letter-spacing: .4px; }
  .checkpoint-label span { font-size: 8px; white-space: nowrap; }
}
@media (prefers-reduced-motion:reduce) {
  .game-tile,.game-cover img { transition: none; }
  .game-tile:hover { transform: none; }
  .game-tile:hover .game-cover img { transform: none; }
}
