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

/* Body + background */
body {
  background-color: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

.background {
  position: fixed;
  top:0; left:0; width:100%; height:100%;
  background: linear-gradient(45deg, #ff6ec4, #7873f5, #4ade80);
  background-size: 600% 600%;
  animation: gradientBG 20s ease infinite;
  z-index: -1;
}

@keyframes gradientBG {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Card */
.auth-card {
  background: rgba(0,0,0,0.8);
  padding: 2rem;
  border-radius: 20px;
  width: 350px;
  max-width: 90%;
  text-align: center;
  animation: fadeInCard 1s forwards;
}

@keyframes fadeInCard {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex:1;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  border-color: #ff6ec4;
  color: #ff6ec4;
}

/* Forms */
.form {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.form.active {display: flex;}

.form input {
  padding: 0.8rem;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-50px);
  animation: fadeInInput 0.6s forwards;
}

.form input:nth-child(1) {animation-delay: 0.2s;}
.form input:nth-child(2) {animation-delay: 0.4s;}
.form input:nth-child(3) {animation-delay: 0.6s;}

@keyframes fadeInInput {
  to {opacity:1; transform: translateX(0);}
}

/* Buttons */
button[type="submit"] {
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  background: #ff6ec4;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

button[type="submit"]:hover {
  box-shadow: 0 0 15px #ff6ec4, 0 0 25px #7873f5;
  transform: scale(1.05);
}

/* Password toggle */
.password-box {
  position: relative;
  width: 100%;
}

.password-box input {
  width: 100%;
  padding-right: 40px; 
}

.password-box .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.1rem;
  color: #ccc;
  transition: 0.3s;
}

.password-box .toggle-password:hover {
  color: #ff6ec4;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #ccc;
  margin-top: 2rem;
}

footer .social {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

footer .social a {
  color: inherit;
  font-size: 1.5rem;
  transition: color 0.3s;
}

footer .social a:hover {
  color: #3498db;
}

/* Error message */
.error-msg {
  color: #ff6b6b;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 400px) {
  .auth-card {width: 90%;}
}
