/* FA Games shared stylesheet.
   Used by the legal pages, the 404 page and the generated game pages.
   Change colours in the tokens below, not in each page. */

/* 1. Design tokens (section 2 of the adsense-fix skill) */
:root{
  --font-body:"Proxima Nova","Figtree","Open Sans",Arial,sans-serif;
  --font-display:"Torus","Fredoka","Nunito",sans-serif;
  --navy:#1b2346;--navy-2:#2b3a8c;
  --blue:#5b5bff;--blue-hover:#4141e0;--white:#fff;
  --grey-100:#f2f3fb;--grey-300:#c3c6e0;--grey-400:#8a8fae;--grey-600:#5e6384;
  --green-1:#6fa8ff;--green-3:#8fbaff;--green-5:#a9c9ff;--green-7:#cfdcff;--green-8:#e3eaff;
  --yellow-7:#ffe17a;--yellow-4:#ffc83d;
  --sp-m:16px;
  --max-text:820px;
  --r-m:10px;--r-l:22px;--r-full:9999px;
  --tile-r:22px 22px 22px 8px;   /* one sharp corner, bottom-left */
  --shadow-close:0 3px 5px 3px #5e638433;
  --shadow-mid:0 7px 10px 4px #5e63844d;
  --shadow-hover:0 12px 16px 8px #5e63844d;
  --ease:cubic-bezier(.25,.1,.25,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
}

/* 2. Base */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  color:var(--navy);font:400 16px/24px var(--font-body);min-width:314px;
  overscroll-behavior:none;
  background-color:var(--green-7);
  /* 3. Background: faceted periwinkle polygons, repeated down the page */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 1200' preserveAspectRatio='none'%3E%3Cg%3E%3Cpolygon points='0,0 260,0 0,330' fill='%238fbaff'/%3E%3Cpolygon points='0,330 200,420 0,700' fill='%23a9c9ff'/%3E%3Cpolygon points='0,700 160,620 120,980' fill='%236fa8ff' opacity='.55'/%3E%3Cpolygon points='0,980 120,980 0,1200' fill='%23b8d0ff'/%3E%3Cpolygon points='260,0 620,0 420,170' fill='%23e3eaff' opacity='.7'/%3E%3Cpolygon points='900,0 1180,0 1050,220' fill='%23e3eaff' opacity='.6'/%3E%3Cpolygon points='1440,0 1180,0 1440,360' fill='%23a9c9ff'/%3E%3Cpolygon points='1440,360 1260,520 1440,760' fill='%238fbaff' opacity='.75'/%3E%3Cpolygon points='1440,760 1300,900 1440,1200' fill='%236fa8ff' opacity='.5'/%3E%3Cpolygon points='620,520 900,430 760,760' fill='%23e3eaff' opacity='.45'/%3E%3Cpolygon points='300,900 640,1000 380,1200' fill='%23b8d0ff' opacity='.5'/%3E%3Cpolygon points='980,1000 1200,1200 820,1200' fill='%23a9c9ff' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  background-position:center top;
  background-size:max(624px,100%) auto;
  background-repeat:repeat-y;
}
h1,h2,h3{font-family:var(--font-display);font-weight:700;margin:0}
a{color:var(--blue);text-decoration:none}
a:focus-visible,button:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
button{font:inherit}
img{max-width:100%;display:block}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* 4. Page wrapper: keeps content clear of the fixed desktop nav tile */
.page{padding:32px 16px 0}
@media (min-width:771px){
  .page{padding-left:calc(var(--nav-left,16px) + 94px + 16px)}
}

/* 5. Header: desktop nav tile (fixed, top-left) */
.nav-tile{
  position:fixed;top:16px;z-index:10;
  left:var(--nav-left,16px);
  width:94px;height:94px;
  display:flex;flex-direction:column;
  background:#fff;border-radius:var(--r-l);box-shadow:var(--shadow-close);
  overflow:hidden;
}
.nav-tile__logo{
  flex:1;display:flex;align-items:center;justify-content:center;
  border-bottom:1px solid var(--grey-100);
  color:var(--navy);font:700 19px/1 var(--font-display);letter-spacing:-.2px;white-space:nowrap;
}
.nav-tile__logo:hover{color:var(--navy)}
.nav-tile__logo b,.nav-bar__logo b{color:var(--blue);font-weight:700}
.nav-tile__btn{
  flex:1;display:grid;place-items:center;
  color:var(--blue);text-decoration:none;
  transition:background-color .2s ease,color .2s ease;
}
.nav-tile__btn:hover{background:var(--grey-100);color:var(--blue-hover)}
.nav-tile__btn:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.nav-tile__btn svg{width:20px;height:20px}

