:root {
  --color-accent-dark: #1E293B;
  --color-bg-soft: #F0F4F8;
  --color-muted: #D1D5DB;
  --color-mid: #4C576B;
  --color-gray: #7E8591;
  --color-white: #FFFFFF;
  --color-error: #ef4444;
  --color-strength-weak: #f87171;
  --color-strength-medium: #fbbf24;
  --color-strength-strong: #34d399;

  --duration-fast: 180ms;
  --duration-normal: 320ms;
  --duration-slow: 420ms;

  --ease-smooth: cubic-bezier(.2, .9, .3, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  --shadow-card: 0 10px 30px rgba(30, 41, 59, 0.09);
  --shadow-button: 0 6px 18px rgba(30, 41, 59, 0.15);
  --shadow-button-hover: 0 8px 24px rgba(30, 41, 59, 0.22);
  --shadow-focus: 0 0 0 3px rgba(30, 41, 59, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg-soft);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
  color: var(--color-accent-dark);
  overflow-x: hidden;
}

.custom-cursor {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-accent-dark);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  z-index: 9999;
  opacity: 0;
}

.custom-cursor.visible {
  opacity: 1;
}

.custom-cursor.hover {
  width: 40px;
  height: 40px;
  background-color: rgba(30, 41, 59, 0.1);
  border-color: transparent;
}

.custom-cursor.click {
  transform: translate(-50%, -50%) scale(0.8);
}

.auth-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  padding: 40px 32px;
  border: 1px solid #e5e7eb;
}

.form-panel {
  animation: fadeIn 0.8s var(--ease-smooth) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-accent-dark);
  margin-bottom: 16px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.auth-subtitle {
  font-size: 16px;
  color: var(--color-mid);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-muted);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-accent-dark);
  transition: all var(--duration-fast) var(--ease-smooth);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-gray);
}

.form-input:focus {
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-focus);
}

.form-input.error {
  border-color: var(--color-error);
}

.form-input.success {
  border-color: var(--color-strength-strong);
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-gray);
  transition: color var(--duration-fast) ease;
}

.password-toggle:hover {
  color: var(--color-accent-dark);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.password-strength {
  margin-top: 8px;
  height: 16px;
}

.strength-bar {
  height: 4px;
  background: var(--color-muted);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
  font-size: 12px;
  color: var(--color-gray);
  transition: color 0.3s ease;
}

.strength-weak .strength-fill {
  width: 33%;
  background: var(--color-strength-weak);
}

.strength-weak .strength-text {
  color: var(--color-strength-weak);
}

.strength-medium .strength-fill {
  width: 66%;
  background: var(--color-strength-medium);
}

.strength-medium .strength-text {
  color: var(--color-strength-medium);
}

.strength-strong .strength-fill {
  width: 100%;
  background: var(--color-strength-strong);
}

.strength-strong .strength-text {
  color: var(--color-strength-strong);
}

.error-message {
  color: var(--color-error);
  font-size: 12px;
  margin-top: 6px;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--duration-fast) ease;
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
  min-height: 18px;
  max-height: 100px;
  margin-top: 6px;
}

.btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-smooth);
  background: var(--color-accent-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-button);
}

.btn-primary {
  background: var(--color-accent-dark);
  color: var(--color-white);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-mid);
}

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

.auth-footer a:hover {
  text-decoration: underline;
}

.form-group,
.btn,
.auth-footer {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s var(--ease-smooth) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.liquid-blob {
  position: fixed;
  top: -10vh;
  right: -10vw;
  width: 120vw;
  height: 120vh;
  z-index: 0;
  opacity: 0.5;
  animation: blob-move 25s ease-in-out infinite alternate;
}

@keyframes blob-move {
  from {
    transform: translate(5%, -5%) rotate(0deg) scale(1);
  }

  to {
    transform: translate(-5%, 5%) rotate(360deg) scale(1.1);
  }
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .custom-cursor,
  .liquid-blob {
    display: none;
  }

  body {
    cursor: auto;
  }
}