@font-face {
    font-family: Emulogic;
    src: url(fonts/Emulogic-zrEw.ttf);
}

/* colors:
yellow - #FCCF00
orange - #EF8200
red - #E50013
*/

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    color: #fff;
    background-color: #000;
    height: 100vh;
}

header {
    text-align: center;
    padding: 10px 0;
}

header h1 {
    color: #FCCF00;
    font-family: Emulogic, 'Arial', sans-serif;
    font-size: 2.5rem;
    display: inline-block;
}

header p {
    font-family: Emulogic, 'Arial', sans-serif;
}

#scared, #info {
    font-family: Emulogic, 'Arial', sans-serif;
    text-align: center;
    padding: 10px 0;
}

#outer {
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    background-color: #000000;
    border: 10px solid #000099;
    border-radius: 1rem;
    width: 810px;
    height: 270px;
    image-rendering: pixelated;
}

.scared-time-control {
    text-align: center;
    padding: 10px 0;
    font-family: Emulogic, 'Arial', sans-serif;
    color: #FCCF00;
}

.scared-time-control input[type="number"] {
    font-family: Emulogic, 'Arial', sans-serif;
    font-size: 1.2rem;
    border: 3px solid #EF8200;
    border-radius: 0.3em;
    background: #000;
    color: #FCCF00;
    text-align: center;
    padding: 0.2rem 0 0.2rem 0.5rem;
}

.fruits-container {
    width: 100vw;
    overflow: hidden;
}

.fruits-scroll.left {
    font-size: 2rem;
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 20s linear infinite;
    padding-left: 1em;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

.fruits-scroll.right {
    font-size: 2rem;
    display: inline-block;
    white-space: nowrap;
    animation: scroll-right 20s linear infinite;
    padding-left: 1em;
}

@keyframes scroll-right {
    0% {
        transform: translateX(-100vw);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 600px) {
    /* Mobile styles */
    header h1 {
        font-size: 1.5rem;
    }

    header p,
    #scared,
    #info {
        font-size: 0.9rem;
        padding: 8px 0;
    }

    canvas {
        width: 98vw;
        height: auto;
        border-width: 5px;
    }

    .fruits-scroll.left,
    .fruits-scroll.right {
        font-size: 1.2rem;
        padding-left: 0.3em;
    }
}

.touch-controls {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    gap: 8px;
}

.touch-controls button {
    font-size: 2rem;
    background: #FCCF00;
    color: #E50013;
    border: 2px solid #EF8200;
    border-radius: 0.5em;
    width: 3em;
    height: 3em;
    margin: 0 4px;
    font-family: Emulogic, 'Arial', sans-serif;
    cursor: pointer;
}

@media (max-width: 900px) {
    .touch-controls {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .touch-controls>div {
        display: flex;
        justify-content: center;
        gap: 8px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    /* Tablet styles */
    header h1 {
        font-size: 2.2rem;
    }

    header p,
    #scared,
    #info {
        font-size: 1.2rem;
        padding: 12px 0;
    }

    canvas {
        width: 95vw;
        height: auto;
        border-width: 8px;
    }

    .fruits-scroll.left,
    .fruits-scroll.right {
        font-size: 1.6rem;
        padding-left: 0.6em;
    }
}