body {
  touch-action: pan-x, pan-y;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  background-color: #000;
  overflow: auto;
}

.soundboard {
  display: flex;
  flex-wrap: wrap; /* Allows buttons to wrap to the next row */
  gap: 16px; /* Space between buttons */
  justify-content: center; /* Centers the buttons horizontally */
}

button {
  touch-action: manipulation;
  padding: 20px;
  border: none;
  border-radius: 16px;
  background-color: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background-size: cover;
  width: calc(50vw - 40px); /* 50% of viewport width minus the gap */
  max-width: 250px; /* Ensure it doesn't exceed 250px */
  padding: 0;
  box-sizing: border-box; /* Includes padding and border in the width calculation */
  opacity: 0.1;
  transition: opacity 0.3s;
  pointer-events: none;
}

@media (orientation: landscape) {
    .soundboard {
        padding: 16px 0px;
    }

    button {
        width: calc(23vw - 16px); /* Tre knapper på en række */
    }
}

button.ready {
  opacity: 1;
  pointer-events: auto;
}

.button-overlay {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 120px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}

.button-overlay.visible {
  opacity: 1;
}

.stop-icon {
    display: inline-block;
    width: 50%;
    height: 50%;
    background-color: white;
transition: width 2.5s, height 2.5s; /* Transition for shrinking effect */
}

.button-overlay.shrink .stop-icon {
    width: 0px;
    height: 0px;
}

   .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            font-size: 24px;
            z-index: 1000;
        }

        .spinner {
            display: flex;
            gap: 5px;
        }

        .spinner div {
            width: 10px;
            height: 10px;
            background-color: white;
            border-radius: 50%;
            animation: bounce 1.5s infinite ease-in-out;
        }

        .spinner div:nth-child(1) {
            animation-delay: -0.3s;
        }

        .spinner div:nth-child(2) {
            animation-delay: -0.15s;
        }

        @keyframes bounce {
            0%, 80%, 100% {
                transform: scale(0);
            }
            40% {
                transform: scale(1);
            }
        }


 .sticky-console {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50vh;
            background-color: rgba(0, 50, 0, 0.8);
            color: white;
            overflow-y: auto;
            padding: 10px;
            box-sizing: border-box;
            font-size: 10px;
	    font-family: monospace;
        }
.hidden { display: none; }


        .footer-navbar {
            position: fixed;
            bottom: 0;
            width: 100%;
            display: flex;
            padding: 10px;
            margin-left: 30px;
	    gap: 10px;
        }

        .navbutton {
            color: white;
            text-decoration: none;
            font-size: 500%;
        }
