/* Global Styles & Variables */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #7f56da;
  --primary-glow: rgba(127, 86, 218, 0.4);
  --text-color: #ffffff;
  --secondary-text-color: #a0a0a0;
  --font-family-body: "Poppins", sans-serif;
  --background-color: #05050e;
  --surface-color: rgba(255, 255, 255, 0.03);
  --glass-border: 1px solid rgba(255, 255, 255, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-family-body);
  background-color: var(--background-color);
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(127, 86, 218, 0.15) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(51, 181, 229, 0.1) 0%,
      transparent 20%
    );
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 80px);
  z-index: 1000;
  background: rgba(5, 5, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
}

.header-logo a img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(127, 86, 218, 0.5));
}

/* Auth Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 60px;
}

.auth-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: var(--glass-border);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  max-width: 860px; /* Horizontal layout width */
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInDown 0.6s ease;
  overflow: hidden;
  display: flex; /* Horizontal split */
}

/* Horizontal Layout Specifics */
.auth-visual {
  flex: 1;
  background: linear-gradient(
    135deg,
    rgba(127, 86, 218, 0.1) 0%,
    rgba(51, 181, 229, 0.05) 100%
  );
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: var(--glass-border);
}

.visual-content {
  text-align: center;
}

.visual-icon {
  font-size: 5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}

.visual-title {
  font-size: 1.8rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-content {
  flex: 1.1;
  padding: 50px;
}

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

.auth-header {
  text-align: left;
  margin-bottom: 25px;
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  margin-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  color: var(--secondary-text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 52px 18px 52px;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.input-wrapper input:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(127, 86, 218, 0.1);
}

.input-wrapper input:focus + i {
  color: var(--primary-color);
}

.toggle {
  position: absolute;
  right: 16px;
  left: auto !important;
  cursor: pointer;
  z-index: 10;
}

/* Password Strength Indicators */
.input-wrapper.password-weak input {
  border-color: #ff4444 !important;
  background: rgba(255, 68, 68, 0.05) !important;
}

.input-wrapper.password-medium input {
  border-color: #ffaa00 !important;
  background: rgba(255, 170, 0, 0.05) !important;
}

.input-wrapper.password-strong input {
  border-color: #33ff99 !important;
  background: rgba(51, 255, 153, 0.05) !important;
}

.password-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff4444;
  font-size: 0.82rem;
  margin-top: 6px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Options */
.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--secondary-text-color);
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 5px;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  position: relative;
  transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
  content: "\f058";
  font-family: "boxicons";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 13px;
}

.terms-a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
}

.terms-a:hover {
  filter: brightness(1.2);
}

/* Buttons */
.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 56px;
}

.btn-primary i.bx-spin {
  font-size: 1.4rem;
  line-height: 1;
}

.btn-primary:hover {
  background: var(--primary-glow);
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer a:hover {
  filter: brightness(1.2);
}

/* Site Footer */
footer {
  padding: 40px 20px;
  text-align: center;
  margin-top: -45px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.06);
  margin-bottom: 25px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: var(--secondary-text-color);
  font-size: 1rem;
  font-weight: 400;
}

.footer-legal-links a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  transition: 0.3s;
}

.footer-legal-links a:hover {
  color: var(--text-color);
}

@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
    max-width: 420px;
  }
  .auth-visual {
    display: none;
  }
  .auth-content {
    padding: 35px 25px;
  }
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
  }
}
