@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f6f5f7;
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* prostor ispod fiksnog headera i iznad fiksnog footera */
.auth-page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 120px 20px 90px;
}

h1 { font-weight: bold; margin: 0 0 14px; }

p {
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  letter-spacing: .5px;
  margin: 20px 0 30px;
}

.container a {
  color: #333;
  font-size: 14px;
  text-decoration: none;
}
.container a:hover { color: #C50000; }

button {
  border-radius: 20px;
  border: 1px solid #C50000;
  background-color: #C50000;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 80ms ease-in;
}
button:active { transform: scale(.95); }
button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
button.ghost { background-color: transparent; border-color: #fff; }

form {
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
}

input {
  background-color: #eee;
  border: none;
  padding: 12px 15px;
  margin: 6px 0;
  width: 100%;
  font: inherit;
  font-size: 14px;
}
input:focus { outline: 2px solid #C50000; outline-offset: -2px; }

.form-message {
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fde8e8;
  color: #b00000;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.35;
}

.forgot-link { margin: 12px 0; }

.switch-link {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 400;
}
.switch-link a { color: #C50000 !important; font-weight: bold; font-size: 13px; }

/* zamka za botove – sakrivena od ljudi */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Kontejner sa klizećim panelom (računar) ---------- */

.container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.22);
  position: relative;
  overflow: hidden;
  width: 768px;
  max-width: 100%;
  min-height: 520px;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all .6s ease-in-out;
}

.sign-in-container { left: 0; width: 50%; z-index: 2; }
.container.right-panel-active .sign-in-container { transform: translateX(100%); }

.sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show .6s;
}

@keyframes show {
  0%, 49.99% { opacity: 0; z-index: 1; }
  50%, 100%  { opacity: 1; z-index: 5; }
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform .6s ease-in-out;
  z-index: 100;
}
.container.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
  background: #000;
  color: #fff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform .6s ease-in-out;
}
.container.right-panel-active .overlay { transform: translateX(50%); }

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform .6s ease-in-out;
}
.overlay-left { transform: translateX(-20%); }
.container.right-panel-active .overlay-left { transform: translateX(0); }
.overlay-right { right: 0; transform: translateX(0); }
.container.right-panel-active .overlay-right { transform: translateX(20%); }

/* na računaru linkovi za prebacivanje nisu potrebni – tu je crni panel */
.switch-link { display: none; }

/* Jeni u uglu */
.jeni-fixed-image {
  position: fixed;
  bottom: 50px;
  right: 30px;
  z-index: 50;
  pointer-events: none;
}
.jeni-fixed-image img {
  width: auto;
  height: auto;
  max-width: min(22vw, 380px);
  max-height: calc(100vh - 190px); /* nikad ne ulazi ispod headera */
  border-radius: 10px;
  display: block;
}

/* Desno se uvek čuva mesto za Jeni, pa se forma centrira u preostalom prostoru
   i slika nikad ne prekriva polja. */
@media (min-width: 1001px) {
  .auth-page { padding-right: calc(min(22vw, 380px) + 50px); }
}
/* Tek na uskim ekranima (tablet/telefon) slika se sklanja */
@media (max-width: 1000px) {
  .jeni-fixed-image { display: none; }
}

/* ---------- Telefon: jedna forma ispod druge, bez klizanja ---------- */
@media (max-width: 768px) {
  .auth-page { padding: 80px 12px 24px; align-items: flex-start; }

  .container { min-height: 0; width: 100%; }
  .overlay-container { display: none; }

  .form-container {
    position: static;
    width: 100% !important;
    transform: none !important;
    transition: none;
    animation: none !important;
  }
  .sign-up-container { display: none; opacity: 1; }
  .container.right-panel-active .sign-up-container { display: block; }
  .container.right-panel-active .sign-in-container { display: none; }

  form { padding: 28px 20px; height: auto; }
  h1 { font-size: 26px; }
  input { font-size: 16px; } /* 16px sprečava da iPhone zumira polje */
  .switch-link { display: block; }
}

/* ---------- Zelena poruka (uspeh) ---------- */
.form-message.success { background: #e6f6ea; color: #1d7a35; }

/* ---------- Stranice sa jednom formom (forgot, reset) ---------- */
.auth-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.22);
  width: 440px;
  max-width: 100%;
  overflow: hidden;
}
.auth-card form { padding: 44px 40px; height: auto; }
.auth-card p.lead { margin: 0 0 18px; font-weight: 400; }
.auth-card .back-link { display: block; margin-top: 18px; font-size: 13px; }
.auth-card .back-link a { color: #C50000; font-weight: bold; font-size: 13px; }

@media (max-width: 768px) {
  .auth-card form { padding: 28px 20px; }
}

/* poruka bez forme (npr. istekao link) – izgleda isto kao forma */
.auth-message { padding: 44px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-message p.lead { margin: 0 0 18px; font-weight: 400; }
.btn-link {
  display: inline-block;
  border-radius: 20px;
  background: #C50000;
  color: #fff !important;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}
.btn-link:hover { background: #990000; }
@media (max-width: 768px) { .auth-message { padding: 28px 20px; } }

/* ---------- Kvadratići (18+ / uslovi, "Keep me logged in") ---------- */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 8px 0 10px;
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  cursor: pointer;
}
.check-row input { width: auto; margin: 2px 0 0; flex-shrink: 0; accent-color: #C50000; }
.check-row a { font-size: 12px; color: #C50000 !important; text-decoration: underline; }
.remember-row { justify-content: center; align-items: center; margin: 6px 0 0; }
.remember-row input { margin: 0; }
