body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 0.35rem solid white; /* 5px */
    box-sizing: border-box;
    touch-action: manipulation; /* Disables pinch-zoom and double-tap zoom */
    -ms-touch-action: manipulation; /* IE */
}

header {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    align-items: center;
    background-color: white;
    z-index: 5;
    font-family: Arial, sans-serif;
    border-bottom: 0.0625rem solid black; /* 1px */
}

header h1 {
    font-size: 2.5rem; /* 36px */
    font-weight: bold;
    color: black;
}

#container {
    width: calc(100% - 0.625rem); /* 10px */
    height: calc(100% - 0.625rem); /* 10px */
    border: 0.0625rem solid black; /* 1px */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative; /* Ensure positioning context for the canvas */
}

canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
}


.mobile-controls {
    position: absolute;
    bottom: 1rem; /* 25px */
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem; /* 25px */
    box-sizing: border-box;
    display: none; /* Hidden by default */
}

.mobile-controls button {
    width: 3.3rem; /* 60px */
    height: 3.3rem; /* 60px */
    border: none;
    background-color: transparent;
    font-size: 0.75rem; /* 12px */
    font-variant: small-caps;
    font-weight: bold;
    opacity: 1;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.controls {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.controls button {
    margin-top: 0.35rem; /* 15px */
}

@media (pointer: course) { 
    .mobile-controls {
        display: flex; /* Show on mobile devices */
    }
}

#menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

#menu-button {
    width: 3.5rem; /* 60px */
    height: 3.5rem; /* 60px */
    left: -1.875rem; /* 30px */
    top: -1.875rem; /* 30px */
    padding: 0;
    border-radius: 50%;
    border-width: 0.1rem; /* 1px */
    border-color: black;
    background-color: white;
    color: black;
    font-size: 1.5rem; /* 12px */
    font-variant: small-caps;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 1s;
    position: absolute;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

#menu-button.active {
    z-index: 3; /* Increase z-index when active */
    position: absolute;
    opacity: 0.2;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

#menu-icons {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10rem; /* 200px */
    height: 10rem; /* 200px */
    border-radius: 50%;
}

.menu-icon {
    width: 3.75rem; /* 60px */
    height: 3.75rem; /* 60px */
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    box-shadow: 0 0 0.3rem transparent; /* 5px */
    transition: box-shadow 0.3s;
    border: 0.0625rem #E8D851;
}

.menu-icon:hover {
    box-shadow: 0 0 0.3rem #E8D851; /* 5px */
    background-color: #E8D851;
}

img {
    max-width: 3.3rem; /* 60px */
    max-height: 3.3rem;
    pointer-events: none; /* Disable all pointer events */
    -webkit-user-drag: none; /* Prevent dragging on iOS Safari */
}

.menu-img {
    opacity: 0.7;
}

.menu-text {
    position:absolute;
    top: 3.5rem;
    font-family: Arial, sans-serif;
    font-size: 0.6rem; /* 12px */
    font-variant: small-caps;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    color: black;
    padding: 5px;
    padding-right: 7px;
    padding-left: 7px;
    border-radius: 10px;
    white-space: nowrap;
    background-color: white;
    
    display: none;
}

#menu-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);  /* semi-transparent grey */
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    z-index: 3;
}

#menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


*, *:focus, *:hover {
    outline: none;
}

* {
    -webkit-user-select: none; /* Disable selection in Safari */
    -ms-user-select: none; /* Disable selection in IE10/11 */
    user-select: none; /* Disable selection in other browsers */
    -webkit-tap-highlight-color: transparent; /* Disable tap highlighting on iOS */
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9000;
  pointer-events: none; /* clicks pass through when fading */
  transition: opacity 1s ease; /* smooth fade */
}

#loading-text {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Arial, sans-serif;
  font-size: 0.8rem; /* 12px */
font-variant: small-caps;
font-weight: bold;
color: black;
}

.explosion {
  position: absolute;
  pointer-events: none;
  /* No fixed width, use natural GIF size */
  transform-origin: center center; /* ensures scaling from center */
  z-index: 9999
}

body.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5px, 5px); }
  50% { transform: translate(5px, -5px); }
  75% { transform: translate(-5px, -5px); }
  100% { transform: translate(0, 0); }
}




#merch { transform: translate(3rem, -3rem); } /* 115px */
#music { transform: translate(3rem, 9rem); } /* 115px */
#art { transform: translate(-2.5rem, 0rem); } /* 345px */
#contact { transform: translate(-2.5rem, 6rem); } /* 345px */
#instagram { transform: translate(8.5rem, 0rem); } /* 270px, 45px */
#blank1 { transform: translate(8.5rem, 6rem); } /* 270px */
