﻿/* Fort lounge ??wrise-order + mobile-first */
:root {
  color-scheme: dark;
  --ink: #f2f2f8;
  --muted: rgba(242, 242, 248, 0.72);
  --accent: #ff8a68;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  background: #0d0604;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#app {
  min-height: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  height: 100%;
  height: 100dvh;
  height: 100svh;
}

.play {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: 100svh;
  min-height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

.play-stage,
.play-stage-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0d0604;
}

.play-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d0604;
  display: block;
}

.play-frame.is-warming {
  opacity: 0;
  pointer-events: none;
}

.play-chip-float {
  position: fixed;
  top: calc(10px + var(--safe-top));
  right: calc(10px + var(--safe-right));
  z-index: 8;
  max-width: min(46vw, 11rem);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: max(24px, var(--safe-left)) max(24px, var(--safe-right));
  text-align: center;
}

.missing-title {
  margin: 0;
  font-size: clamp(1.15rem, 5vw, 1.35rem);
}

.missing-body {
  margin: 0;
  color: var(--muted);
}

.play-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  color: #f2f2f8;
  font-weight: 650;
  pointer-events: none;
  overflow: hidden;
  background: #0d0604;
}

.play-loading.lounge {
  pointer-events: auto;
}

.play-loading[hidden] {
  display: none;
}

.lounge-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lounge-poster,
.lounge-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.lounge-poster {
  background: center / cover no-repeat #121018;
}

.lounge-video {
  z-index: 1;
  background: transparent;
}

.lounge-video.is-failed,
.lounge-video.is-skipped {
  display: none;
}

.lounge-media-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 12, 0.28) 0%,
    rgba(8, 8, 12, 0.42) 38%,
    rgba(8, 8, 12, 0.9) 76%,
    rgba(8, 8, 12, 0.97) 100%
  );
  pointer-events: none;
}

.lounge-hud {
  position: relative;
  z-index: 3;
  width: min(92vw, 28rem);
  margin: 0 auto calc(10vh + var(--safe-bottom));
  padding: 0 max(4px, var(--safe-left)) 0 max(4px, var(--safe-right));
  text-align: center;
}

.lounge-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lounge-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 6.5vw, 2.35rem);
  line-height: 1.18;
  font-weight: 750;
  text-wrap: balance;
}

.lounge-sub {
  margin: 0 0 18px;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
  text-wrap: pretty;
}

.lounge-ready-ask {
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  color: #fff;
  margin-bottom: 20px;
}

.lounge-phase {
  animation: lounge-fade 0.4s ease;
}

.lounge-phase[hidden] {
  display: none;
}

@keyframes lounge-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lounge-progress-row {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

.lounge-start {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-height: 52px;
  min-width: min(100%, 16rem);
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7c57a, #e09540);
  color: #1a1208;
  font-size: clamp(1.02rem, 3.8vw, 1.1rem);
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lounge-start:disabled {
  opacity: 0.6;
  cursor: wait;
}

.lounge-start:active {
  transform: scale(0.98);
}

.lounge-start-hint {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.play-loading-pct {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.88rem, 3.2vw, 0.95rem);
}

.play-loading-bar {
  width: min(78vw, 16rem);
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  position: relative;
}

.play-loading-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6aa8f0, #f0b46a 55%, #ffe0a8);
  transition: none;
  will-change: width;
}

.play-loading.is-loading .play-loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 80%
  );
  background-size: 200% 100%;
  animation: lounge-shimmer 1.1s linear infinite;
  pointer-events: none;
}

@keyframes lounge-shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -80% 0;
  }
}


.play-loading[data-phase="lobby"] .lounge-video,
.play-loading[data-phase="warm"] .lounge-video,
.play-loading[data-phase="ready"] .lounge-video {
  opacity: 0.85;
}

/* Phones ??portrait */
@media (max-width: 720px) {
  .lounge-hud {
    width: min(94vw, 26rem);
    margin-bottom: calc(7.5vh + var(--safe-bottom));
  }

  .lounge-eyebrow {
    margin-bottom: 8px;
  }

  .lounge-sub {
    margin-bottom: 16px;
  }

  .lounge-start {
    min-height: 54px;
    width: min(100%, 18rem);
  }

  .play-loading-bar {
    height: 9px;
  }

  .lounge-poster,
  .lounge-video {
    object-position: center 28%;
  }
}

/* Short screens / landscape phones */
@media (max-height: 520px) {
  .lounge-hud {
    margin-bottom: calc(4vh + var(--safe-bottom));
  }

  .lounge-title {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .lounge-sub {
    margin-bottom: 10px;
    font-size: 0.9rem;
  }

  .lounge-ready-ask {
    margin-bottom: 12px;
  }

  .lounge-start {
    min-height: 44px;
  }

  .play-chip-float {
    display: none;
  }
}

/* Narrow + tall (typical mobile) ??keep HUD clear of thumbs */
@media (max-width: 480px) and (min-height: 640px) {
  .lounge-hud {
    margin-bottom: calc(11vh + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lounge-phase {
    animation: none;
  }
  .lounge-start:active {
    transform: none;
  }
}

