    /* ----- GENERAL CSS ----- */
* {
    box-sizing: border-box;
}

:root {
    --scale: 0.7;
    --gameboyScreen: rgb(100, 100, 100);
    --gameboyShell: rgb(200, 200, 200);
    --offOn: rgb(175, 175, 175);
    --offOnBorder: rgb(85, 85, 85);
    --offOnText: rgb(200, 200, 200);
    --topLines: rgb(148, 148, 148);
    --matrixLineTop: rgb(145, 54, 122);
    --matrixLineBottom: blue;
    --batteryLightOff: black;
    --batteryLightOn: red;
    --dPad: black;
    --dPadCaret: rgb(182, 182, 182);
    --aButton: rgb(114, 43, 96);
    --bButton: rgb(114, 43, 96);
    --selectButton: gray;
    --startButton: gray;
    --startButtonBorder: darkslategray;
    --selectText: darkblue;
    --startText: darkblue;
    --b: darkblue;
    --a: darkblue;
    --shade: rgb(182, 182, 182);
    --speakerGroove: rgb(150, 150, 150);
    --speakerGrooveBorder: rgb(88, 88, 88);
    --displayOff: rgb(44, 88, 23);
    --displayOn: rgb(55, 110, 30);
    --lcdText: rgb(20, 24, 16);
    --lcdDim: rgba(20, 24, 16, 0.6);
    --lcdBorder: rgba(20, 24, 16, 0.35);
    --lcd-width: 160px;
    --lcd-height: 144px;
    --shell-width: calc(400px * var(--scale));
    --shell-height: calc(630px * var(--scale));
}

body {
    background-color: darkslategrey!important;
    font-family: 'Oswald', sans-serif!important;
    text-align: center;
}

.container-fluid {
    width: 100%;
    padding-left: calc(15px * var(--scale));
    padding-right: calc(15px * var(--scale));
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.col {
    flex: 1 0 0%;
}

.col-10 {
    flex: 0 0 83.3333%;
    max-width: 83.3333%;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-4 {
    margin-top: calc(1.5rem * var(--scale));
}

.mt-3 {
    margin-top: calc(1rem * var(--scale));
}

.mt-0 {
    margin-top: 0;
}

.mb-3 {
    margin-bottom: calc(1rem * var(--scale));
}

.mb-1 {
    margin-bottom: calc(0.25rem * var(--scale));
}

.mb-0 {
    margin-bottom: 0;
}

.pl-1 {
    padding-left: calc(0.25rem * var(--scale));
}

.pr-1 {
    padding-right: calc(0.25rem * var(--scale));
}

.gameboy-wrap {
    --responsive-scale: min(
        1,
        calc((100vw - 32px) / var(--shell-width)),
        calc((100vh - 200px) / var(--shell-height))
    );
    position: relative;
    width: calc(var(--shell-width) * var(--responsive-scale));
    height: calc(var(--shell-height) * var(--responsive-scale));
    margin: 0 auto;
}

.gameboy-scale {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--shell-width);
    height: var(--shell-height);
    transform: translateX(-50%) scale(var(--responsive-scale));
    transform-origin: top center;
}

#legal-footer {
    text-align: center;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    padding: 16px 8px;
}

#legal-footer a {
    color: #fff;
    text-decoration: none;
}

#legal-footer a:hover,
#legal-footer a:focus-visible {
    text-decoration: underline;
}


button {
    border: none;
}

.frame button:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

    /* ----- GAMEBOY SHELL ----- */

.frame {
    margin-top: calc(6px * var(--scale));
    height: var(--shell-height);
    width: var(--shell-width);
    border-radius: calc(10px * var(--scale)) calc(10px * var(--scale)) calc(30px * var(--scale)) calc(10px * var(--scale));
    background-color: var(--gameboyShell);
}

.topLines {
    display: flex;
    border-left: calc(3px * var(--scale)) var(--topLines) solid;
    border-right: calc(3px * var(--scale)) var(--topLines) solid;
    height: calc(15px * var(--scale));
}

.offOnContainer {
    position: relative;
    width: var(--shell-width);
}

.offOnButton {
    position: absolute;
    height: calc(6px * var(--scale));
    width: calc(10px * var(--scale));
    background-color: var(--offOn);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    top: 0;
    left: 0;
}

.offOnButton:focus,
.offOnButton:focus-visible,
.offOnButton:active {
    outline: none;
    box-shadow: none;
}

.on {
    margin-left: calc(65px * var(--scale));
}

