@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@200;300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 0 10px;
  position: relative;
  overflow: hidden;
  background-color: #000;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-bg.jpg") center/cover no-repeat;
  filter: brightness(0.6);
  z-index: -1;
}

.wrapper {
  width: 400px;
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.28);
}

.logo-container {
  margin-top: -14px;
  margin-bottom: 10px;
}
.logo-container img {
  width: 260px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 700;
}

/* POLA */
.input-field {
  position: relative;
  margin: 20px 0;
  text-align: left;
}

.input-field input {
  width: 100%;
  height: 40px;
  background: transparent;
  border: none;
  border-bottom: 2px solid #ccc;
  color: #fff;
  font-size: 16px;
  outline: none;
  padding: 0 4px;
}

.input-field label {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
  font-size: 16px;
  pointer-events: none;
  transition: 0.2s ease;
}

/* Pływający label */
.input-field input:focus ~ label,
.input-field input:valid ~ label {
  font-size: 12px;
  top: 0;
  transform: translateY(-100%);
}

/* BŁĘDY */
.input-field input:invalid:not(:focus):not(:placeholder-shown) {
  border-bottom: 2px solid rgba(255, 77, 79, 0.7);
}

.error-message {
  font-size: 12px;
  color: #ff4d4f;
  margin-top: 5px;
  display: none;
}

.input-field input:invalid:not(:focus):not(:placeholder-shown) ~ .error-message {
  display: block;
}

/* LINK ZAPOMNIAŁEŚ */
.forget {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 30px;
  font-size: 0.9rem;
}
.forget a {
  color: #eee;
  text-decoration: none;
}
.forget a:hover {
  text-decoration: underline;
}

/* PRZYCISK */
button {
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
}
button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 2px solid #fff;
}

/* REJESTRACJA */
.register {
  margin-top: 30px;
  color: #eee;
  font-size: 0.95rem;
}
.register a {
  font-weight: 600;
  color: #eee;
  text-decoration: none;
}
.register a:hover {
  text-decoration: underline;
}

/* ALERT */
.alert-message {
  color: #fff;
  background-color: #dc3545;
  padding: 10px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
  animation: fadeInDown 0.4s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}