/*=======================================================
      AUTHENTICATION FORMS STYLES (Signup & Signin)
========================================================*/

:root {
  --card-bg: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.06);
  --accent: #ffbe00;
  --accent-2: #344248;
  --accent-hover: #ff9500;
  --text-primary: #e8f0ff;
  --text-secondary: #aac9ff;
  --text-muted: #ffd8b9;
  --error: #ffb3b3;
  --success: #4caf50;
}

* {
  box-sizing: border-box;
  font-family: 'PT Sans', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

/* Animated Background */
body {
  background: radial-gradient(circle at 10% 20%, rgba(255, 190, 0, 0.15), transparent 15%),
    radial-gradient(circle at 90% 80%, rgba(52, 66, 72, 0.12), transparent 15%),
    linear-gradient(135deg, #ffbe00 0%, #071627 40%, #344248 100%);
  overflow: hidden;
  position: relative;
}

/* Moving Light Overlays */
.bg-light {
  position: fixed;
  inset: -30%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.02), 
    rgba(255, 190, 0, 0.1), 
    rgba(255, 255, 255, 0.02));
  transform: rotate(15deg);
  filter: blur(40px);
  animation: drift 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.bg-light.alt {
  animation-duration: 20s;
  animation-direction: reverse;
  opacity: 0.6;
}

@keyframes drift {
  0% {
    transform: translateX(-30vw) rotate(15deg);
  }
  50% {
    transform: translateX(30vw) rotate(15deg);
  }
  100% {
    transform: translateX(-30vw) rotate(15deg);
  }
}

/* Wrapper */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* Card */
.card {
  width: 650px;
  max-width: 96%;
  padding: 50px;
  border-radius: 20px;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.08), 
    rgba(255, 255, 255, 0.04));
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.7), 
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.8;
}

/* Brand Section */
.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(255, 190, 0, 0.3);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.brand h2 {
  margin: 0 0 5px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand p.lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Form Styles */
form {
  margin-top: 10px;
}

form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

form .row .field {
  margin-bottom: 0;
}

/* Responsive: Stack rows on mobile */
@media (max-width: 480px) {
  form .row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  form .row .field {
    margin-bottom: 20px;
  }
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Input Fields */
input[type=text],
input[type=password],
input[type=email],
input[type=tel] {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
  min-height: 52px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus {
  box-shadow: 0 0 0 3px rgba(255, 190, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

/* Field Container */
.field {
  margin-bottom: 25px;
}

.field .input-with-icon {
  position: relative;
}

.field .input-with-icon i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  font-size: 18px;
}

.field .input-with-icon i:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

/* Button */
.btn {
  display: inline-block;
  padding: 16px 24px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-weight: 700;
  width: 100%;
  font-size: 17px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 190, 0, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 56px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 6px 20px rgba(255, 190, 0, 0.4);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: shake 0.5s;
}

.alert-danger {
  background: rgba(255, 179, 179, 0.2);
  border: 1px solid rgba(255, 179, 179, 0.4);
  color: var(--error);
}

.alert-success {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: var(--success);
}

/* Small Text */
.small {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 25px;
  text-align: center;
  line-height: 1.6;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.small a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.small a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Error Message */
.error {
  color: var(--error);
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

/* Form Message */
#formMsg {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .card {
    width: 95%;
    padding: 40px 30px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 35px 24px;
    border-radius: 16px;
    width: 100%;
  }

  .brand {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    margin-bottom: 25px;
  }

  .brand h2 {
    font-size: 20px;
  }

  .logo {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  input[type=text],
  input[type=password],
  input[type=email],
  input[type=tel] {
    padding: 14px 16px;
    font-size: 15px;
    min-height: 48px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 16px;
    min-height: 52px;
  }

  .wrap {
    padding: 20px 15px;
  }

  form .row {
    gap: 0;
    margin-bottom: 0;
  }

  .field {
    margin-bottom: 20px;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 24px 20px;
  }

  .brand h2 {
    font-size: 18px;
  }
}

/* Loading State */
.btn.loading {
  pointer-events: none;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