/* 6. Header: phone nav bar (hidden on desktop) */
.nav-bar{display:none}
@media (max-width:770px){
  .nav-tile{display:none}
  .nav-bar{
    position:sticky;top:16px;z-index:10;
    display:flex;align-items:center;
    width:calc(100% - 32px);margin:16px auto 0;height:56px;
    padding:0 8px 0 16px;
    background:#fff;border-radius:var(--r-l);box-shadow:var(--shadow-close);
  }
  .nav-bar__logo{
    height:100%;display:flex;align-items:center;
    padding-right:14px;margin-right:6px;border-right:1px solid var(--grey-100);
    color:var(--navy);font:700 20px/1 var(--font-display);letter-spacing:-.2px;white-space:nowrap;
  }
  .nav-bar__icons{flex:1;display:flex;justify-content:space-around}
  .nav-bar__icons a{
    width:40px;height:40px;color:var(--navy);
    display:grid;place-items:center;border-radius:var(--r-full);
  }
  .nav-bar__icons a:active{background:var(--grey-100)}
  .nav-bar__icons svg{width:24px;height:24px}
}

/* 7. Game tile (also used on home, search and related-games grids) */
.tile{
  position:relative;display:block;border-radius:var(--tile-r);
  background:var(--grey-100);box-shadow:var(--shadow-mid);
  color:#fff;text-decoration:none;user-select:none;-webkit-touch-callout:none;
  transition:transform .6s var(--ease);
  container-type:inline-size;
}
/* colour block behind the thumbnail; the emoji sits in it */
.tile__art{
  position:absolute;inset:0;z-index:0;border-radius:inherit;overflow:hidden;
  display:grid;place-items:center;font-size:40cqw;line-height:1;
}
/* thumbnail, covers the art block */
.tile__img{
  position:absolute;inset:0;z-index:1;width:100%;height:100%;
  object-fit:cover;border-radius:inherit;display:block;
}
/* dark gradient that appears on hover */
.tile::after{
  content:"";position:absolute;inset:0;z-index:5;border-radius:inherit;
  background:linear-gradient(#0000 25%,#0000004d);
  opacity:0;transition:opacity .3s var(--ease);pointer-events:none;
}
/* game name, slides up on hover */
.tile__title{
  position:absolute;left:0;right:0;bottom:0;z-index:6;padding:6px;
  color:#fff;font:700 12px/1.3 var(--font-body);text-align:center;
  -webkit-font-smoothing:antialiased;
  opacity:0;transform:translateY(8px);
  transition:transform .3s var(--ease) .1s,opacity .3s var(--ease) .1s;
  pointer-events:none;
}
@container (min-width:200px){.tile__title{font-size:14px;padding:8px 10px 10px}}
@container (min-width:300px){.tile__title{font-size:16px;padding:10px 14px 14px}}
@media (hover:hover){
  .tile:hover{transform:scale(1.04) translateY(-4px);transition-duration:.3s}
  .tile:hover::after{opacity:1;box-shadow:var(--shadow-hover)}
  .tile:hover .tile__title{opacity:1;transform:translateY(0)}
}
.tile:active{transform:scale(.97)}
.tile:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.tile:focus-visible::after{opacity:1}
.tile:focus-visible .tile__title{opacity:1;transform:none}

/* 8. Tile grid: square tiles, 140px columns, 3 columns under 566px */
.tile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,140px);
  gap:16px;
  justify-content:center;
}
.tile-grid > .tile{width:100%;aspect-ratio:1/1}
@media (max-width:565px){
  .tile-grid{grid-template-columns:repeat(3,1fr)}
}

