/* General Reset & Body */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #0f0f0f;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  background: #111;
  font-weight: bold;
  font-size: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Signup Container */
.signup-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  animation: fadeIn 0.8s ease-out;
}

.signup-form {
  background: #1a1a1a;
  padding: 2.5rem;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(255,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateY(-30px);
  opacity: 0;
  animation: slideIn 0.6s forwards;
}

.signup-form h2 {
  text-align: center;
  color: #ff0000;
  margin-bottom: 1.5rem;
}

/* Floating Labels */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 0.5rem;
  background: #111;
  border: 1px solid #333;
  border-radius: 5px;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #ff0000;
}

.form-group label {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  color: #888;
  font-size: 1rem;
  pointer-events: none;
  transform: translateY(-50%);
  transition: all 0.25s ease-out;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -0.6rem;
  left: 0.5rem;
  font-size: 0.75rem;
  background: #1a1a1a;
  padding: 0 0.3rem;
  color: #ff0000;
}

/* Hide placeholder text on typing */
input::placeholder {
  color: transparent;
}

/* Button with hover animation */
.btn-primary {
  width: 100%;
  padding: 0.8rem;
  background: #ff0000;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #e60000;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(255,0,0,0.5);
}

/* Form message */
.form-message {
  text-align: center;
  font-size: 0.95rem;
  color: #ff6666;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #111;
  color: #888;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 576px) {
  .signup-form {
    padding: 1.5rem;
  }
}

/* Password glow on typing */
input:focus[type="password"] {
  border-color: #ff0000;
  box-shadow: 0 0 8px rgba(255,0,0,0.6);
}

/* Shake animation for errors */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.form-shake {
  animation: shake 0.3s ease;
  border-color: #ff0000 !important;
  box-shadow: 0 0 10px rgba(255,0,0,0.8) !important;
}

/* Login link below form */
.signup-form .login-link {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: #888;
}

.signup-form .login-link a {
  color: #ff0000;
  text-decoration: none;
  font-weight: bold;
}

.signup-form .login-link a:hover {
  text-decoration: underline;
}