/* Lucky Times: Island Roll - the page around the game. */

:root {
  --navy: #0b2231;
  --panel: #0f2c42;
  --gold: #ffc83d;
  --cream: #fff7e0;
  --muted: #b8d1e0;
  --bar-height: 44px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The game is 16:9. It takes all the room it can without being cropped. */
#unity-canvas {
  display: block;
  width: min(100vw, calc((100vh - var(--bar-height)) * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  background: #06141d;
  outline: none;
}

#loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
}

#loading[hidden] {
  display: none;
}

#loading-title {
  margin: 0;
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
}

#loading-bar {
  width: min(420px, 70vw);
  height: 14px;
  border-radius: 7px;
  background: var(--panel);
  border: 2px solid var(--gold);
  overflow: hidden;
}

#loading-fill {
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.15s linear;
}

#loading-note {
  margin: 0;
  max-width: 80vw;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

#bar {
  flex: 0 0 var(--bar-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: var(--panel);
  border-top: 2px solid var(--gold);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}

#bar-name {
  font-weight: 700;
  color: var(--gold);
}

#bar-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

#bar a {
  color: var(--muted);
  text-decoration: none;
}

#bar a:hover,
#bar a:focus-visible {
  color: var(--cream);
  text-decoration: underline;
}

#fullscreen {
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
}

#fullscreen:hover,
#fullscreen:focus-visible {
  background: var(--gold);
  color: var(--navy);
}

#fullscreen[hidden] {
  display: none;
}

@media (max-width: 640px) {
  #bar-name {
    display: none;
  }

  #bar-links {
    margin-left: 0;
    gap: 12px;
  }
}
