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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: zabras, sans-serif;
    font-size: 25px;
}

.overall-cont {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    background-image: url(img/5_background/main_background.png);
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.canvas-cont {
    position: relative;
    max-width: 720px;
    max-height: 480px;
    margin: 0 10px;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: black;
    border-radius: 20px;
}

.first-screen-cont {
    display: contents;
}

.first-screen {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
}

.screen-start {
    width: 100%;
    height: 100%;
}

.start-button-cont {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.start-button-img {
    display: flex;
    height: 80px;
    margin: 0;
    cursor: pointer;
}

.start-screen-navigation-container {
    position: absolute;
    top: 50%;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: auto;
    height: auto;
    transform: translateY(-50%);
    z-index: 999;
}

nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    font-weight: 100;
}

.nav-img {
    height: 30px;
    cursor: pointer;
}

.game-nav {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    z-index: 999;
}

.game-controls-instructions-container {
    position: absolute;
    top: 90px;
    right: 0;
    bottom: 90px;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 998;
}

.game-controls-instructions-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 300px;
    height: 300px;
    background-color: rgb(245, 222, 201);
    border: 2px solid black;
    border-radius: 20px;
    opacity: 0.85;
}

.controller-instruction-item {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-left: 20px;
}

.button-action {
    margin-left: 20px;
}

.controll-button-img {
    height: 50px;
}

.fullscreenClose-icon-cont {
    position: absolute;
    top: 10px;
    right: 10px;
}

.mobile-controls-container {
    position: absolute;
    bottom: 5px;
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.mobile-control-button-icon {
    width: 40px;
    height: 40px;
    margin-right: 20px;
    margin-bottom: 10px;
    margin-left: 20px;
}

.mobile-control-buttons-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.d-none {
    display: none;
}

.turn-device-cont {
    position: absolute;
    top: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.8;
    z-index: 9999;
}

.game-over-screen-cont {
    position: absolute;
    top: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.game-over-screen-cont img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.game-over-screen-cont.fullscreen-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.game-over-screen-cont.fullscreen-overlay img {
    max-height: 90vh;
    max-width: 90vw;
    width: auto;
    height: auto;
}

.game-over-screen-cont.fullscreen-overlay .game-over-buttons {
    position: absolute;
    bottom: 10%;
    display: flex;
    gap: 20px;
    z-index: 10001;
}

.game-over-buttons {
    position: absolute;
    bottom: 50px;
    display: flex;
    gap: 20px;
    z-index: 1000;
}

.game-btn {
    padding: 12px 25px;
    background-color: #b28136;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: 'zabras', sans-serif;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-btn:hover {
    background-color: #5e3b0f;
    transform: scale(1.05);
}

.controller-exp-cont {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1000;
    width: 80%;
    max-width: 400px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
}

.cont-inner-cont {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controller-dis {
    display: flex;
    align-items: center;
    gap: 15px;
}

.button-action {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.8);
}

.impressum-overlay {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2000;
}

.impressum-link {
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.impressum-link:hover {
    background-color: rgba(0, 0, 0, 0.8);
    text-decoration: underline;
}

.bottle-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
    animation: blink 1.5s infinite;
    z-index: 1001;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.key-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #ddd;
    border: 2px solid #888;
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-size: 20px;
    font-weight: bold;
}

@media only screen and (max-width: 720px) {
    canvas {
        width: 100% !important;
    }
    
    h1 {
        display: none;
    }
    
    .canvas-cont {
        max-width: 560px;
        max-height: 320px;
    }
    
    .game-nav {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
    }
}

@media only screen and (max-height: 480px) {
    canvas {
        height: 100vh !important;
    }
    
    h1 {
        display: none;
    }
    
    .canvas-cont {
        max-width: 560px;
        max-height: 400px;
    }
    
    .game-nav {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
    }
}

@media only screen and (max-width: 480px) {
    .turn-device-cont {
        display: flex;
    }
}