* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  color: #eee;
}

/* Overlay for readability */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 23, 43, 0.85) 0%, rgba(29, 23, 43, 0.95) 85%);
  backdrop-filter: blur(10px);
  z-index: -1;
}

#container {
  background: rgba(255, 255, 255, 0.1);
  width: 360px;
  padding: 2.5rem 2rem 3rem 2rem;
  border-radius: 20px;
  box-shadow:
    0 8px 24px rgba(113, 71, 182, 0.6),
    inset 0 0 60px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  user-select: none;
  transition: box-shadow 0.3s ease;
}
#container:hover {
  box-shadow:
    0 15px 45px rgba(113, 71, 182, 0.85),
    inset 0 0 100px rgba(255, 255, 255, 0.3);
}

h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #f3deff;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px #b594f8cc;
  user-select: text;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #d1c4e9;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
  user-select: text;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  padding: 0.6rem 0.8rem;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  border: 1.8px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #eee;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.15);
  transition: border-color 0.4s ease, background-color 0.4s ease, color 0.4s ease;
  user-select: text;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #c37cff;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  color: #f0e6ff;
  box-shadow: inset 0 0 14px #c37cffcc;
}

button {
  background: #b178ff;
  color: white;
  padding: 0.7rem;
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  filter: drop-shadow(0 0 6px #b178ffcc);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease;
  user-select: none;
}

button:hover,
button:focus {
  background: #9b57ea;
  box-shadow: 0 0 18px #a85affbb;
  outline: none;
  transform: scale(1.05);
}

#toggle-link {
  text-align: center;
  color: #b178ff;
  margin-top: 1.3rem;
  cursor: pointer;
  text-decoration: underline;
  user-select: none;
  font-weight: 600;
  /* filter: drop-shadow(0 0 3px #bb9effdd); */
  transition: color 0.3s ease;
}

#toggle-link:hover {
  color: #9b57ea;
}

#error-message {
  color: #f44336;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  min-height: 1.2em;
  text-shadow: 0 0 6px #f44336cc;
}

#success-message {
  color: #b178ff;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  min-height: 1.2em;
  text-shadow: 0 0 7px #b178ffcc;
}