.off {
    margin-left: calc(45px * var(--scale));
}

.offOn {
    width: calc(50px * var(--scale));
    height: calc(13px * var(--scale));
    background-color: var(--offOn);
    border: calc(1px * var(--scale)) var(--offOnBorder) solid;
    border-radius: calc(6px * var(--scale));
    display: flex; 
    justify-content: center;
    align-items: center;
    align-self: center;
}

.offOnLetters {
    color: var(--offOnText);
    font-size: calc(6px * var(--scale));
    line-height: 1;
    letter-spacing: calc(0.3px * var(--scale));
    text-align: center;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    vertical-align: middle;
}

.caret-left {
    border-width: calc(4px * var(--scale)) calc(6px * var(--scale)) calc(4px * var(--scale)) 0;
    border-color: transparent var(--dPadCaret) transparent transparent;
}

.caret-right {
    border-width: calc(4px * var(--scale)) 0 calc(4px * var(--scale)) calc(6px * var(--scale));
    border-color: transparent transparent transparent var(--dPadCaret);
}

.caret-up {
    border-width: 0 calc(5px * var(--scale)) calc(7px * var(--scale)) calc(5px * var(--scale));
    border-color: transparent transparent var(--dPadCaret) transparent;
}

.caret-down {
    border-width: calc(7px * var(--scale)) calc(5px * var(--scale)) 0 calc(5px * var(--scale));
    border-color: var(--dPadCaret) transparent transparent transparent;
}

.offOnLetters .caret {
    margin: 0 calc(2px * var(--scale));
    transform: scale(0.65);
}

.offOnLetters .caret-left {
    border-color: transparent var(--offOnText) transparent transparent;
}

.offOnLetters .caret-right {
    border-color: transparent transparent transparent var(--offOnText);
}

.topLine {
    height: calc(2px * var(--scale));
    background-color: var(--topLines);
    width: 100%;
}

    /* ----- SCREEN AND DISPLAY ----- */

/* ----- SCREEN ----- */
.screen {
    width: calc(330px * var(--scale));
    height: calc(270px * var(--scale));
    border-radius: calc(5px * var(--scale)) calc(5px * var(--scale)) calc(30px * var(--scale)) calc(5px * var(--scale));
    border: calc(1px * var(--scale)) solid black;
    background-color: var(--gameboyScreen);
}

.dotMatrix {
    position: absolute;
    margin-top: calc(13px * var(--scale));
    margin-left: calc(159px * var(--scale));
    background-color: var(--gameboyScreen);
}

.dotMatrixText {
    font-size: calc(10px * var(--scale));
    color: white;
    display: block;
}

.matrixLineTop {
    width: 90%;
    background-color: var(--matrixLineTop);
    height: calc(1px * var(--scale));
}

.matrixLineBottom {
    width: 90%;
    background-color: var(--matrixLineBottom);
    height: calc(1px * var(--scale));
}

.batteryContainer {
    position: absolute;
    margin-top: calc(70px * var(--scale));
    width: calc(45px * var(--scale));
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    justify-content: center;
}

.batteryLightContainer {
    display: flex;
    width: calc(45px * var(--scale));
    flex: 100%;
    justify-content: center;
    margin-bottom: calc(3px * var(--scale));
}

.batteryLight {
    height: calc(6px * var(--scale));
    width: calc(6px * var(--scale));
    background-color: var(--batteryLightOff);
    border-radius: 50%;
}

.batteryLightOff {
    background-color: var(--batteryLightOff);
}

.batteryLightOn {
    background-color: var(--batteryLightOn);
}

.batteryText {
    font-size: calc(10.5px * var(--scale));
    color: white;
    display: block;
}

/* ----- DISPLAY ----- */

.display {
    width: var(--lcd-width);
    height: var(--lcd-height);
    margin: auto;
    position: relative;
    overflow: hidden;
}

.displayOff {
    background-color: var(--displayOff);
}

.displayOn {
    background-color: var(--displayOn);
}

.nintendoLogoContainer {
    display: flex; 
    justify-content: center;
}

.drop {
    animation-name: nintendoLogoDrop;
    animation-duration: 3s;
    animation-fill-mode: forwards;
}

@keyframes nintendoLogoDrop {
    from {
      padding-top: 0px;
    }
    to {
      padding-top: 60px;
    }
  }

.hidden {
    display: none !important;
}

.nintendoLogo {
    width: 50%;
    height: 50%;
    
}

