/* ---------- RESET ---------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* ---------- BACKGROUND (DESKTOP) ---------- */
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("images/lja1.png") center / cover no-repeat;
  transform: scale(0.92);
  transform-origin: center;
}

/* ---------- MOBILE BACKGROUND ---------- */
@media (max-width: 768px) {
  body::before {
    background-position: 50% 45%;
    transform: scale(0.95);
    position: absolute;
  }
}

/* ---------- TOP BAR ---------- */
.top-bar{
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  padding: 14px 18px;
  backdrop-filter: blur(2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
}

/* Wrapper so title + links stack nicely */
.title-wrapper{
  text-align: center;
}

/* Main title */
.top-title{
  font-size: 32px;
  font-weight: 800;
}

/* Smaller links row */
.sub-links{
  margin-top: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.dot{
  color: rgba(255,255,255,0.6);
}

.top-link{
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 150ms ease;
}

.top-link::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1.5px;
  width: 0%;
  background: white;
  transition: width 160ms ease;
}

.top-link:hover{
  color: white;
}
.top-link:hover::after{
  width: 100%;
}

/* ---------- LOGIN FORM ---------- */
form {
  background: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 10px;
  width: 280px;
  margin: 40px auto;
  text-align: center;
}

/* Footer text box */
p {
  text-align: center;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  display: block;
  width: fit-content;
  margin: 10px auto;
}

/* ---------- Animated inputs ---------- */
.login-box{
  position: relative;
  width: 260px;
  margin: 0 auto;
}

.animated-input{
  width: 100%;
  padding: 10px;
  margin: 12px 0;
  border: 2px solid rgba(0,0,0,0.3);
  border-radius: 6px;
  outline: none;
  font-size: 14px;
  background: rgba(255,255,255,0.8);
  transition: all 0.2s ease;
}

.login-box label{
  position: absolute;
  left: 10px;
  color: rgba(0,0,0,0.6);
  font-size: 12px;
  background: rgba(255,255,255,0.9);
  padding: 0 5px;
  transition: 0.2s ease;
  pointer-events: none;
}

.login-box label[for="email"]{
  top: 6px;
}
.login-box label[for="password"]{
  top: 50px;
}

.animated-input:focus,
.animated-input:not(:placeholder-shown){
  border-color: black;
  background: white;
}

.animated-input:focus + label,
.animated-input:not(:placeholder-shown) + label{
  transform: translateY(-14px);
  font-size: 11px;
  color: black;
}

.animated-input:focus{
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

/* ---------- Error message (only when not empty) ---------- */
#msg {
  display: none;
}

#msg:not(:empty) {
  display: block;
  padding: 8px;
  margin-top: 8px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  background: rgba(255, 200, 200, 0.8);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}
