/* ===== Reset & Fonts ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* ===== Background & Layout ===== */
body {
  background: linear-gradient(135deg, #4f8ef7, #7c4dff);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: fadeIn 1s ease-in-out;
}

/* ===== Animated Bars in Background ===== */
.bar {
  position: absolute;
  width: 0.4vw;
  height: 15vh;
  background: rgba(255, 255, 255, 0.2);
  animation: moveBars 6s linear infinite;
}

.bar:nth-child(1) { left: 20%; animation-delay: 0s; }
.bar:nth-child(2) { left: 40%; animation-delay: 1s; }
.bar:nth-child(3) { left: 60%; animation-delay: 2s; }
.bar:nth-child(4) { left: 80%; animation-delay: 3s; }

@keyframes moveBars {
  0% { top: -10vh; }
  100% { top: 110vh; }
}

/* ===== Header Bar ===== */
header {
  position: absolute;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  padding: 1rem 0;
  text-align: center;
  box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,0.2);
}

header h1 {
  color: white;
  font-size: 2rem;
  letter-spacing: 1px;
}

header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-top: 0.3rem;
}

/* ===== Glass Container ===== */
.container {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(15px);
  padding: 2.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 90%;
  max-width: 400px;
  animation: slideUp 0.8s ease-out;
  z-index: 1;
}

/* ===== Title in Form ===== */
.container h2 {
  margin-bottom: 1.25rem;
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 1px;
  position: relative;
}

.container h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: white;
  margin: 0.5rem auto 0 auto;
  border-radius: 3px;
}

/* ===== Inputs ===== */
.container input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 1.25rem;
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 1rem;
  transition: 0.3s;
}

.container input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.container input:focus {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0.75rem rgba(255, 255, 255, 0.8);
}

/* ===== Buttons ===== */
.container button {
  width: 45%;
  padding: 0.65rem 0;
  margin: 0.5rem 0.3rem;
  background: white;
  color: #4f8ef7;
  border: none;
  border-radius: 1.25rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.container button:hover {
  background: #4f8ef7;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0.3rem 1rem rgba(79, 142, 247, 0.4);
}

/* ===== Message ===== */
#message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Toggle Link Style ===== */
#toggle-mode {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

#toggle-mode a {
  color: #fff;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s;
}

#toggle-mode a:hover {
  color: #ffd54f;
}











/* Extra small phones (iPhone SE, older Androids) */
@media (max-width: 375px) {
  .container {
    padding: 1.8rem;
    width: 95%;
  }

  .container h2 {
    font-size: 1.4rem;
  }

  header h1 {
    font-size: 1.3rem;
  }

  .container button {
    width: 100%;
    margin: 0.3rem 0;
  }
}

/* Small phones (iPhone 12, Galaxy S) */
@media (max-width: 480px) {
  .container {
    padding: 2rem;
    width: 95%;
  }

  .container h2 {
    font-size: 1.5rem;
  }

  .container button {
    width: 100%;
    margin: 0.3rem 0;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 0.9rem;
  }
}

/* Tablets (iPads, Galaxy Tabs) */
@media (min-width: 481px) and (max-width: 1024px) {
  .container {
    padding: 2.5rem;
    width: 80%;
    max-width: 450px;
  }

  header h1 {
    font-size: 2rem;
  }

  .container h2 {
    font-size: 1.8rem;
  }

  .container button {
    font-size: 1rem;
  }
}

/* Laptops & desktops */
@media (min-width: 1025px) {
  .container {
    max-width: 400px;
  }

  header h1 {
    font-size: 2.2rem;
  }
}
