/* Doge Arena web page. Colours are DogeTokens.uss values (docs/reference/ui-design-system.md):
   ink #0A0A09, base #0F0F0E, raised #161615 (the darker grounds, 2026-11-04), cream #F4EDDC, arena yellow #FDCA18,
   danger fill #C22C40. */

/* Rajdhani 600 and 700, served from this site (F136; no third-party font request). Latin and
   Latin Extended subsets of Assets/_Game/UI/Fonts/Rajdhani-*.ttf, made with fontTools
   (pyftsubset); licence beside them, fonts/Rajdhani-OFL.txt. The family name is "Rajdhani"
   because the sign-in bridge's modal asks for it by that name ("700 15px Rajdhani"). */
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Rajdhani-SemiBold-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Rajdhani-Bold-latin.woff2") format("woff2");
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0F0F0E;
  /* No rubber-band, pull-to-refresh or swipe navigation under a thumb (touch controls). */
  overscroll-behavior: none;
}

/* The game: the whole window, edge to edge. */
#unity-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* The visible height on a phone, whose browser toolbars 100vh ignores; the same as 100vh on a desktop. */
  height: 100dvh;
  display: block;
  background: #0F0F0E;
  outline: none;
  /* Every touch on the game is the game's: no pan, no pinch, no double-tap zoom. */
  touch-action: none;
}

/* "Turn your phone": a touch screen held upright gets this card over everything, loader and game
   alike, until it is turned. CSS only, so no script path can miss it: iOS Safari never lets a page
   lock the orientation (Android Chrome can, but only once in full screen; see index.html). A
   mouse-driven desktop never matches. */
#doge-rotate {
  display: none;
}
@media (pointer: coarse) and (orientation: portrait) {
  #doge-rotate {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 0 16px;
    background: radial-gradient(ellipse at center, #0F0F0E 0%, #0A0A09 70%);
    text-align: center;
    z-index: 30;
  }
}
#doge-rotate-logo {
  width: min(320px, 70vw);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
/* A phone outline that tips over to landscape, on a loop. */
#doge-rotate-phone {
  width: 44px;
  height: 76px;
  border: 4px solid #F4EDDC;
  border-radius: 9px;
  box-sizing: border-box;
  position: relative;
  animation: doge-rotate-tip 2.4s ease-in-out infinite;
}
#doge-rotate-phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 12px;
  height: 3px;
  margin-left: -6px;
  border-radius: 2px;
  background: #FDCA18;
}
@keyframes doge-rotate-tip {
  0%, 20% { transform: rotate(0deg); }
  50%, 80% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
#doge-rotate-title {
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.14em;
  color: #FDCA18;
}
#doge-rotate-label {
  margin-top: -20px;
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #F4EDDC;
}
/* iOS Safari in a tab only (index.html sets the class): an iPhone has no full-screen API for a
   page, so the home-screen web app is the way to lose the browser bars. */
#doge-rotate-tip {
  display: none;
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #F4EDDC;
  opacity: 0.6;
}
.doge-ios-tab #doge-rotate-tip {
  display: block;
}

/* Loading screen. */
#doge-loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(ellipse at center, #0F0F0E 0%, #0A0A09 70%);
  transition: opacity 0.35s ease-out;
  z-index: 10;
}
#doge-loader.doge-loader-done {
  opacity: 0;
  pointer-events: none;
}
#doge-loader-logo {
  width: min(520px, 70vw);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
#doge-loader-bar {
  width: min(420px, 60vw);
  height: 14px;
  background: #161615;
  transform: skewX(-20deg);
  overflow: hidden;
}
#doge-loader-fill {
  width: 0%;
  height: 100%;
  background: #FDCA18;
  transition: width 0.2s linear;
}
#doge-loader-label {
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #F4EDDC;
}

/* Unity's showBanner messages, over the top of the game. */
#doge-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(720px, 90vw);
  display: none;
  z-index: 20;
}
.doge-banner-msg {
  margin-bottom: 8px;
  padding: 10px 16px;
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #F4EDDC;
  background: #161615;
  border-left: 4px solid #F4EDDC;
  white-space: pre-wrap;
}
.doge-banner-warning {
  color: #0F0F0E;
  background: #FDCA18;
  border-left-color: #0F0F0E;
}
.doge-banner-error {
  background: #C22C40;
  border-left-color: #F4EDDC;
}

/* Development builds only. */
#diagnostics-icon {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 15;
  cursor: pointer;
}
#doge-dev-tools {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 15;
}
