* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Lexend Deca";
  src: url("../assets/fonts/lexend-deca-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend Deca";
  src: url("../assets/fonts/lexend-deca-900.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  height: 100%;
  background: #121318;
  color: #f4efe4;
  font-family: "Lexend Deca", "Segoe UI", Arial, sans-serif;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
}

#app {
  width: 100dvw;
  height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 12%, rgba(247, 195, 49, 0.15), transparent 24rem),
    linear-gradient(135deg, #171820 0%, #1f2529 48%, #171820 100%);
}

#game {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  max-width: 100dvw;
  max-height: 100dvh;
  overflow: hidden;
  border: 1px solid rgba(244, 239, 228, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  background: #10131a;
  touch-action: none;
}

#renderer-warning {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 20;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 12px 16px;
  border: 2px solid rgba(255, 92, 138, 0.9);
  background: rgba(12, 17, 22, 0.94);
  color: #ffb22e;
  font-weight: 900;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

#mobile-fullscreen-retry {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  top: max(12px, env(safe-area-inset-top));
  z-index: 4000;
  min-width: 132px;
  min-height: 48px;
  padding: 8px 14px;
  border: 3px solid #f4efe4;
  border-radius: 4px;
  background: #ffb22e;
  color: #10131a;
  font: 900 13px "Lexend Deca", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  touch-action: manipulation;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  touch-action: none;
}

html:fullscreen,
html:fullscreen body,
html:fullscreen #app,
html:fullscreen #game,
html:-webkit-full-screen,
html:-webkit-full-screen body,
html:-webkit-full-screen #app,
html:-webkit-full-screen #game {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
}

@media (orientation: landscape) and (max-width: 1024px) {
  #game {
    border: 0;
    box-shadow: none;
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  #app::after {
    content: "Obroc telefon poziomo";
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 10;
    padding: 10px 14px;
    border: 2px solid rgba(244, 211, 94, 0.9);
    background: rgba(12, 17, 22, 0.9);
    color: #f4d35e;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0;
    pointer-events: none;
  }
}
