html,
body {
    background-image: url('https://www.freevector.com/uploads/vector/preview/70312/FreeVectorCowboy_Background_in_the_Desert_WW0422_generated.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: 'VT323', monospace;
    overflow: hidden;
}

.d-none {
    display: none !important;
}

#start-screen {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    height: 480px;
    width: 720px;
    position: absolute;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}

#start-screen img {
    height: 480px;
    width: 720px;
    object-fit: fill;
}

#restart-btn {
    z-index: 8;
}

.btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 17px;
    margin-bottom: -20px;
    position: absolute;
    z-index: 8;
}

.buttons {
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.4));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
    width: 45px;
    background-color: rgb(244, 171, 62);
    padding: 8px;
    cursor: pointer;
    border: 2px solid white;
    z-index: 8;
}

.buttons img {
    height: 20px !important;
    width: 20px !important;
    object-fit: contain;
    cursor: pointer;
}

.buttons:hover {
    border: 2px solid rgb(244, 171, 62);
    background-color: white;
}

.main-container {
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

#canvas-container {
    height: 480px;
    width: 720px;
    position: relative;
}

canvas {
    background-color: black;
    display: block;
    overflow: hidden;
    position: relative;
    width: 720px;
    height: 480px;
}

h1 {
    font-size: 64px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin: 0;
    padding: 10px 20px;
    background: linear-gradient(to right, #b38f01, #ff3300);
    -webkit-background-clip: text;
    color: transparent;
    border: 3px solid #ff3300;
    border-radius: 15px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0px 4px 8px rgba(255, 51, 0, 0.4);
}

h2 {
    text-align: center;
    text-decoration: underline;
}

p {
    text-align: center;
}

.sub-headline {
    font-size: 30px;
    text-decoration: underline;
    width: 100% !important;
}

.control-info {
    position: absolute;
    display: flex;
    flex-direction: column;
    background-color: rgb(255, 188, 89);
    border-radius: 10px;
    height: 340px;
    width: 450px;
    z-index: 4;
    margin-left: 135px;
    margin-top: 60px;
    border: 3px solid white;
    padding-bottom: 10px;
    opacity: 0.85;
}

.control-info div {
    display: flex;
    font-weight: bold;
    color: black;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 70%;
    margin-left: 30px;
}

.img {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

#x-mark {
    display: flex;
    position: absolute;
    width: 100%;
    justify-content: flex-end !important;
    cursor: pointer;
}

#x-mark img {
    height: 30px;
    width: 30px;
    margin-right: -5px;
    margin-top: -25px;
}

#winner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    width: 720px;
    position: absolute;
    z-index: 4;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
}

.won {
    height: 370px;
    width: 570px;
}

#winner button {
    height: 75px;
    width: 75px;
    cursor: pointer;
    padding: 15px;
    font-weight: 900;
    z-index: 10;
}

#game-over {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 480px;
    width: 720px;
}

#game-over img {
    height: 480px;
    width: 720px;
    position: absolute;
    z-index: 4;
}

#game-over button {
    height: 75px;
    width: 75px;
    cursor: pointer;
    padding: 15px;
    font-weight: 900;
}

.mobile-btn-container {
    display: none;
}

.width {
    display: flex;
    gap: 35px;
    margin-left: 50px;
    margin-right: 50px;
}

.mobile-btn-container img {
    height: 20px !important;
    width: 20px !important;
    object-fit: contain;
    cursor: pointer;
}

.mobile-btn-container img:hover {
    cursor: pointer;
    border: 2px solid rgb(244, 171, 62);
    background-color: white;
}

.rotate {
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: rgb(255, 188, 89);
    font-size: 40px;
    font-weight: bold;
    z-index: 10;
    opacity: 0.90;
    display: none;
}

.rotate-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    width: 100%;
    height: 100%;
}

.rotate img {
    height: 200px;
    width: 200px;
    object-fit: cover;
}

@media (max-height: 450px) {
    h1 {
        display: none;
    }
    #winner span {
        font-size: 60px;
    }
    #start-screen img {
        height: 420px;
    }
    .control-info {
        height: 240px;
    }
    .control-info img {
        height: 40px;
        width: 40px;
    }
    .control-info p {
        font-size: 13px;
    }
    .control-info h2 {
        margin-block-start: 0;
        margin-block-end: 0;
        font-size: 25px;
    }
    #x-mark img {
        margin-right: -15px;
        margin-top: -40px;
    }
}

@media (max-height: 400px) {
    #start-screen img {
        height: 395px;
    }
}

@media (max-height: 300px) {
    #start-screen img {
        height: 320px;
    }
}

@media screen and (orientation: portrait) {
    .rotate {
        display: flex !important;
    }
    body {
        flex-direction: column;
    }
    h1 {
        display: none;
    }
}

@media screen and (max-width: 1430px) {
    .mobile-btn-container {
        display: flex;
        width: 100%;
        justify-content: space-between;
        margin-top: -64px;
    }
}

@media only screen and (max-width: 1024px) and (orientation: landscape) {
    .mobile-btn-container {
        display: flex;
        width: 90%;
        justify-content: space-between;
        margin-top: -64px;
    }
}

@media screen and (max-width: 1300px) {
    body {
        flex-direction: row;
    }
    h1 {
        display: none;
    }
    .canvas-container {
        max-width: 90%;
        max-height: 90%;
    }
    .mobile-btn-container {
        display: flex;
        width: 98%;
        justify-content: space-between;
        margin-top: -44px;
    }

    .buttons {
        height: 36px;
        width: 34px;
    }

    .btn-container {
        width: 92%;
    }    

    #canvas {
        width: 715px;
        height: 444px;
    }
    #winner {
        height: 443px;
        width: 715px;
    }
    #start-screen img {
        height: 300px;
        width: 558px;
        margin-left: -24%;
    }
    .won {
        height: 141px;
        width: 184px;
    }
}

@media screen and (max-width: 1000px) {
    body {
        flex-direction: row;
    }
    h1 {
        display: none;
    }
    .canvas-container {
        max-width: 90%;
        max-height: 90%;
    }
    #canvas-container {
        height: 399px;
        width: 611px;
    }
    .mobile-btn-container {
        display: flex;
        width: 90%;
        justify-content: space-between;
        margin-top: -44px;
    }
    #canvas {
        height: 300px;
        width: 538px;
    }
    #winner {
        height: 298px;
        width: 536px;
    }
    #start-screen img {
        height: 300px;
        width: 558px;
        margin-left: -24%;
    }
    .won {
        height: 141px;
        width: 184px;
    }
}
