/* -------------------  Hauptbereich  -----------------*/

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;

    min-height: 100vh;

    background: linear-gradient(135deg, black, #075492, #117a52, #075492, black);

    padding: 16px var(--padding_calc);
    margin-top: var(--height-header);
}

canvas {
    background-color: var(--font_basic);
    box-shadow: 0px 0px 6px 6px rgba(255, 255, 255, 0.2), 0px 10px 14px 1px rgba(255, 255, 255, 0.14), 0px 4px 18px 3px rgba(0, 0, 0, 0.12);
    display: block;
}

#menu-section {
    width: 720px;
    height: 480px;
    box-shadow: 0px 0px 6px 6px rgba(255, 255, 255, 0.2), 0px 10px 14px 1px rgba(255, 255, 255, 0.14), 0px 4px 18px 3px rgba(0, 0, 0, 0.12);

    background: linear-gradient(-45deg, black, #0a528d, #0a528d, black);
    background-size: 400% 400%;
    animation: wave 15s ease infinite;
    position: relative;

    overflow: hidden;

}

@keyframes wave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


.menu-bubble {
    width: 16px;
    height: 16px;
    border-radius: 100%;
    background-color: white;
    bottom: -30px;

    position: absolute;

    opacity: 0.5;

    animation: bubble 12s ease-in-out infinite,
        sideWays 4s ease-in-out infinite alternate;

    z-index: 0;
}


@keyframes bubble {
    0% {
        transform: translateY(0%);
        opacity: 0.1;
    }

    100% {
        transform: translateY(-600px);
    }
}

@keyframes sideWays {
    0% {
        margin-left: 0px;
    }

    100% {
        margin-left: 200px;
    }
}

.bubble--1 {
    left: 80%;
    animation-delay: 0.5s;
    animation-duration: 16s;
}

.bubble--2 {
    width: 20px;
    height: 20px;
    left: 15%;
    animation-delay: 1s;
    animation-duration: 10s;
    opacity: 0.2;
}

.bubble--3 {
    width: 8px;
    height: 8px;
    left: 65%;
    animation-delay: 5s;
    animation-duration: 20s;
    opacity: 0.4;
}

.bubble--4 {
    width: 12px;
    height: 12px;
    left: 5%;
    animation-delay: 10s;
    animation-duration: 15s;
    opacity: 0.3;
}

.bubble--5 {
    width: 4px;
    height: 4px;
    left: 90%;
    animation-delay: 8s;
    animation-duration: 12s;
}

.bubble--6 {
    width: 18px;
    height: 18px;
    left: 50%;
    animation-delay: 1s;
    animation-duration: 8s;
}


#h2-title {
    color: yellow;
    font-family: 'Old Standard TT', serif;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    animation: wiggle 8s infinite alternate;
    font-size: 54px;
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(1deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#h2-htp {
    color: white;
}

#h2-fail {
    color: red;
    font-family: 'Old Standard TT', serif;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.5);
    animation: pulse 5s infinite alternate;
    font-size: 54px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

#h2-win {
    color: orange;
    font-family: 'Old Standard TT', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);    
    font-size: 54px;

    animation: bounce 2s infinite;
}

@keyframes bounce {
    0% {
        transform: scale3d(1,1,1);
    }
    30% {
        transform: scale3d(1.25,0.75,1);
    }
    40% {
        transform: scale3d(0.75,1.25,1);
    }
    50% {
        transform: scale3d(1.15,0.85,1);
    }
    65% {
        transform: scale3d(0.95,1.05,1);
    }
    75% {
        transform: scale3d(1.05,0.95,1);
    }
    100% {
        transform: scale3d(1,1,1);
    }
    
}

.win-overlay{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(125, 255, 0, 0.5),rgba(255, 255, 0,0));
    z-index: 10;
}

#menu-section p {
    background: rgba(0, 150, 50, 0.8);
    color: white;
    padding: 10px;
    border-radius: 8px;
    border: 4px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;

    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 8px;

    position: relative;
    z-index: 5;
}

#h2-fail ~ span,
#h2-win ~ span {
    color: white;
    position: relative;
    z-index: 5;
}

#menu-section button {

    background: linear-gradient(120deg, #333, #324738, #333, #555);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;

    font-family: monospace;
    text-align: center;
    margin: 10px;

    font-weight: bold;

    /* background-image: url('data:image/svg+xml, <svg width="300" height="300" viewBox="0 0 300 300" xmlns="https://www.w3.org/2000/svg"><path d="M150,150m-50,0a50,50 0 1,0 100, 0a50, 50 0 1,0 -100,0" fill="none" stroke="#999" stroke-width="10" stroke-dasharray="5,5"/></svg>'); */
    background-size: 200px 200px;
    background-position: center;

    position: relative;
    z-index: 5;
}

#menu-section button:hover {
    scale: 1.05;
    color: goldenrod;
}

#menu-section>div {
    width: 720px;
    height: 480px;

    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

#menu-section>div>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.clue-section {
    max-width: 80%;
    max-height: 50%;
    overflow-y: auto;

    position: relative;
    z-index: 5;

}

.key {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
    color: black;
    margin: 4px;

    box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 1);
}

.go-overlay{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(255, 0, 0, 0.75),rgba(255, 0, 0,0));
    z-index: 10;
}

#music-volume,
#effects-volume {
    cursor: pointer;
}

#canvas-section{
    position: relative;      
}

.cross-container {
    position: relative;
    width: 100%;
    height: 100%;
  }


#joystick-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;   
  }

  /* Buttons-Bereich */
  #controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    gap: 10px;
  }
  
  .control-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    text-align: center;
    touch-action: manipulation;
    color: black;

    display: flex;
    justify-content: center;
    align-items: center;
  } 

  /* Positionierungen relativ zum Container */
.top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}