.screenContent {
    position: absolute;
    inset: 0;
    padding: calc(12px * var(--scale)) calc(12px * var(--scale)) calc(10px * var(--scale));
    display: flex;
    flex-direction: column;
    gap: calc(6px * var(--scale));
    color: var(--lcdText);
    font-family: 'Press Start 2P', monospace;
    font-size: calc(8px * var(--scale));
    letter-spacing: calc(0.4px * var(--scale));
    text-transform: uppercase;
}

.screenHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: calc(8px * var(--scale));
}

.screenTitle {
    display: inline-block;
}

.screenBadge {
    display: inline-block;
    padding: calc(2px * var(--scale)) calc(4px * var(--scale));
    border: calc(1px * var(--scale)) solid var(--lcdBorder);
}

.menu,
.navMenu {
    display: flex;
    flex-direction: column;
    gap: calc(4px * var(--scale));
    pointer-events: none;
}

.menuItem,
.navItem {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    gap: calc(6px * var(--scale));
    font-size: calc(8px * var(--scale));
    text-align: left;
    cursor: pointer;
}

.menuItem:focus-visible,
.navItem:focus-visible {
    outline: calc(1px * var(--scale)) dashed var(--lcdText);
    outline-offset: calc(2px * var(--scale));
}

.menuArrow {
    width: calc(10px * var(--scale));
    visibility: hidden;
}

.menuItem.is-selected .menuArrow,
.navItem.is-selected .menuArrow {
    visibility: visible;
}

.statusRow {
    min-height: calc(20px * var(--scale));
}

