*{
  box-sizing: border-box;
}

html{
  --pink: #ac0082;
  --blue: #088fae;
  --purple: #280642;
  --white: #fff;
}

body{
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  background-color: #000;
  min-height: 720px;
}

#contain{
  display:flex;
}

h1{
  font-variant: small-caps;
}

aside{
  flex-basis: 256px;
  background-color: var(--purple);
  min-height: 720px;
}

aside > *{  
  padding: 1px 1px 1px 0;
}

aside h1{
  margin-bottom: 1px;
}

.bordered-container{
  margin-right: .375rem;
  background-color: var(--pink);
  background-image: linear-gradient(var(--pink), var(--blue));
}

.bordered-container div{
  padding: 0.5em;
}

.star-background{
  background-color: #150a1e;
  background-image: url("../rm/images/stars-background.webp");
  background-image: image-set(
      url("../rm/images/stars-background.jxl") type("image/jxl"),
      url("../rm/images/stars-background.webp") type("image/webp")
  );
}

#credits{
  margin-bottom: 1px;
}

aside h3{
  margin-top: 0em;
  font-style: italic;
}

aside ul li{
  list-style-image: url("data:image/svg+xml;utf8,<svg width='6' height='10' viewBox='0 0 4 7' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M.5,0v7M1.5,1v5M2.5,2v3M3.5,3v1' stroke='%23bcbcbc'/></svg>");
  margin-bottom: 1em;
}

aside h1, aside h2, aside h3{
  text-align: center;
}

aside h4{
  font-variant: small-caps;
  font-size: 1.2em;
  margin: .5em;
}

aside a{
  color: var(--pink);
  text-decoration: none;
  position: relative;
}

table{
  text-align: center;
  font-size: .8em;
  border: solid 1px;
}

article{
  animation: turn-on 2s linear;
  min-height: 720px;
  position: relative;
  overflow: hidden;
  flex: 1;
  padding: 24px;
  overflow: auto;
}

@keyframes turn-on{
  0%{opacity:0;}
  100%{opacity:1;}
}

article.star-background{
  background-size: cover;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, 142px);
  grid-template-rows: auto 1fr;
  gap: 20px 24px;
  transition: height .5s;
}

[data-console="nes"]{
  background: 
    repeating-linear-gradient(var(--back-sec) 0 2%, #0000 2% 4%) no-repeat 15% 0 / 23% 95%,
    linear-gradient(var(--back-sec), var(--back-sec)) no-repeat 75% 0 / 50% 71%;
}

@supports not (corner-shape: notch){
  [data-console="nes"]{
    clip-path: polygon(0 0, 100% 0, 100% 80%, 90% 80%, 90% 100%, 10% 100%, 10% 80%, 0 80%);
  }
}

@supports (corner-shape: notch){
  [data-console="nes"]{
    corner-shape: notch;
    border-radius: 0 0 10% 10% / 0 0 20% 20%;
    /* border-bottom-radius: 10% / 20%; */
    /* corner-bottom: notch 10% / 20%; */
  }
}

[data-console="snes"]{
  background: 
  repeating-linear-gradient(to right, #0000 0 10%, var(--back-sec) 10% 12%) no-repeat 0 0 / 100% 15%,
  repeating-linear-gradient(to right, #0000 0 10%, var(--back-sec) 10% 12%) no-repeat 0 100% / 100% 15%,
  linear-gradient(to right, var(--back-sec) 0 45%, #0000 45% 55%, var(--back-sec) 55% 100%) no-repeat 50% 50% / 100% 65%;
}

@supports not (corner-shape: notch){
  [data-console="snes"]{
    clip-path: polygon(0 0, 95% 0, 95% 15%, 100% 15%, 100% 85%, 95% 85%, 95% 100%, 0 100%);
  }
}

@supports (corner-shape: notch){
  [data-console="snes"]{
    corner-shape: notch;
    border-radius: 0 5% 5% 0 / 0 15% 15% 0;
    /* corner: notch 0 5% 5% 0 / 0 15% 15% 0; */
  }
}

[data-console="gb"]{
  background:
    repeating-linear-gradient(var(--back-sec) 0 10%, #0000 10% 20%) no-repeat 0 10% / 100% 15%,
    linear-gradient(var(--back-sec), var(--back-sec)) no-repeat 50% 75% / 75% 60%;
}

@supports not (corner-shape: notch){
  [data-console="gb"]{
    mask: conic-gradient(at 90% 5%, #0000 0 25%, red 0);
  }
}

@supports (corner-shape: notch){
  [data-console="gb"]{
    corner-shape: notch;
    border-top-right-radius: 10% 5%;
  }
}

[data-console="gba"]{
  background:
    linear-gradient(var(--back-sec), var(--back-sec)) no-repeat 50% 50% / 80% 80%;
}

@supports not (corner-shape: notch){
  [data-console="gba"]{
    clip-path: polygon(0 5%, 90% 5%, 90% 0, 100% 0, 100% 100%, 90% 100%, 90% 90%, 0 90%);
  }
}

@supports (corner-shape: notch){
  [data-console="gba"]{
    corner-shape: notch;
    border-radius: 90% 0 0 90% / 5% 0 0 10%;
  }
}

[data-console="n64"]{
  background: 
    radial-gradient(circle at left center, var(--back-sec) 40%, #0000 40%);
}

[data-console="gc"]{
  background: 
    radial-gradient(circle at center, #0000 0 10%, var(--back-sec) 10% 40%, #0000 40%);
}

[data-console="ds"]{
  background:
    linear-gradient(45deg, #0000 8%, var(--back-sec) 0) no-repeat 50% 30% / 80% 80%;
}

.games > div{
  color: #fff;
  width: 142px;
  height: 157px;
  overflow: hidden;
  display: grid;
  grid-template-columns: subgrid;
  grid-area: span 2;
  position: relative;
  --back-sec: rgba(0,0,0,.25);
  background-color: #282828;
}

.games h3{
  font-variant: small-caps;
  font-size: 1.1em;
  text-align: center;
  margin: .5em 0;
}

.link-list{
  width: 100%;
  height: 100%; 
  text-align: center; 
  display: grid; 
  grid-template-columns: repeat(2, 1fr);
}

.games a{
  display: block;
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.games a:hover{
  text-decoration: underline;
  cursor: pointer;
  background-color: rgb(255 255 255 /.25);
}

.link-list:not(:has(> :nth-child(3))) a{  
  grid-column: 1 / -1;
}

.games .hide{
  display: none;
}

.test, .new{
  position: relative;
}

.test:after, .new:after{
  content: 'TEST';
  position: absolute;
  top: 10px;
  right: -40px;
  text-shadow: none;
  font-weight: bold;
  color: #000;
  background-color: var(--orange);
  transform: rotate(45deg);
  width: 8em;
  text-align: center;
}
.new:after{
  content: 'NEW!';
}