:root {
    --case-color: #d1cbcb;
    --screen-border-color: #5b585f;
    --display-color: #81c012;
    --display-black: #307218;
    --accent-color: #920740;
    --accent-blue: #20288c;
    --button-dark: #333333;
    --border-radius: 15px 15px 75px 15px;
    --border-radius-screen: 10px 10px 10px 10px;
    --dpad: #222224;
    --shadow: rgba(0, 0, 0, 0.5)
}

@font-face {
    font-family: 'ByteBounce';
    src: url('../assets/fonts/ByteBounce.ttf') format('truetype');
}

* {
    font-family: Consolas;
}

body {
    background: rgb(55, 55, 55);
    padding: 10px;
    overflow: hidden;
}

.wrapper {
    display: flex;
    box-sizing: border-box;
    height: calc(95vh);
    margin: auto;
    max-width: 700px;
}

#gameBoy {
    aspect-ratio: 9 / 15;
    background: var(--case-color);
    background: linear-gradient(150deg, var(--case-color), var(--case-color) 85%, #7c7c7c 100%);
    border-radius: var(--border-radius);
    border: 2px solid black;
    box-shadow: 5px 5px 5px black, 0px 0px 500px black, 2px 2px 4px rgba(255, 255, 255, 0.5) inset, -2px -2px 4px rgba(0, 0, 0, 0.3) inset;
    display: flex;
    flex-direction: column;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 537px;
}

/* on off */
#gameBoy > span {
    color: var(--screen-border-color);
    font-size: clamp(0.6rem, 2vw, 0.8rem);
    left: 10px;
    position: absolute;
    top: 10px;
}

/*
#gameBoy > span::after {
    content: ' ';
    background-color: red;
    position: absolute;
    top: -20px;
    width: 20px;
    height: 20px;
}*/

#screenBorder {
    aspect-ratio: 10/9.4;
    background: var(--screen-border-color);
    border-radius: 15px 15px 15px 15px;
    color: var(--case-color);
    margin: 6% auto 0 auto;
    width: 88%;
    border: 3px solid var(--shadow);
}

/* DOT MATRIX Schriftzug */
.flex-box {
    align-items: center;
    display: flex;
    padding-top: 10px;
}

.left {
    flex: 2;
}

.right {
    flex: 1;
}

.text {
    font-size: clamp(0.6rem, 2vw, 0.8rem);
    margin: 0 10px;
    text-align: center;
}

.inner {
    border-bottom: 3px solid var(--accent-blue);
    border-top: 3px solid var(--accent-color);
    height: 6px;
    margin: 2px 25px 2px 25px;
}

#display {
    aspect-ratio: 10/9;
    background: var(--display-color);
    margin: 0px auto 0 auto;
    overflow: hidden;
    width: 88%;
    border: 3px solid rgba(0, 0, 0, 0.6);
    box-shadow: inset 5px 5px 15px var(--shadow), inset -5px -5px 15px var(--shadow);
    padding: 0;
    /*overflow-y: scroll;*/
    scrollbar-color: var(--display-black) transparent;
    scrollbar-width: thin;
}

#display > span {
    display: block;
    font-family: ByteBounce;
    font-size: clamp(0.8rem, 3vw, 1.5rem);
    color: var(--display-black);
    padding: 0 20px 0 20px;


}

#display > span > p{
    font-family: ByteBounce;

}

#display > span:first-child {
    padding: 20px 20px 0px 20px;
}

#logo {
    color: var(--accent-blue);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: bolder;
    margin: 5px auto;
    text-align: left;
    width: 88%;
}

#controls {
    box-sizing: border-box;
    display: grid;
    flex-grow: 1;
    gap: 2%;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    margin-top: 2%;
    padding: 12% 5%;
    width: 100%;
}

.control-item {
    height: 100%;
    width: 100%;
}

/* D-pad positioning and styling */
#dpad {
    grid-column: 1;
    grid-row: 1;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    top: -30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dpad::before, #dpad::after {
    background: var(--dpad);
    border-radius: 5px;
    content: "";
    position: absolute;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
}

#dpad::before {
    height: 30%;
    left: 10%;
    top: 35%;
    width: 80%;
}

#dpad::after {
    height: 80%;
    left: 35%;
    top: 10%;
    width: 30%;
}

#dpad-circle {
    width: 80px;
    height: 48px;
    border-radius: 35%;
    background-color: var(--dpad);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    box-shadow: 0 0 5px var(--dpad);
}


#dpad-circle::before {
    width: 50px;
    height: 50px;
    background-color: var(--dpad);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    content: "";
}

#dpad-circle::after {
    width: 50px;
    height: 50px;
    background-color: var(--dpad);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    content: "";
    box-shadow: inset 0px 0px 20px rgba(0, 0, 0, 0.6), inset 3px 3px 5px rgba(0, 0, 0, 0.4), inset -3px -3px 5px rgba(255, 255, 255, 0.2);
}

