/* Soccer Gals web page (2026-10-22): the game's navy and gold. */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #04060e; }

/* The game always runs at 16:9, as big as the window allows, centred
   (2026-10-22: a square or very wide window bent the layouts). The rest of
   the window shows the splash art blurred and dimmed. The !important rules
   win over the 18+ page's own full-window rules in the playtest. */
body::before {
  content: ""; position: fixed; inset: -60px; z-index: 0; pointer-events: none;
  background: url("loader.jpg") center / cover no-repeat, #04060e;
  filter: blur(30px) brightness(0.32) saturate(1.2);
}
#unity-container, #unity-container.unity-desktop, #unity-container.unity-mobile {
  position: fixed !important; z-index: 1;
  left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: min(100vw, calc(100vh * 16 / 9)) !important;
  height: min(100vh, calc(100vw * 9 / 16)) !important;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
}
@supports (height: 100dvh) {
  #unity-container, #unity-container.unity-desktop, #unity-container.unity-mobile {
    width: min(100vw, calc(100dvh * 16 / 9)) !important;
    height: min(100dvh, calc(100vw * 9 / 16)) !important;
  }
}
#unity-canvas { display: block; width: 100% !important; height: 100% !important; background: #070b18; outline: none; }
#unity-footer { display: none; }

/* the splash art (loader.jpg, the user's SplashScreen.jpg) fills the page;
   the title and the bar sit at the bottom on a dark fade */
#sg-loader {
  position: absolute; inset: 0; z-index: 5; display: none; align-items: flex-end; justify-content: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 58%, rgba(4, 6, 14, 0.82) 82%, rgba(4, 6, 14, 0.95) 100%),
    url("loader.jpg") center / cover no-repeat,
    #000;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; color: #e8ebf5;
  transition: opacity 0.5s ease;
}
#sg-loader.sg-done { opacity: 0; pointer-events: none; }
#sg-loader .sg-center { width: min(560px, 82vw); margin-bottom: max(18px, 4.5vh); text-align: center; }
#sg-loader .sg-title {
  font-size: clamp(28px, 4.6vw, 52px); font-weight: 800; letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff1c4 0%, #f2c66d 45%, #c4903a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(36, 22, 3, 0.85)) drop-shadow(0 0 18px rgba(242, 198, 109, 0.35));
}
#sg-loader .sg-tag { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.34em; color: #9aa6d1; }
#sg-loader .sg-bar {
  position: relative; height: 22px; border-radius: 999px; overflow: hidden;
  border: 2px solid #c9a24f; background: linear-gradient(180deg, #0a0f24 0%, #18204a 100%);
  box-shadow: 0 0 0 3px rgba(7, 11, 24, 0.8), 0 0 22px rgba(201, 162, 79, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
#sg-loader .sg-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 2%; border-radius: 999px;
  background: linear-gradient(180deg, #ffe39a 0%, #f2c66d 40%, #c4903a 100%);
  box-shadow: 0 0 14px rgba(255, 214, 120, 0.7);
  transition: width 0.25s ease-out;
}
#sg-loader .sg-shine {
  position: absolute; left: 6px; right: 6px; top: 3px; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.22); pointer-events: none;
}
#sg-loader .sg-status {
  display: flex; justify-content: space-between; margin-top: 10px; padding: 0 6px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.08em; color: #c9cee3;
}
#sg-loader #sg-percent { color: #f2c66d; }

/* the game is landscape only: an upright phone gets a "turn sideways" card */
#sg-rotate {
  display: none; position: fixed; inset: 0; z-index: 20; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #1d2547 0%, #070b18 75%);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; color: #f2c66d; text-align: center;
}
#sg-rotate p { margin: 26px 24px 0; font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
#sg-rotate .sg-phone {
  width: 54px; height: 92px; border: 4px solid #c9a24f; border-radius: 12px; box-sizing: border-box;
  animation: sg-turn 2.2s ease-in-out infinite;
}
@keyframes sg-turn { 0%, 25% { transform: rotate(0deg); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (orientation: portrait) and (max-width: 900px) {
  #unity-container.unity-mobile ~ #sg-rotate { display: flex; }
}

#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); z-index: 30; display: none; }
#unity-warning .sg-banner {
  padding: 10px 16px; margin-bottom: 6px; border-radius: 10px; border: 2px solid #c9a24f;
  background: rgba(10, 14, 32, 0.95); color: #e8ebf5; font: 15px "Trebuchet MS", system-ui, sans-serif;
}
#unity-warning .sg-error { border-color: #d0485f; background: rgba(60, 10, 22, 0.95); }
