@font-face {
    font-family: gameboy;
    src: url(../assests/fonts/Early\ GameBoy.ttf);
    font-display: swap;
  }
  @font-face {
    font-family: gameboytext;
    src: url(../assests/fonts/Pretendo.ttf);
    font-display: swap;
  }
  @font-face {
    font-family: gameboylogo;
    src: url(../assests/fonts/GIL_____.TTF);
    font-display: swap;
  }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth
}

a {
    text-decoration: none;
}

:root {
    --width: 425px;
    --height: 450px;
    --cartridge-color: #8c8c8c;
    --border-round: 5px;
}

body {
    background: rgb(41, 41, 71);
    overflow: hidden;
}

/* Efecto Pixel*/
.pixel-btn{
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background-color: transparent;
}
.pixel-container{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.pixel{
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    background-color: var(--clr);
    border: 1px solid rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.5 ease;
}

/* Loader */
#loader {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.container {
    position: relative;
    width: 425px;
    max-width: 100%;
    height: auto;
    z-index: 998;
    margin: 0 auto;
    margin-top: 5%;
    animation: bounce 3s ease-in-out infinite;
    transform: translateY(0);
}

.cartridge-top {
    position: relative;
    width: calc(var(--width) * 0.9);
    height: calc(var(--height) * 0.05);
    background: var(--cartridge-color);
    border-radius: var(--border-round) var(--border-round) 0 0;
    box-shadow: 0 -2px 0px #aaa;
    z-index: 99;
}

.riftsbox {
    position: absolute;
    width: 100%;
    height: 90%;
    top: 0;
    padding-top: 2.5%;
}

