:root {
  /* Overlay appearance */
  --overlay-bg-color: black;
  --overlay-text-color: white;

  /* Image dimensions */
  --overlay-image-width: 160px;
  --overlay-image-height: 160px;

  /* Text styles */
  --overlay-font-family: system-ui, -apple-system, sans-serif;
  --overlay-font-size: 1.2rem;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--overlay-bg-color);
}

.orientation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  min-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  width: -webkit-fill-available;
  width: stretch;
  height: -webkit-fill-available;
  height: stretch;
  background-color: var(--overlay-bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Remove transition for immediate visibility */
  display: none;
  z-index: 2147483647;
  overscroll-behavior: contain;
  user-select: none;
}

.orientation-overlay.visible {
  display: flex;
}

.overlay-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: max(env(safe-area-inset-top), 20px) max(env(safe-area-inset-right), 20px) max(env(safe-area-inset-bottom), 20px) max(env(safe-area-inset-left), 20px);
  box-sizing: border-box;
}

.orientation-overlay img {
  width: var(--overlay-image-width);
  height: var(--overlay-image-height);
  margin-bottom: 20px;
  -webkit-user-drag: none;
  user-drag: none;
  opacity: 0;
}

.orientation-overlay p {
  color: var(--overlay-text-color);
  font-family: var(--overlay-font-family);
  font-size: var(--overlay-font-size);
  text-align: center;
  margin: 0;
  padding: 0 20px;
  opacity: 0;
}

/* Simple fade in animation */
.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body.overlay-visible {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}