.statusText {
    color: var(--lcdDim);
    display: block;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.statusText.is-error {
    color: var(--lcdText);
}

.pokemonCard,
.aboutCard {
    display: grid;
    gap: calc(4px * var(--scale));
    border-top: calc(1px * var(--scale)) solid var(--lcdBorder);
    padding-top: calc(6px * var(--scale));
}

.pokemonRow {
    display: flex;
    justify-content: space-between;
    gap: calc(6px * var(--scale));
}

.rowLabel {
    color: var(--lcdDim);
}

.rowValue {
    text-align: right;
}

.screenFooter {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: calc(6px * var(--scale));
    font-size: calc(6px * var(--scale));
    color: var(--lcdDim);
}

.screenHint {
    display: inline-block;
}

.controlsContainer {
    width: calc(400px * var(--scale));
    height: calc(297px * var(--scale));
}

.nintendoGameBoy {
    max-width: calc(200px * var(--scale));
    margin-left: calc(35px * var(--scale));
    margin-top: calc(10px * var(--scale));
}


    /* ----- CONTROLS ----- */

/* ----- D PAD ----- */
.dPad {
    position: absolute;
    height: calc(106px * var(--scale));
    width: calc(106px * var(--scale));
    margin-left: calc(39px * var(--scale));
    margin-top: calc(39px * var(--scale));
}

.dPadUp {
    position: absolute;
    height: calc(35px * var(--scale));
    width: calc(26px * var(--scale));
    background-color: var(--dPad);
    margin-left: calc(40px * var(--scale));
    margin-top: calc(6px * var(--scale));
    border-radius: calc(5px * var(--scale)) calc(5px * var(--scale)) 0 0;
    display: flex;
    flex-wrap: wrap;
    align-content: space-evenly;
}

.dPadDown {
    position: absolute;
    height: calc(35px * var(--scale));
    width: calc(26px * var(--scale));
    background-color: var(--dPad);
    margin-left: calc(40px * var(--scale));
    margin-top: calc(65px * var(--scale));
    border-radius: 0 0 calc(5px * var(--scale)) calc(5px * var(--scale));
    display: flex;
    flex-wrap: wrap;
    align-content: space-evenly;
}

.dPadLeft {
    position: absolute;
    height: calc(26px * var(--scale));
    width: calc(35px * var(--scale));
    background-color: var(--dPad);
    margin-top: calc(40px * var(--scale));
    margin-left: calc(6px * var(--scale));
    border-radius: calc(5px * var(--scale)) 0 0 calc(5px * var(--scale));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.dPadRight {
    position: absolute;
    height: calc(26px * var(--scale));
    width: calc(35px * var(--scale));
    background-color: var(--dPad);
    margin-left: calc(65px * var(--scale));
    margin-top: calc(40px * var(--scale));
    border-radius: 0 calc(5px * var(--scale)) calc(5px * var(--scale)) 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.dPadCenter {
    height: calc(25px * var(--scale));
    width: calc(25px * var(--scale));
    background-color: var(--dPad);
    margin-left: calc(41px * var(--scale));
    margin-top: calc(41px * var(--scale));

}

.caretUpContainer {
    position: absolute;
    margin-left: calc(47px * var(--scale));
    margin-top: calc(-15px * var(--scale));
}

.caretDownContainer {
    position: absolute;
    margin-left: calc(47px * var(--scale));
    margin-top: calc(95px * var(--scale));
}

.caretLeftContainer {
    position: absolute;
    margin-left: calc(-5px * var(--scale));
    margin-top: calc(40px * var(--scale));
}

.caretRightContainer {
    position: absolute;
    margin-left: calc(107px * var(--scale));
    margin-top: calc(40px * var(--scale));
}

.caretUpContainer .caret,
.caretDownContainer .caret,
.caretLeftContainer .caret,
.caretRightContainer .caret {
    transform: scale(1.1);
}


/* ----- START AND SELECT ----- */

.selectStart {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100;
    justify-content: space-between;
    margin-left: calc(145px * var(--scale));
    margin-top: calc(150px * var(--scale));
    height: calc(85px * var(--scale));
    width: calc(110px * var(--scale));
    transform: rotate(-25deg);
}

.select {
    
}

.selectButton {
    flex: 50%;
    width: calc(45px * var(--scale));
    height: calc(9px * var(--scale));
    margin: 0;
    border-radius: calc(10px * var(--scale));
    background-color: var(--selectButton);
    border: calc(2px * var(--scale)) solid var(--startButtonBorder);
}

.selectText {
    font-size: calc(10px * var(--scale));
    text-align: center;
    color: var(--selectText);
    font-family: 'Syncopate', sans-serif;
    display: block;
}

.start {
    margin-top: calc(28px * var(--scale));
}

.startButton {
    flex: 50%;
    align-self: center;
    width: calc(45px * var(--scale));
    height: calc(9px * var(--scale));
    margin: 0;
    border-radius: calc(10px * var(--scale));
    background-color: var(--startButton);
    border: calc(2px * var(--scale)) solid var(--startButtonBorder);
}

.startText {
    font-size: calc(10px * var(--scale));
    text-align: center;
    color: var(--startText);
    font-family: 'Syncopate', sans-serif;
    display: block;
}

/* ----- A & B BUTTONS ----- */

.bAContainer {
    position: absolute;
    margin-left: calc(260px * var(--scale));
    margin-top: calc(57px * var(--scale));
    width: calc(115px * var(--scale));
    display: flex;
    transform: rotate(-25deg);
    flex-wrap: wrap;
    flex-direction: row;
    flex-basis: 100%;
    
}

.bAButtonContainer {
    display: flex;
    flex: 100%;
    justify-content: space-between;
    margin-bottom: calc(10px * var(--scale));
    padding: calc(5px * var(--scale));
    border: calc(1px * var(--scale)) solid var(--shade);
    border-radius: calc(50px * var(--scale));
}

.bContainer {
    display: flex;
    flex: 50%;
    justify-content: center;
}

.bButton {
    height: calc(45px * var(--scale));
    width: calc(45px * var(--scale));
    border-radius: 50%;
    background-color: var(--bButton);
}

.b {
    font-size: calc(15px * var(--scale));
    color: var(--b);
    font-family: 'Syncopate', sans-serif;
    display: block;
}

.aContainer {
    display: flex;
    flex: 50%;
    justify-content: center;
}

.aButton {
    height: calc(45px * var(--scale));
    width: calc(45px * var(--scale));
    border-radius: 50%;
    background-color: var(--aButton);
}

.a {
    font-size: calc(15px * var(--scale));
    color: var(--a);
    font-family: 'Syncopate', sans-serif;
    display: block;
}

/* ----- SPEAKER HOLE ----- */

.speakerContainer {
    position: absolute;
    margin-left: calc(259px * var(--scale));
    margin-top: calc(198px * var(--scale));
    width: calc(140px * var(--scale));
    height: calc(80px * var(--scale));
    transform: rotate(-25deg);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.line {
    height: 90%;
    width: 6%;
    border-radius: calc(5px * var(--scale));
    background-color: var(--speakerGroove);
    border: calc(1px * var(--scale)) solid var(--speakerGrooveBorder);
}

.hole {
    height: 85%;
    width:75%;
    border-radius: 5px;
    background-color: black;
}
