/* style.css - SquadUp Final Mobile & No-Zoom */

/* === GLOBALNI RESET I ZABRANA ZUMIRANJA === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "DM Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  /* Onemogućuje zumiranje dodirom na razini preglednika */
  touch-action: manipulation; 
  height: 100%;
  overflow: hidden; /* Sprječava 'bounce' efekt na iOS-u */
}

body {
  /* Onemogućuje zumiranje, ali dopušta skrolanje */
  touch-action: pan-x pan-y; 
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* Dinamička visina za mobitele */
  overflow-y: auto; 
  overflow-x: hidden;
  
  /* Pozadinska slika */
  background: url("pictures/tereni.png") no-repeat center center fixed;
  background-size: cover;

  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  position: relative;
  padding: 20px;
}

/* Tamni overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65); 
  z-index: 0;
}

/* === GLAVNI KONTEJNER (GLASSMORPHISM) === */
.container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px 30px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 420px;
  margin: auto;
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* === LOGO & TYPOGRAPHY === */
.logo { width: 140px; margin-bottom: 20px; display: block; margin-left: auto; margin-right: auto; }

h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; color: #ffffff; letter-spacing: -0.5px; }
h1 span { color: #79AEF8; } /* Plavi naglasak za SquadUp tekst */

p { color: #e2e8f0; font-size: 0.95rem; margin-bottom: 25px; font-weight: 400; line-height: 1.5; }

/* === FORMA === */
form { display: flex; flex-direction: column; gap: 14px; width: 100%; }

/* === INPUT POLJA === */
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.95); border: 2px solid transparent;
  color: #1e293b; font-size: 16px; font-weight: 500;
  outline: none; transition: all 0.25s ease; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); appearance: none; 
}
input::placeholder { color: #94a3b8; font-weight: 400; }
input:focus, select:focus { background-color: #ffffff; border-color: #79AEF8; box-shadow: 0 0 0 4px rgba(121, 174, 248, 0.25); transform: translateY(-1px); }

select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 10px; cursor: pointer;
}
select:required:invalid { color: #94a3b8; }

/* === PASSWORD WRAPPER === */
.password-wrapper { position: relative; width: 100%; }
.password-wrapper input { padding-right: 45px; }
.toggle-password { position: absolute; right: 0; top: 0; bottom: 0; width: 46px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #64748b; transition: color 0.2s; }
.toggle-password:active { color: #334155; }
.toggle-password svg { width: 20px; height: 20px; }

/* === GUMBI (BUTTONS) === */
.buttons {
  display: flex;
  gap: 15px; /* Razmak između gumba na index.php */
  width: 100%;
  margin-top: 10px;
}

.btn {
  width: 100%; padding: 16px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s ease; text-decoration: none; border: none;
  /* Default Primary stil */
  background: linear-gradient(135deg, #79AEF8 0%, #3b82f6 100%); color: white; box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
  display: inline-flex; justify-content: center; align-items: center;
}
.btn:active { transform: scale(0.98); }

/* Sekundarni gumb (za index.php) */
.btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
}
.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

/* === LINKOVI I GREŠKE === */
a { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.9rem; margin-top: 15px; display: inline-block; padding: 5px; }
a:hover { text-decoration: underline; }

.error-msg { background: rgba(255,255,255,0.95); color: #ef4444; padding: 12px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; margin-bottom: 20px; border-left: 4px solid #ef4444; text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* === MOBILE TWEAKS === */
@media (max-width: 600px) {
  .buttons { flex-direction: column; gap: 10px; } /* Gumbi jedan ispod drugog na mobitelu */
}

@media (max-height: 700px) {
  .container { padding: 30px 20px; }
  .logo { width: 120px; margin-bottom: 15px; }
  h1 { font-size: 1.5rem; }
  form { gap: 12px; }
  input, select, .btn { padding: 12px 14px; }
}

/* === DODATAK ZA VERIFIKACIJU (verify.php) I CUSTOM CHECKBOX === */

/* Popravak za placeholder tekst da stane na ekran */
.verify-input {
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 5px; /* Razmak samo za brojeve koje korisnik upiše */
}

.verify-input::placeholder {
  letter-spacing: normal; /* Normalan razmak za tekst upute */
  font-size: 1rem;       /* Malo manji font da sigurno stane */
  opacity: 0.7;
}

/* --- CUSTOM CHECKBOX DIZAJN --- */

/* Glavni wrapper za checkbox i tekst */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center; /* Vraćeno na centar da bude ispod inputa, promijeni u flex-start za lijevo */
  position: relative;
  gap: 10px;
  margin-top: -5px;
  margin-bottom: 15px;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 0.95rem;
  user-select: none;
  width: 100%;
}

/* 1. Sakrij originalni ružni checkbox */
.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* 2. Kreiraj prilagođenu "kućicu" (koristeći ::before na span elementu teksta) */
.checkbox-wrapper span {
  position: relative;
  padding-left: 32px; /* Napravi mjesta za kućicu lijevo od teksta */
}

.checkbox-wrapper span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 22px;
  width: 22px;
  /* Stil kućice kada nije označena - slično input poljima */
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px; /* Zaobljeni rubovi */
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Hover efekt na kućicu */
.checkbox-wrapper:hover span::before {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 3. Stil kućice kada je OZNAČENA */
.checkbox-wrapper input[type="checkbox"]:checked + span::before {
  background-color: #79AEF8; /* Tvoja plava accent boja */
  border-color: #79AEF8;
  box-shadow: 0 0 0 3px rgba(121, 174, 248, 0.25); /* Lagani plavi sjaj */
}

/* 4. Kreiraj kvačicu (znak ✓) koristeći ::after */
.checkbox-wrapper span::after {
  content: '';
  position: absolute;
  /* Pozicioniranje kvačice unutar kućice */
  left: 8px;
  top: 50%;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0; /* Crtamo kvačicu */
  /* Početno stanje: skrivena i smanjena */
  transform: translateY(-65%) rotate(45deg) scale(0);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); /* "Pop" animacija */
  opacity: 0;
}

/* Prikaz kvačice kada je checkbox označen */
.checkbox-wrapper input[type="checkbox"]:checked + span::after {
  transform: translateY(-65%) rotate(45deg) scale(1);
  opacity: 1;
} accent-color: #79AEF8; /* Plava boja kvačice */
}