/* universal styling */

.app {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background-color: black;
  display: block;
}

body, html {
  margin: 0;
  overflow: hidden;
  background-color: black;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  transition: 900ms;
  cursor: url(../images/cursor.png), auto;
  -webkit-tap-highlight-color: transparent;
}

.black {
  background-color: black;
  width: 100vw;
  height: 100vh;
  z-index: 999999999;
  top: 100vh;
  opacity: 0;
  transition: opacity 300ms;
  position: absolute;
}

.black.animate {
  opacity: 1;
}

.orientation-message {
  display: none;
}

.motion-cursor,
.motion-permission {
  display: none;
}

@media only screen and (max-width: 900px) and (orientation: portrait) {
  html,
  body {
    overflow: hidden;
  }

  .app {
    min-height: 100vh;
    height: 100vh;
  }

  .motion-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 44px;
    height: 62px;
    display: block;
    z-index: 999999998;
    background-image: url(../images/cursor.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-999px, -999px, 0);
    transition: opacity 180ms ease;
    will-change: transform;
    --dwell-opacity: 0;
    --dwell-progress: 0;
  }

  .motion-cursor.visible {
    opacity: 1;
  }

  .motion-cursor.dwell-active::before {
    content: "";
    position: absolute;
    top: -16px;
    left: -14px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background:
      radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 40%, transparent 41%),
      conic-gradient(rgba(105, 215, 255, 0.9) calc(var(--dwell-progress) * 1turn), rgba(105, 215, 255, 0.14) 0);
    -webkit-mask: radial-gradient(circle, transparent 58%, black 60%);
    mask: radial-gradient(circle, transparent 58%, black 60%);
    opacity: var(--dwell-opacity);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.42);
    pointer-events: none;
  }

  .motion-permission {
    position: fixed;
    left: 50%;
    bottom: calc(154px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: block;
    z-index: 999999997;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(15, 23, 35, 0.82);
    color: white;
    font-family: 'Asap', sans-serif;
    font-size: 16px;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
  }

  .motion-permission.blocked {
    background: rgba(94, 39, 39, 0.9);
  }

  .motion-permission.hidden {
    display: none;
  }
}

@media only screen and (max-width: 900px) and (orientation: landscape) {
  html,
  body {
    overflow: hidden;
  }

  .app,
  .black,
  .motion-cursor,
  .motion-permission {
    pointer-events: none;
  }

  .orientation-message {
    position: fixed;
    inset: 0;
    z-index: 1000000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background:
      radial-gradient(circle at top, rgba(150, 210, 255, 0.2), transparent 40%),
      linear-gradient(180deg, #0f1723 0%, #05080d 100%);
    color: white;
    font-family: 'Asap', sans-serif;
    text-align: center;
  }

  .orientation-message-card {
    max-width: 320px;
    padding: 28px 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
  }

  .orientation-message-card h1 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 500;
  }

  .orientation-message-card p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
  }
}
