/* ===== Auth Pages — Shared Styles ===== */

/* Fonts */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');


/* ===== Reset ===== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ===== Base ===== */

body {
  font-family: 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
  background: #131315;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}


/* ===== Main Section ===== */

.main-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px;
  background: #051424;
  position: relative;
  overflow: hidden;
}

.bg-circuit {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.5;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-circuit-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1280px;
  height: 113px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0.5;
}

.divider-line {
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.version-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  color: #475569;
  letter-spacing: 1px;
  white-space: nowrap;
}

.red-spotlight {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  filter: blur(120px);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


/* ===== Auth Card ===== */

.auth-card {
  position: relative;
  width: 100%;
  max-width: 448px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 40px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.card-glow {
  position: absolute;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.2);
  filter: blur(80px);
  pointer-events: none;
  top: -80px;
  right: -80px;
}

.accent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.5), transparent);
  border-radius: 0 0 12px 12px;
}

.card-logo {
  width: 109px;
  height: 109px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25))
    drop-shadow(3px 3px 71px rgba(255, 0, 0, 1));
}


/* ===== Title ===== */

.auth-title {
  font-size: 36px;
  font-weight: 500;
  text-align: center;
  background: linear-gradient(135deg, #fff, #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: #e7bcb8;
  text-align: center;
  opacity: 0.8;
  margin-bottom: 24px;
}


/* ===== Form Fields ===== */

.field-group {
  margin-bottom: 20px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-label {
  font-size: 12px;
  color: #e7bcb8;
  font-weight: 500;
  letter-spacing: 1px;
}

.field-error {
  font-size: 12px;
  color: #ff4130;
  font-weight: 500;
  letter-spacing: 1px;
  display: none;
}

.field-error.visible {
  display: block;
}


/* ===== Inputs ===== */

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.3);
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.input-field {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 48px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.input-field::placeholder {
  color: #6b7280;
}

.input-field:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.input-field.error {
  border-color: #ff4130;
  box-shadow: 0 0 0 3px rgba(255, 65, 48, 0.12);
}

.input-field.error:focus {
  border-color: #ff4130;
  box-shadow: 0 0 0 3px rgba(255, 65, 48, 0.2);
}

/* Password input */

.input-pwd {
  padding-right: 48px;
}

.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
  z-index: 2;
  padding: 0;
}

.input-toggle:hover {
  color: rgba(255, 255, 255, 0.6);
}

.input-toggle svg {
  width: 20px;
  height: 20px;
}


/* ===== Submit Button ===== */

.btn-submit {
  width: 100%;
  height: 56px;
  background: #dc2626;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
  margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
  background: #ef4444;
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(255, 0, 0, 0.5);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ===== Toast ===== */

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 28px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.4);
}

.toast.error {
  border-color: rgba(255, 65, 48, 0.4);
}


/* ===== Page Footer ===== */

.page-footer {
  background: #131315;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  color: #475569;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  color: #475569;
  letter-spacing: 1px;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: #94a3b8;
}


/* ===== Footer Auth Link ===== */

.footer-link-section {
  text-align: center;
  padding-top: 16px;
}

.footer-link-section a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.footer-link-section a:hover {
  color: #fff;
}

.footer-link-section svg {
  width: 16px;
  height: 16px;
}


/* ===== Responsive ===== */

@media (max-width: 640px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 8px;
  }

  .auth-title {
    font-size: 28px;
  }

  .card-logo {
    width: 80px;
    height: 80px;
  }

  .card-logo img {
    filter:
      drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25))
      drop-shadow(3px 3px 40px rgba(255, 0, 0, 0.8));
  }

  .page-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 16px;
  }

  .main-section {
    padding: 60px 12px 60px;
  }
}


/* ===== Auth Scrollbar ===== */

::-webkit-scrollbar-track {
  background: #131315;
}
