/* 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;
   touch-action: manipulation;
}

#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;
}


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


/* Ekrany w #main-box */
#main-box {
  position: absolute;
  top: 70%;
  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);
}




/****************************QUIZ***********************/
/* --- Ogólne --- */
#main-box {
  text-align: center;
  padding: 2vh;
  color: #fff;
  font-family: 'Arial', sans-serif;
}

/* --- Countdown --- */
#screen-countdown .countdown {
  font-size: 12vh;
  font-weight: bold;
  color: #ff0066;
  animation: pop 0.8s ease;
}

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

/* --- Pytanie --- */
.quiz-question {
  font-size: clamp(16px, 2vh, 24px);
  margin-bottom: 3vh;
  font-weight: bold;
}

/* --- Opcje odpowiedzi --- */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
  margin-bottom: 3vh;
}

.option-btn {
  font-size: clamp(16px, 1.6vh, 24px);
  padding: 1.5vh 2vh;
  border: none;
  border-radius: 10px;
  background: rgba(228, 3, 126, 0.5);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

.option-btn:disabled {
  cursor: default;
  opacity: 0.8;
}

/* --- Odpowiedzi poprawne/niepoprawne --- */
.option-btn.correct {
  background: #28a745 !important;
  color: #fff;
}

.option-btn.wrong {
  background: #dc3545 !important;
  color: #fff;
}

/* --- Przycisk „Dalej” --- */
.next-btn {
  font-size: clamp(16px, 2.5vh, 24px);
  padding: 1.5vh 3vh;
  border: solid white;
  border-radius: 10px;
  background: #e4037e;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.next-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

.next-btn:hover:not(:disabled) {
  background: #ff3385;
}

/* --- Wynik --- */
#screen-result {
  font-size: 3vh;
}

#screen-result b {
  color: #e4037e;
}

/*******************************************************/


/* Formularz */
#screen-form input[type="text"],
#screen-form input[type="email"],
#screen-form input[type="tel"] {
  display: block;
  width: 80%;
  margin: 1vh auto;
  padding: 1.2vh;
  font-size: clamp(16px, 2vh, 24px);
  border-radius: 8px;
  border: none;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2vh;
  margin: 2vh auto;
  cursor: pointer;
}

.checkbox-label input {
  display: none;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  margin-right: 10px;
  display: inline-block;
  position: relative;
}

.checkbox-label input:checked + .custom-checkbox {
  background: #ff0066;
}

/* Regulamin - guzik */
.rules-btn {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  padding: 1vh 1vh;
  border-radius: 6px;
  font-size: 1vh;
  cursor: pointer;
  z-index:1000;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #111;
  padding: 2vh;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
}