/* The Seal Quest's loading screen: the night violet, old gold and double frames of the game. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("PixelifySans.ttf") format("truetype");
  font-display: block;
}

:root {
  --night: #120d18;
  --ink: #efe4cc;
  --dim: #a89a86;
  --gold: #e3b04b;
  --gold-soft: #f3d27a;
  --frame: #5a4020;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: "Pixelify Sans", ui-monospace, monospace;
}

#game {
  position: relative;
  width: 100%;
  height: 100%;
}

/* The game fills whatever the page gives it: itch.io's frame or the full screen. */
#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--night);
  outline: none;
}

#loading, #error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(rgba(18, 13, 24, 0.72), rgba(18, 13, 24, 0.92)),
    url("background.webp") center / cover no-repeat,
    var(--night);
  image-rendering: pixelated;
  transition: opacity 0.4s ease;
}

#loading.done { opacity: 0; }
#loading[hidden], #error[hidden] { display: none; }

h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(36px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 2px;
  color: var(--gold-soft);
  text-shadow: 0 4px 0 #6b4515, 0 8px 0 #000, 0 0 40px rgba(240, 160, 60, 0.35);
}

.subtitle {
  margin: 10px 0 0;
  font-size: clamp(18px, 3vw, 32px);
  color: var(--ink);
  text-shadow: 0 3px 0 #000;
}

/* The bar, framed twice like the game's windows. */
.bar {
  width: min(420px, 80vw);
  height: 22px;
  padding: 3px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--frame);
  background: #1d1526;
  box-sizing: border-box;
}

.fill {
  width: 0;
  height: 100%;
  background: linear-gradient(var(--gold-soft), var(--gold));
  transition: width 0.2s linear;
}

.hint {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
  text-shadow: 0 2px 0 #000;
}

#error p {
  margin: 0;
  max-width: 48ch;
  font-size: 18px;
  text-shadow: 0 2px 0 #000;
}

#error .detail {
  font-size: 13px;
  color: var(--dim);
}
