body {
  background-color: #FFF2EB;
  margin: 0;
  overflow: hidden;
}

* {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-style: normal;
  color: white;
}

h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
h4 { font-size: 15px; font-weight: 500; }
h5 { font-size: 13px; font-weight: 500; }
p  { font-size: 14px; font-weight: 400; line-height: 1.65; }

a {
  text-decoration: none;
  color: white;
}
#webgl {
  pointer-events: none;
}
#css {
  cursor: pointer;
}

#ui-interactive {
  position: absolute;
  top: 0;
  left: 0;
  width: 650px;
}

.jitter {
  animation-duration: 0.3s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: jittery;
  z-index: -10;
}

.icon-control-container {
  height: 26.5px;
  width: 26.5px;
}

.interface-wrapper {
  width: 100%;
  top: 32px;
  left: 32px;
}

@keyframes jittery {
  10% {
    transform: translate(-0.1px, -0.15px) scale(1, 1);
  }

  20% {
    transform: translate(0.15px, 0.1px) scale(1, 1);
  }

  30% {
    transform: translate(-0.2px, -0.25px) scale(1, 1);
  }

  40% {
    transform: translate(0.05px, 0.1px) scale(1, 1);
  }

  50% {
    transform: translate(-0.025px, -0.05px) scale(1, 1);
  }

  60% {
    transform: translate(0px, 0.075px) scale(1, 1);
  }

  70% {
    transform: translate(-0.075px, -0.1px) scale(1, 1);
  }

  80% {
    transform: translate(0.075px, 0.125px) scale(1, 1);
  }

  90% {
    transform: translate(-0.125px, -0.075px) scale(1, 1);
  }

  100% {
    transform: translate(0.075px, 0.025px) scale(1, 1);
  }
}

/* ===== ROTATE DEVICE OVERLAY (shown in portrait on mobile) ===== */
#rotate-device-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center;
  padding: 32px;
  box-sizing: border-box;
}

#rotate-device-overlay .rotate-icon {
  width: 64px;
  height: 64px;
  animation: rotate-phone 2s ease-in-out infinite;
}

#rotate-device-overlay .rotate-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#rotate-device-overlay .rotate-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  max-width: 280px;
  line-height: 1.5;
}

@keyframes rotate-phone {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(90deg); }
  50%, 75% { transform: rotate(90deg); }
}

/* Show rotate overlay on mobile in portrait mode */
@media screen and (max-width: 900px) and (orientation: portrait) {
  #rotate-device-overlay {
    display: flex !important;
  }
}

/* ===== MOBILE RESPONSIVE ADJUSTMENTS (landscape) ===== */
@media screen and (max-width: 900px) and (orientation: landscape),
       screen and (max-height: 500px) {
  h1 { font-size: 20px; }
  h2 { font-size: 16px; }
  h3 { font-size: 14px; }
  h4 { font-size: 12px; }
  h5 { font-size: 11px; }
  p  { font-size: 12px; }

  #ui-interactive {
    width: 100%;
  }

  .icon-control-container {
    height: 22px;
    width: 22px;
  }

  .interface-wrapper {
    top: 12px;
    left: 12px;
  }
}
