@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}

body {
  background: linear-gradient(135deg, #1a103d, #0f0c19);
  color: #e0d8ff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  background: rgba(23, 0, 65, 0.6);
  border: 2px solid #5931a3;
  border-radius: 16px;
  padding: 50px 35px;
  width: 100%;
  max-width: 500px; /* container now wraps content */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  margin: auto;
  display: flex;
  flex-direction: column; /* stack vertically */
  justify-content: center;
  align-items: center;
}

#main, 
#create-acct {
  width: 100%;
  display: none !important; /* hide inactive completely */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#main.active, 
#create-acct.active {
  display: flex !important; /* only active form shows */
}

h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 24px;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

p {
  margin: 16px 0;
  text-align: center;
  color: #c8baff;
  font-size: 0.96rem;
  word-break: break-word;
}

input {
  display: block;
  max-width: 500px;
  width: 100%;
  padding: 14px 16px;
  margin: 12px auto;
  font-size: 1rem;
  border: 1.5px solid #7d4ae4;
  border-radius: 10px;
  background-color: rgba(44, 22, 78, 0.6);
  color: #ffffff;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

input::placeholder {
  color: #bfa6ef;
}

input:focus {
  outline: none;
  border-color: #a67eff;
  background-color: rgba(44, 22, 78, 0.8);
  box-shadow: 0 0 0 4px rgba(166, 126, 255, 0.3);
}

button {
  display: block;
  max-width: 500px;
  width: 100%;
  padding: 14px;
  margin: 24px auto 10px auto;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to right, #6b3dcc, #9e5bff);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

button:hover {
  background: linear-gradient(to right, #7f45ec, #b077ff);
  transform: scale(1.045);
  box-shadow: 0 6px 14px rgba(160, 126, 255, 0.4);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(160, 126, 255, 0.35);
}

#sign-up,
#return-btn {
  background: none;
  color: #b692ff;
  text-decoration: underline;
  font-size: 0.95rem;
  border: none;
  margin-top: 16px;
  display: block;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.25s, color 0.25s;
}

#sign-up:hover,
#return-btn:hover {
  opacity: 0.85;
  color: #d2baff;
}

.error-message,
.success-message {
  font-weight: 600;
  padding: 14px 18px;
  margin: 0 auto 20px auto;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  font-size: 0.96rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-message {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.success-message {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.verify-message-container {
  margin-bottom: 20px;
  font-size: 1.1em;
  text-align: center;
}

.message-box {
  transition: opacity 0.5s ease;
}

@media (max-width: 600px) {
  .login-container {
    padding: 30px 20px;
    max-width: 95%;
  }

  input,
  button {
    max-width: 100%;
  }

  .error-message,
  .success-message {
    max-width: 100%;
  }
}
