/* Unicom face swap booth. Boje sa unicom.company: gradijent #f81f01 → #ee076e na tamnoj; plava iz logoa #305aef. */
:root {
  --c1: #f81f01; --c2: #ee076e; --plava: #305aef;
  --grad: linear-gradient(135deg, var(--c1), var(--c2));
  --poz: #0b0b12; --kartica: #16151f; --tekst: #fff; --sivo: #a9a8b8;
  --j: min(1vw, .5625vh); /* jedinica: 1/100 širine uspravnog ekrana 9:16 */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--poz); color: var(--tekst); overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; overflow: hidden; }
.sjaj { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 85% 0%, #ee076e55, transparent 70%), radial-gradient(70% 45% at 0% 100%, #f81f0140, transparent 70%); }

.ekran { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center;
  padding: calc(var(--j) * 5) calc(var(--j) * 5) calc(var(--j) * 6); gap: calc(var(--j) * 3); }
.ekran.vidi { display: flex; animation: ulaz .35s ease-out; }
@keyframes ulaz { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.vrh { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.logo { height: calc(var(--j) * 7); }
.nazad { width: calc(var(--j) * 11); height: calc(var(--j) * 11); border-radius: 50%; border: 0; background: #ffffff14; font-size: calc(var(--j) * 5); }
.nazad.prazno { visibility: hidden; }
.vrh:has(.nazad) { justify-content: space-between; }

h1 { margin: calc(var(--j) * 2) 0 0; font-size: calc(var(--j) * 8.5); line-height: 1.05; text-align: center; font-weight: 700; letter-spacing: -.02em; }
h1 em, h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 0; font-size: calc(var(--j) * 6.5); text-align: center; }
.pod { margin: 0; color: var(--sivo); font-size: calc(var(--j) * 3.8); text-align: center; }

/* mreža likova */
.mreza { flex: 1; width: 100%; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--j) * 3);
  align-content: start; padding: calc(var(--j) * 1) calc(var(--j) * 1) calc(var(--j) * 4); scrollbar-width: none; }
.mreza::-webkit-scrollbar { display: none; }
@media (min-aspect-ratio: 1/1) { .mreza { grid-template-columns: repeat(6, 1fr); } }
.lik { position: relative; aspect-ratio: 2/3; border: 0; padding: 0; border-radius: calc(var(--j) * 3); overflow: hidden; background: var(--kartica);
  box-shadow: 0 10px 30px #0008; transition: transform .15s; }
.lik:active { transform: scale(.96); }
.lik img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lik::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px #ffffff1a; }

/* kamera i pregled: 2:3 kao likovi */
.kadar { position: relative; width: min(100%, calc((100vh - var(--j) * 62) * 2 / 3)); aspect-ratio: 2/3; border-radius: calc(var(--j) * 4);
  overflow: hidden; background: #000; box-shadow: 0 0 0 calc(var(--j) * .8) transparent, 0 20px 60px #000a; }
.kadar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: calc(var(--j) * .8); background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 3; pointer-events: none; }
.kadar video { position: absolute; left: 50%; top: 50%; object-fit: cover; }
#snimak { width: 100%; height: 100%; object-fit: cover; display: block; }
.vodic { position: absolute; left: 50%; top: 40%; width: 52%; aspect-ratio: 3/4; transform: translate(-50%, -50%); border: 3px dashed #ffffff70; border-radius: 50%; z-index: 2; }
.mali-lik { position: absolute; right: 4%; top: 3%; width: 24%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; border: 2px solid #fff; z-index: 2; box-shadow: 0 6px 20px #0009; }
.odbroj { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; font-size: calc(var(--j) * 40); font-weight: 800; text-shadow: 0 6px 40px #000; }
.odbroj span { animation: kuc 1s ease-out; }
@keyframes kuc { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }
.blic { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 5; pointer-events: none; }
.blic.pali { animation: blic .5s ease-out; }
@keyframes blic { from { opacity: 1; } to { opacity: 0; } }
.savet { margin: 0; color: var(--sivo); font-size: calc(var(--j) * 3.6); text-align: center; }

.dugme { border: 0; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; font-size: calc(var(--j) * 5);
  padding: calc(var(--j) * 3.6) calc(var(--j) * 12); box-shadow: 0 12px 40px #ee076e55; transition: transform .12s; }
.dugme:active { transform: scale(.96); }
.dugme.tamno { background: #ffffff14; box-shadow: none; }
.dugme:disabled { opacity: .4; }
.dugmad { display: flex; gap: calc(var(--j) * 3); justify-content: center; flex-wrap: wrap; }
#e-kamera .dugme, #e-pregled .dugmad, #e-rezultat > .dugme { margin-top: auto; }

/* obrada: znak iz logoa se okreće u krugu gradijenta */
#e-obrada { justify-content: center; }
.vrti { position: relative; width: calc(var(--j) * 46); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: calc(var(--j) * 5); }
.vrti-znak { width: 56%; animation: okret 2.4s cubic-bezier(.6, 0, .4, 1) infinite; filter: drop-shadow(0 0 30px #305aef66); }
.vrti-krug { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, var(--c1), var(--c2));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px)); mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  animation: okret 1.1s linear infinite; }
@keyframes okret { to { transform: rotate(360deg); } }
#e-obrada.greska .vrti-znak, #e-obrada.greska .vrti-krug { animation-play-state: paused; opacity: .35; }

/* rezultat */
.rezultat { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: calc(var(--j) * 4); }
#rezultat { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; border-radius: calc(var(--j) * 3); box-shadow: 0 20px 60px #000a; }
.qr-kutija { display: flex; align-items: center; gap: calc(var(--j) * 4); background: #fff; color: #111; border-radius: calc(var(--j) * 3); padding: calc(var(--j) * 2.5) calc(var(--j) * 5) calc(var(--j) * 2.5) calc(var(--j) * 2.5); }
.qr-kutija canvas { width: calc(var(--j) * 24); height: calc(var(--j) * 24); }
.qr-kutija p { margin: 0; font-weight: 700; font-size: calc(var(--j) * 4.2); max-width: calc(var(--j) * 40); }
.qr-kutija.ceka canvas { opacity: .15; }
@media (min-aspect-ratio: 1/1) { .rezultat { flex-direction: row; justify-content: center; } }

#admin-ugao { position: absolute; right: 0; top: 0; width: 110px; height: 110px; z-index: 9; }

/* skriveni meni */
.admin { position: absolute; inset: 0; z-index: 20; background: #0b0b12f5; overflow-y: auto; padding: 24px 16px 60px; }
.admin-pin, .admin-meni { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.admin-pin { align-items: center; margin-top: 8vh; }
.pin-tacke { font-size: 44px; letter-spacing: 10px; height: 56px; }
.tastatura { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; margin-bottom: 18px; }
.tastatura button { height: 84px; border-radius: 50%; border: 0; background: #ffffff14; font-size: 28px; }
.admin h2 { font-size: 26px; text-align: left; } .admin-pin h2 { text-align: center; }
.admin h3 { margin: 18px 0 0; font-size: 18px; color: var(--sivo); font-weight: 600; }
.red { display: flex; flex-direction: column; gap: 8px; background: var(--kartica); border-radius: 14px; padding: 12px 14px; }
.red label { font-size: 15px; color: var(--sivo); }
.izbor { display: flex; flex-wrap: wrap; gap: 8px; }
.izbor button { border: 0; border-radius: 999px; padding: 10px 16px; background: #ffffff12; font-size: 15px; }
.izbor button.a { background: var(--grad); }
.red input[type=range] { width: 100%; accent-color: var(--c2); }
.red input[type=password], .red select { background: #0b0b12; color: #fff; border: 1px solid #ffffff26; border-radius: 10px; padding: 10px; font-size: 16px; }
.stanje { font-size: 14px; }
.galerija-link { display: block; text-align: center; text-decoration: none; color: #fff; background: #305aef; border-radius: 14px; padding: 14px; font-weight: 700; }
.kadar.mali { width: 220px; align-self: center; }
.admin-likovi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.admin-likovi button { position: relative; border: 0; padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 2/3; background: none; }
.admin-likovi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-likovi button.iskljucen img { opacity: .2; filter: grayscale(1); }
.admin-likovi button::after { content: "✓"; position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 14px; }
.admin-likovi button.iskljucen::after { content: ""; background: #ffffff30; }
.verzija { color: #666; font-size: 12px; text-align: center; }
