:root {
  --rwg-orient-bg: rgba(2, 5, 14, .94);
  --rwg-orient-panel: rgba(10, 17, 37, .88);
  --rwg-orient-border: rgba(101, 231, 255, .24);
  --rwg-orient-cyan: #65e7ff;
  --rwg-orient-pink: #ff5ecf;
  --rwg-orient-yellow: #ffe66d;
  --rwg-orient-text: #f7fbff;
  --rwg-orient-muted: #9fb0c5;
}

.rwg-orientation-layer[hidden],
.rwg-countdown-layer[hidden] {
  display: none !important;
}

body.rwg-landscape-blocked {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.rwg-orientation-layer,
.rwg-countdown-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  color: var(--rwg-orient-text);
  background:
    radial-gradient(circle at 50% 18%, rgba(101, 231, 255, .15), transparent 30rem),
    radial-gradient(circle at 82% 80%, rgba(255, 94, 207, .12), transparent 24rem),
    var(--rwg-orient-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.rwg-orientation-card {
  width: min(92vw, 420px);
  padding: 26px 24px 24px;
  border: 1px solid var(--rwg-orient-border);
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(145deg, rgba(15, 27, 55, .96), var(--rwg-orient-panel));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .46), inset 0 1px rgba(255, 255, 255, .06);
}

.rwg-orientation-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 94, 207, .22);
  border-radius: 999px;
  color: #ffd2f2;
  background: rgba(255, 94, 207, .07);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .17em;
}

.rwg-orientation-brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--rwg-orient-cyan);
  box-shadow: 0 0 12px var(--rwg-orient-cyan);
}

.rwg-phone-stage {
  position: relative;
  width: 150px;
  height: 122px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
}

.rwg-phone {
  position: relative;
  width: 58px;
  height: 102px;
  border: 4px solid var(--rwg-orient-cyan);
  border-radius: 15px;
  background: linear-gradient(180deg, #101b39, #050817);
  box-shadow: 0 0 28px rgba(101, 231, 255, .34), inset 0 0 0 2px rgba(255, 255, 255, .035);
  transform: rotate(90deg) scale(.88);
  animation: rwg-phone-turn 1.65s cubic-bezier(.55, .02, .24, 1) infinite;
}

.rwg-phone::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 20px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(255, 255, 255, .32);
}

.rwg-phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--rwg-orient-pink);
  box-shadow: 0 0 10px var(--rwg-orient-pink);
}

.rwg-phone-screen {
  position: absolute;
  inset: 18px 7px 20px;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(rgba(101, 231, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 94, 207, .08) 1px, transparent 1px),
    #071027;
  background-size: 10px 10px;
}

.rwg-phone-screen::before,
.rwg-phone-screen::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.rwg-phone-screen::before {
  left: 8px;
  top: 14px;
  background: var(--rwg-orient-yellow);
  box-shadow: 12px 0 var(--rwg-orient-pink), 24px 0 var(--rwg-orient-cyan), 12px 12px var(--rwg-orient-cyan);
}

.rwg-phone-screen::after {
  right: 8px;
  bottom: 12px;
  background: var(--rwg-orient-pink);
  box-shadow: 0 0 10px rgba(255, 94, 207, .65);
}

.rwg-turn-arrow {
  position: absolute;
  right: 6px;
  top: 25px;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 230, 109, .66);
  border-left-color: transparent;
  border-radius: 50%;
  color: var(--rwg-orient-yellow);
  animation: rwg-arrow-pulse 1.65s ease-in-out infinite;
}

.rwg-turn-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(12deg);
}

.rwg-orientation-card h2 {
  margin: 4px 0 9px;
  font: 900 clamp(24px, 8vw, 36px)/.98 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -.055em;
}

.rwg-orientation-card h2 span {
  color: var(--rwg-orient-cyan);
  text-shadow: 0 0 18px rgba(101, 231, 255, .42);
}

.rwg-orientation-card p {
  max-width: 34ch;
  margin: 0 auto;
  color: var(--rwg-orient-muted);
  font: 500 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rwg-orientation-hint {
  display: inline-flex;
  margin-top: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #d7f8ff;
  background: rgba(101, 231, 255, .075);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .09em;
}

.rwg-countdown-layer {
  background: rgba(2, 5, 14, .82);
}

.rwg-countdown-core {
  position: relative;
  width: min(72vw, 300px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.rwg-countdown-ring {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(101, 231, 255, .24);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(101, 231, 255, .13), inset 0 0 35px rgba(255, 94, 207, .08);
  animation: rwg-ring-pulse .62s ease-out infinite;
}

.rwg-countdown-value {
  position: relative;
  z-index: 2;
  min-width: 3ch;
  text-align: center;
  color: #fff;
  font: 950 clamp(72px, 27vw, 150px)/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: -.09em;
  text-shadow: 0 0 14px rgba(255, 255, 255, .58), 0 0 38px rgba(101, 231, 255, .52), 0 0 70px rgba(255, 94, 207, .28);
  animation: rwg-count-forward .62s cubic-bezier(.18, .76, .25, 1) both;
}

.rwg-countdown-value.rwg-go {
  min-width: auto;
  color: var(--rwg-orient-yellow);
  font-size: clamp(56px, 20vw, 118px);
  letter-spacing: -.07em;
  text-shadow: 0 0 18px rgba(255, 230, 109, .8), 0 0 48px rgba(255, 94, 207, .38);
}

@keyframes rwg-phone-turn {
  0%, 20% { transform: rotate(90deg) scale(.86); }
  58%, 88% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(90deg) scale(.86); }
}

@keyframes rwg-arrow-pulse {
  0%, 20% { opacity: .3; transform: rotate(-35deg) scale(.86); }
  58%, 88% { opacity: 1; transform: rotate(12deg) scale(1.05); }
  100% { opacity: .3; transform: rotate(-35deg) scale(.86); }
}

@keyframes rwg-count-forward {
  0% { opacity: 0; transform: scale(.45); filter: blur(9px); }
  24% { opacity: 1; transform: scale(.86); filter: blur(0); }
  62% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.72); filter: blur(7px); }
}

@keyframes rwg-ring-pulse {
  0% { opacity: .25; transform: scale(.82); }
  55% { opacity: .75; }
  100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .rwg-phone,
  .rwg-turn-arrow,
  .rwg-countdown-ring,
  .rwg-countdown-value {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