/* A and B buttons */
#buttons {
    align-items: center;
    background: #b5adad;
    border-radius: 50px;
    display: flex;
    grid-column: 3;
    grid-row: 1;
    height: 50%;
    justify-content: center;
    margin-left: -20%;
    transform: rotate(-30deg);
    box-shadow: inset 0px 5px 3px rgba(0, 0, 0, 0.1), inset -3px -3px 5px rgba(255, 255, 255, 0.5);
}

button {
    background: var(--accent-color);
    border-radius: 50%;
    border: none;
    color: var(--accent-blue);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bolder;
    height: 0;
    line-height: 920%;
    margin: 0 5%;
    padding-bottom: 40%;
    position: relative;
    width: 40%;
    box-shadow: inset 0px 5px 5px rgba(255, 255, 255, 0.5), inset 0px -5px 5px rgba(0, 0, 0, 0.5);;
}

button:hover {
    box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.5);;
}


button::after {
    content: attr(textContent);
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Start and Select buttons */
#start-select {
    display: flex;
    flex-direction: row;
    grid-column: 2;
    grid-row: 2;
    justify-content: space-evenly;
    margin-top: 0;
    transform: rotate(-30deg);

}

.system-button {
    background-color: var(--button-dark);
    border-radius: 15px;
    height: 15px;
    margin-bottom: 12px;
    position: relative;
    width: 60px;
    box-shadow: 2px 2px 3px rgba(255, 255, 255, 0.5) inset, 0px 1px 0px rgba(255, 255, 255, 0.8) inset, -4px -4px 3px black inset, -2px -2px 0px black inset;
}

.system-button::after {
    bottom: -25px;
    color: var(--accent-blue);
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: bold;
    left: 50%;
    position: absolute;
    text-transform: uppercase;
    transform: translateX(-50%);
    white-space: nowrap;
}

#select-button {
    margin-bottom: 30px;

}

#select-button::after {
    content: "select";
}

#start-button {
    top: 35px;
}

#start-button::after {
    content: "start";
}

/* Speaker grill */
#speakergrill {
    background: repeating-linear-gradient(
            90deg,
            var(--screen-border-color),
            var(--screen-border-color) 8px,
            rgba(0, 0, 0, 0) 8px,
            rgba(0, 0, 0, 0) 36px
    );
    grid-column: 3 / 4;
    grid-row: 2/3;
    height: 40%;
    margin-left: 0;
    margin-top: 30%;
    transform: rotate(-30deg);
}

/* blinking cursor */
.cursor {
    display: inline-block;
    font-family: ByteBounce;
    color: var(--display-black);
    background-color: transparent;
    animation: blink 1s steps(2, start) infinite;
}

img {
    width: 100%;
    margin-top: 26px;
}
/* RENAMED TO ICON*/
.icon {
    opacity: 1;
    scale: 1;
    animation-name: fade-in;
    animation-duration: 4s;
    margin-top: -25px;
}

h1 {
    text-align: center;
    font-family: ByteBounce;
    /*! top: 4%; */ /* 4 */
    /*! position: absolute; */
    /*! margin-left: calc(50% - 160px); */
    /*! width: 160px; */
    animation: 4s fade-in, 4.1s spin ease-out;


    margin: 0;
    padding: 0;
}


/*iphone portrait*/
@media (max-width: 394px) {
    #dpad-circle {
        width: 30px;
        height: 20px;
    }

    #dpad-circle::before {
        width: 20px;
        height: 20px;
    }

    #dpad-circle::after {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 500px) {
    #controls {
        gap: 1%;
    }

    button {
        padding-bottom: 35%;
        width: 35%;
    }


    #dpad-circle {
        width: 60px;
        height: 30px;
    }

    #dpad-circle::before {
        width: 30px;
        height: 30px;
    }

    #dpad-circle::after {
        width: 30px;
        height: 30px;
    }

    .text {
        margin: 0;
    }

    .inner {
        margin: 0px 5px 5px 5px;
    }

}

/* Mobile adjustments */
@media (max-width: 925px) {
    .wrapper {
        height: auto;
        min-height: 95vh;
    }

    #gameBoy {
        height: auto;
    }

    #display {
        margin-top: 0px;
        padding: 0;
    }
    #skills {
        margin-top: 0;
    }
}

@media (min-width: 525px) {
    #screenBorder {
        aspect-ratio: 10/9;
    }
}

@media (min-width: 1710px) {
    #gameBoy {

    }
}

/* KEFRAMES */
@keyframes fade-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0%);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotatey(0deg);
    }

    to {
        transform: rotatey(1080deg);
    }
}

/* Cursors */
@keyframes blink {
    to {
        visibility: hidden;
    }
}