:root {
  --page-bg: #3a527a;
  --shell-line: rgba(171, 194, 235, 0.5);
  --shell-fill: rgba(244, 249, 255, 0.72);
}

@font-face {
  font-family: "Fondamento";
  src: url("assets/fonts/fondamento-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Bree Serif";
  src: url("assets/fonts/bree-serif-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: var(--page-bg);
}

.stage-aura {
  display: none;
}

.game-shell {
  position: relative;
  width: min(88vw, 1360px);
  padding: clamp(8px, 1vw, 14px);
  border-radius: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--shell-line);
  background: var(--shell-fill);
  box-shadow:
    0 16px 38px rgba(30, 47, 84, 0.22),
    0 3px 10px rgba(33, 54, 98, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px) saturate(115%);
}

#game-root {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 390px;
  border-radius: clamp(14px, 1.6vw, 24px);
  overflow: hidden;
  background: #2d4670;
  box-shadow:
    inset 0 0 0 1px rgba(146, 172, 228, 0.62),
    0 5px 16px rgba(18, 31, 58, 0.28);
}

#game-root canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.page-signature {
  position: fixed;
  left: 50%;
  bottom: clamp(10px, 1.2vw, 16px);
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  line-height: 1.2;
  padding: 0;
  font-size: clamp(10px, 0.72vw, 12px);
  font-weight: 600;
  color: rgba(198, 208, 228, 0.82);
  text-shadow: 0 1px 1px rgba(10, 20, 36, 0.3);
  background: transparent;
  backdrop-filter: none;
  pointer-events: auto;
}

.page-signature a {
  color: rgba(210, 223, 244, 0.9);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.page-signature a:hover {
  color: rgba(225, 236, 252, 0.98);
}

@media (max-width: 980px) {
  .game-shell {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .stage-aura {
    opacity: 0.5;
  }

  #game-root {
    border-radius: 0;
    min-height: 360px;
  }

  .page-signature {
    bottom: 8px;
    font-size: 10px;
    padding: 0;
  }
}
