/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root { --kb: 0px; }  /* dynamicznie ustawiane z JS */
.btn-svg { bottom: calc(3vh + var(--kb, 0px)); }


@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-ExtraBoldItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-Thin.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: "TeleNeo";
  src: url("../fonts/TeleNeo-ThinItalic.otf") format("opentype");
  font-weight: 100;
  font-style: italic;
}

/* Ustawienie globalne */
body {
  font-family: "TeleNeo", sans-serif;
    padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}


html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

#resolution {
  position: fixed;
  top: 120px;
  right: 10px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #0f0;
  font-size: 2vh;
  font-family: monospace;
  border-radius: 6px;
  z-index: 1000;
}

/* Tło */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0; /* tło najniżej */
}

/* SVG w rogach (nad tłem) */
.left-svg {
  position: fixed;
  bottom: 0;
  left: 0;
  height: auto;
  max-width: 70%; /* proporcjonalnie do ekranu, można zmienić */
  z-index: 1;
}

.right-svg {
  position: fixed;
  bottom: 0;
  right: 0;
  height: auto;
  max-height: 25%; /* proporcjonalnie do ekranu, można zmienić */
  z-index: 1;
}

/* Przycisk */
.btn-svg {
  position: fixed;
  bottom: 3vh;   /* margines tymczasowy */
  right: 4vh;    /* margines tymczasowy */
  height:14vh;   /* tymczasowo */
  width: auto;
  cursor: pointer;
  z-index: 2;
}

/* Główny div */
#main-box {
  position: absolute;
  top: 66%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 33%;
  /*border: 3px solid red;*/
  /*background: rgba(0,0,0,0.1);  półprzezroczyste tło dla testu */
  z-index: 3;
}

#start{
    color:white;
    font-size: 18px;
}


/* Ekrany w #main-box */
#main-box {
  position: absolute;
  top: 66%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85vw;
  height: 33vh;
  z-index: 3;
  color: #fff;
}

/* Input (ekran 2) */
.prompt-label {
  display: block;
  font-size: 2.4vh;
  margin-bottom: 1.8vh;
  opacity: 0.9;
}
#userPrompt {
  width: 100%;
  height: 8vh;
  padding: 0 2vw;
  font-size: 3vh;
  border-radius: 1.6vh;
  border: 0.4vh solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  outline: none;
}
#userPrompt::placeholder {
  color: rgba(255,255,255,0.55);
}

/* Ekran 3 (QR) */
#screen-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#screen-qr canvas {
  margin-bottom: 2vh;
}
.download-wrap a {
  font-size: 2.2vh;
  color: #fff;
  text-decoration: underline;
}

/* Overlay generowania */
#gen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.gen-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;
  padding: 3vh 4vw;
  background: rgba(0,0,0,0.35);
  border: 0.5vh solid rgba(255,255,255,0.25);
  border-radius: 2vh;
}
.spinner {
  width: 6vh;
  height: 6vh;
  border: 0.8vh solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-msg {
  font-size: 2.4vh;
  text-align: center;
  max-width: 70vw;
  color:white;
}

/* Przycisk na dole (Twoje wartości z vw/vh) */
.btn-svg {
  position: fixed;
  right: 4vh;
  bottom: 3vh;
  height: 14vh;
  width: auto;
  cursor: pointer;
  z-index: 2;

  /* anty-zoom/anty-callout na tapnięcie w obrazek */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}


/* Hint pod polem (ekran 2) */
.hint-inline {
  margin-top: 1.2vh;
  padding: 1.2vh 1.6vw;
  font-size: 2.1vh;
  color: #fff;
  background: rgba(255,255,255,0.10);
  border: 0.35vh solid rgba(255,255,255,0.25);
  border-radius: 1.4vh;
  opacity: 0;
  transform: translateY(-0.5vh);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hint-inline.show {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}