.rifts {
    width: 100%;
    height: 5%;
    background: #444;
    background: linear-gradient(#2f2e2e 5%, #777 85%);
    margin-top: 2%;
}

.cartridge {
    position: relative;
    width: 425px;
    height: auto;
    background-color: #8c8c8c;
    border-radius: 0px 12px 6px 6px;
    overflow: hidden;
    filter: drop-shadow(0 0 4px #000);
    z-index: 98;
}

.cartridge-header {
    position: relative;
    width: calc(var(--width) * 1);
    height: calc(var(--height) * 0.25);
    background: var(--header-patch-gradient);
    border-radius: 0 var(--border-round) 0 0;
    display: flex;
    align-items: center;
}

.cartridge-header-box {
    width: 100%;
    height: 75%;
    background: var(--header-gaps-gradient);
    display: flex;
    justify-content: center;
}

.cartridge-sphere {
    width: 75%;
    height: 95%;
    background: #444;
    background: linear-gradient(#444 5%, #777 85%);
    box-shadow: 0 5px 15px 10px #4448 inset, 0 -1px 0 1px #ddd inset, 0 1px 2px 2px #222 inset;
    border: 5px solid var(--cartridge-color);
    border-radius: 75px;
    transform: translate(0, -8%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--cartridge-color);
    text-shadow: 1px 2px 1px #0005;
}

.cartridge-sphere .brand {
    font-size: 1.1em;
    letter-spacing: 0px;
    font-family: gameboytext;
}

.cartridge-sphere .model {
    letter-spacing: -3px;
    font-size: 1.8em;
    font-family: gameboylogo;
    font-weight: 700;
}

.cartridge-sphere .sign {
    font-size: 0.6em;
    font-family: gameboytext;
}

.cartridge-body {
    width: var(--width);
    height: calc(var(--height) * 0.7);
    background: var(--cartridge-color);
    border-radius: 0 0 var(--border-round) var(--border-round);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background-image: linear-gradient(transparent, #666);
}

.cartridge-end:first-child {
    border-radius: 0 0 0 var(--border-round);
}

.cartridge-end {
    width: 5%;
    height: 75%;
    background: #5d5d5d;
    border-top: 3px solid #444;
}

.cartridge-label-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cartridge-gap {
    width: calc(var(--width) * 0.74);
    height: calc(var(--height) * 0.59);
    background: #666;
    background: linear-gradient(#666, #555);
    border-radius: var(--border-round);
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 2px solid #444;
    border-bottom: 2px solid #aaa;
}

.label {
    width: 98%;
    height: 98%;
    background-image: url(../assests/etiquetacuadrada.png);
    background-size: cover;
    background-position-y: -15px;
    position: relative;
    background-repeat: no-repeat;
}

.arrow-down {
    border-top: 30px solid #555;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-radius: 10px;
    margin: 10px 0 14px 0;
    filter: drop-shadow(0 1px 0 #999) drop-shadow(0 -1px 0 #444);
}

.cartridge-end:last-child {
    border-radius: 0 0 var(--border-round) 0;
}

.cartridge-end {
    width: 5%;
    height: 75%;
    background: #5d5d5d;
    border-top: 3px solid #444;
}

/* Gameboy */
.containergameboy{
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    z-index: 999;
    transition: all 0.5s;
    transform: scale(0.8);
    margin: 0 auto;
    margin-top: 130px;
}
#gameboy{
    position: relative;
    width: 770px;
    height: 600px;
    margin-top: 20%;
    background-color: var(--cartridge-color);
    background-image: linear-gradient(transparent, #666);
    border-radius: 5px;
    filter: drop-shadow(0 0 5px #000);
    box-shadow: 
    inset 10px 0 20px rgba(0,0,0,0.15),   /* sombra interior izquierda */
    inset -10px 0 20px rgba(255,255,255,0.2), /* luz interior derecha */
    inset 0 10px 15px rgba(0,0,0,0.05),   /* sombreado superior */
    inset 0 -10px 10px rgba(255,255,255,0.1), /* luz inferior */
    0 4px 8px rgba(0,0,0,0.3);           /* sombra exterior */
    margin: 0 auto;
}
.gameboytop{
    position: relative;
    width: 100%;
    height: 8px;
    margin-top: 1%;
    box-shadow: 0 5px 15px 10px rgba(154, 152, 152, 0.533) inset, 0 -1px 0 1px #989595 inset, 0 1px 2px 2px #222 inset;
    z-index: 97;
}
.gameboytop2,.gameboytop3{
    position: absolute;
    width: 8px;
    height: 7%;
    top:0;
    box-shadow: 0 5px 15px 10px rgba(154, 152, 152, 0.533) inset, 0 -1px 0 1px #989595 inset, 0 1px 2px 2px #222 inset;
    z-index: 96;
}
.gameboytop2{left: 5%;}
.gameboytop3{right: 5%;}
.wheel{
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    top: -3%;
    left: 10%;
    background-color: var(--cartridge-color);
    background-image: linear-gradient(transparent, #666);
    box-shadow: 
    inset 10px 0 20px rgba(0,0,0,0.15),   /* sombra interior izquierda */
    inset -10px 0 20px rgba(255,255,255,0.2), /* luz interior derecha */
    inset 0 10px 15px rgba(0,0,0,0.05),   /* sombreado superior */
    inset 0 -10px 10px rgba(255,255,255,0.1), /* luz inferior */
    0 4px 8px rgba(0,0,0,0.3);           /* sombra exterior */
    transition: 0.8s all;
    border: 1px dotted rgb(41, 41, 71);
}
.toptext{
    position: relative;
    width: 15%;
    height: 5%;
    background: var(--cartridge-color);
    box-shadow: 0 5px 15px 10px rgba(118, 116, 116, 0.533) inset, 0 -1px 0 1px #ddd inset, 0 1px 2px 2px #3f3f3f inset;
    filter: drop-shadow(0px -1px 1px black);
    border-radius: 75px;
    padding-top: 0.5%;
    left: 8%;
    top: 0;
    color: var(--cartridge-color);
    text-align: center;
    text-shadow: 1px 2px 1px #0005;
    text-transform: uppercase;
    font-family: gameboylogo;
    font-size: clamp(0.8rem, 1.2vw + 0.5rem, 1rem);
}
.gameboyscreenborder{
    position: relative;
    width: 80%;
    height: 70%;
    margin-left: 10%;
    margin-top: 3%;
    background-color: #52575f;
    border-radius: 20px;
}
.gameboyscreenborder::before{
    position: absolute;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    box-shadow: 0 5px 15px 5px rgba(120, 120, 120, 0.533) inset, 0 -1px 0 1px #9a9999 inset, 0 1px 2px 2px #222 inset;
    border-radius: 20px;
    z-index: 99;
}
.redline{
    position: absolute;
    width: 95%;
    height: 1%;
    background-color: rgba(255, 0, 0, 0.479);
    left: 2.5%;
    top: 3%;
}
.blueline{
    position: absolute;
    width: 95%;
    height: 1%;
    background-color: rgba(21, 0, 255, 0.479);
    left: 2.5%;
    top: 6%;
}
.bordertext{
    position: absolute;
    width: 60%;
    height: 20%;
    right: 10%;
    top: 1%;
    padding: 1%;
    background-color: #52575f;
    font-size: clamp(0.8rem, 1.2vw + 0.5rem, 1.2rem);
    font-weight: 500;
    letter-spacing: 1px;
    z-index: 98;
    text-transform: uppercase;
    text-align: center;
    color: rgba(255, 255, 255, 0.556);
    font-family: gameboylogo;
}
.greenscreen{
    position: absolute;
    width: 100%;
    height: 80%;
    left:1%;
    top: 1%;
    background-color: rgb(90, 128, 0);
    box-shadow: 0 5px 15px 10px rgba(33, 33, 33, 0.533) inset, 0 1px 2px 2px #222 inset;
    z-index: 99;
    transform: scale(0.7);
}
.titulogameboy{
    width: 100%;
    text-align: center;
    font-size: 5em;
    color: white;
    margin-top: 0%;
    text-transform: uppercase;
    font-family: gameboy;
    font-weight: 200;
    filter: drop-shadow(0px 0px 7px white);
    /*-webkit-text-stroke:2px black;*/
}
.redled{
    position: absolute;
    width: 15px;
    height: 15px;
    top: 30%;
    left: 5%;
    border-radius: 100%;
    background-color: black;
    box-shadow: none;
    transition: 1s all;
}

/* Animations */

@keyframes bounce{
    0% {
        transform: translateY(0);
      }
      20% {
        transform: translateY(10px);
      }
      40% {
        transform: translateY(-4px);
      }
      60% {
        transform: translateY(0);
      }
      100% {
        transform: translateY(0);
      }
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(0);
  }

  .animate {
    animation: bounceIn 0.4s ease-out forwards;
  }
  .animate2 {
    animation: bounceIn2 0.4s ease-out forwards;
  }

  @keyframes bounceIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    50% {
      opacity: 1;
      transform: translateY(-5px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes bounceIn2 {
    0% {
      font-size: 5em;
    }
    50% {
      opacity: 1;
      font-size: 5.2em;
    }
    100% {
      opacity: 1;
      font-size: 5em;
    }
  }