/* 9. Header and footer: footer (every page) */
.footer{position:relative;isolation:isolate;margin-top:64px;padding:56px 0 48px}
.footer::before{
  content:"";position:absolute;inset:0;z-index:-1;background:#fff;
  clip-path:polygon(0 4%,30% 0,32% 3%,100% 2%,100% 100%,0 100%);
}
.footer__inner{
  width:min(100% - 32px,960px);margin:0 auto;
  display:flex;flex-direction:column;align-items:center;gap:20px;text-align:center;
}
.footer__tagline{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 16px;
  font:700 20px/1 var(--font-display);color:var(--blue);
}
.footer__wordmark{color:var(--navy)}
.footer__wordmark b{color:var(--blue);font-weight:700}
.sticker{
  background:var(--blue);color:#fff;border-radius:var(--r-full);padding:5px 10px;
  font:700 16px/1 var(--font-display);transform:rotate(-2deg);
}
/* slim legal row: About · Contact · Privacy Policy · Terms of Use */
.footer__legal{
  list-style:none;margin:0;padding:0;
  display:flex;flex-wrap:wrap;justify-content:center;gap:8px 0;
  font:700 14px/20px var(--font-body);
}
.footer__legal li + li::before{content:"\00b7";padding:0 10px;color:var(--grey-400)}
.footer__legal a{color:var(--navy)}
.footer__legal a:hover{color:var(--blue)}
.footer__copy{margin:0;font:400 14px/20px var(--font-body);color:var(--grey-600)}

/* 10. Content card: white card for legal pages, 404 and game text */
.content-card{
  width:min(100% - 32px,var(--max-text));margin:0 auto;
  background:#fff;border-radius:var(--tile-r);box-shadow:var(--shadow-mid);
  padding:32px 24px;
  font-size:17px;line-height:28px;
}
@media (min-width:771px){.content-card{padding:48px 56px}}
.content-card h1{font-size:28px;line-height:34px;margin:0 0 24px}
@media (min-width:771px){.content-card h1{font-size:36px;line-height:42px}}
.content-card h2{font-size:22px;line-height:28px;margin:40px 0 12px}
.content-card p,.content-card ul,.content-card ol{margin:0 0 16px}
.content-card ul,.content-card ol{padding-left:24px}
.content-card li + li{margin-top:8px}
.content-card strong{font-weight:700}
.content-card a{color:var(--blue-hover);text-decoration:underline;text-underline-offset:3px}
.content-card .btn{color:#fff;text-decoration:none}
.content-card .updated{font-size:15px;line-height:24px;color:var(--grey-600)}

/* 11. Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:48px;padding:0 24px;
  border:3px solid var(--blue);border-radius:var(--r-full);
  background:var(--blue);color:#fff;
  font:700 19px/1 var(--font-display);cursor:pointer;text-decoration:none;
  transition:background-color .2s ease,border-color .2s ease,transform .2s var(--ease-spring);
}
.btn:hover{background:var(--blue-hover);border-color:var(--blue-hover);color:#fff;text-decoration:none}
.btn:active{transform:scale(.96);background:var(--navy-2);border-color:var(--navy-2)}
.btn:focus-visible{outline:3px solid var(--navy);outline-offset:3px}

/* 12. Breadcrumb: Home > Genre games > Game */
.crumbs{
  list-style:none;margin:0 0 16px;padding:0;
  display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;
  font:700 13px/20px var(--font-body);color:var(--grey-600);
}
.crumbs li + li::before{content:"\203a";padding:0 8px;color:var(--grey-400)}
.crumbs a{color:var(--navy-2)}
.crumbs a:hover{color:var(--blue)}
.crumbs [aria-current="page"]{color:var(--navy)}

/* 13. Chip: small pill for genre labels and filters */
.chip-row{display:flex;flex-wrap:wrap;gap:10px}
.chip{
  display:inline-flex;align-items:center;flex-shrink:0;
  padding:8px 20px;
  background:#fff;border-radius:var(--r-full);box-shadow:var(--shadow-close);
  color:var(--navy);white-space:nowrap;
  font:700 12px/20px var(--font-body);letter-spacing:.5px;text-transform:uppercase;
  transition:color .2s;
}
.chip:hover{color:var(--blue-hover)}
.chip:active{background:var(--grey-100)}

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