/* login_page.css - обновлённая версия */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-border: #E8E3DC;
  --color-text: #2D2D2D;
  --color-text-secondary: #6B6B6B;
  --color-accent: #FF9B5A;
  --color-accent-hover: #FF8563;
  --color-peach: #FFB27D;
  --color-apricot: #FFC9A8;
  --transition-base: 250ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
  --shadow-accent: 0 8px 24px 0 rgba(255, 155, 90, 0.25);
}

body {
  background: linear-gradient(135deg, #FAF8F5 0%, #FFFFFF 100%);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
}

/* Декоративные blob элементы */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #FFB27D, transparent);
  top: -250px;
  right: -150px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #FF9B5A, transparent);
  bottom: -200px;
  left: -100px;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #FFC9A8, transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  width: 100%;
  margin: auto;
}

.card {
  background: var(--color-surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  min-height: 520px;
}

/* Левая сторона с абстракциями */
.left-side {
  flex: 0.8;
  background: linear-gradient(135deg, #FFB27D 0%, #FF9B5A 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Абстрактные фигуры в стиле Anthropic */
.left-side::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  top: 10%;
  right: -50px;
  filter: blur(40px);
  animation: float 8s ease-in-out infinite;
}

.left-side::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  bottom: 15%;
  left: -30px;
  filter: blur(35px);
  animation: float 6s ease-in-out infinite reverse;
}

/* Дополнительные органические формы */
.abstract-shape {
  position: absolute;
  filter: blur(25px);
}

.shape-1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), rgba(255, 230, 200, 0.3) 50%, transparent 70%);
  border-radius: 50% 70% 60% 40% / 60% 50% 40% 60%;
  top: 15%;
  left: 8%;
  opacity: 0.4;
  animation: morph 10s ease-in-out infinite;
}

.shape-2 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(255, 220, 180, 0.25) 50%, transparent 70%);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  bottom: 20%;
  right: 12%;
  opacity: 0.35;
  animation: morph 12s ease-in-out infinite reverse;
}

.shape-3 {
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 210, 170, 0.28) 50%, transparent 70%);
  border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
  top: 45%;
  right: 20%;
  opacity: 0.38;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes morph {
  0%, 100% {
    border-radius: 50% 70% 60% 40% / 60% 50% 40% 60%;
    transform: scale(1);
  }
  50% {
    border-radius: 70% 50% 40% 60% / 50% 60% 50% 40%;
    transform: scale(1.1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.25;
  }
}

.logo-container {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeSlideIn 0.8s var(--ease-out);
}

.welcome-text {
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tagline {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 400;
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.6;
}

.right-side {
  flex: 1.2;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.form-header {
  margin-bottom: 2rem;
  animation: fadeSlideIn 0.6s var(--ease-out) 0.1s both;
}

.form-title {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.form-subtitle {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.6s var(--ease-out) 0.2s both;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  font-size: 1rem;
  color: var(--color-text);
  transition: all var(--transition-base) var(--ease-out);
  box-sizing: border-box;
}

.input-wrapper .form-input {
  padding-right: 48px;
}

.form-input::placeholder {
  color: #A8A8A8;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 155, 90, 0.1);
}

.input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--transition-base) var(--ease-out);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.input-icon:hover {
  color: var(--color-accent);
}

.button-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #FFB27D 0%, #FF9B5A 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-accent);
  animation: fadeSlideIn 0.6s var(--ease-out) 0.3s both;
  position: relative;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px 0 rgba(255, 155, 90, 0.35);
}

.button-primary:active {
  transform: translateY(0);
}

.button-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  animation: fadeSlideIn 0.6s var(--ease-out) 0.35s both;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.divider span {
  padding: 0 1rem;
}

.social-button {
  width: 100%;
  padding: 12px 24px;
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  box-sizing: border-box;
  animation: fadeSlideIn 0.6s var(--ease-out) 0.4s both;
}

.social-button:hover {
  border-color: #5865F2;
  background: rgba(88, 101, 242, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.discord-icon {
  width: 20px;
  height: 20px;
  fill: #5865F2;
}

.footer-text {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-style: italic;
  animation: fadeSlideIn 0.6s var(--ease-out) 0.5s both;
}

.error-box {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #DC2626;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: none;
  animation: shake 0.4s ease;
}

.error-box.visible {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none !important;
}

.opacity-50 {
  opacity: 0.5;
}

.fade-toggle {
  opacity: 0;
  display: none;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.fade-toggle.visible {
  opacity: 1;
  display: block;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
    align-items: flex-start;
    min-height: 100vh;
  }

  .container {
    min-height: auto;
  }

  .card {
    flex-direction: column;
    min-height: auto;
  }

  .left-side {
    padding: 2.5rem 2rem;
    min-height: 220px;
  }

  .welcome-text {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .right-side {
    padding: 2rem 1.5rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .blob-1,
  .blob-2,
  .blob-3 {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.75rem;
  }

  .left-side {
    padding: 2rem 1.5rem;
    min-height: 180px;
  }

  .welcome-text {
    font-size: 1.75rem;
  }

  .right-side {
    padding: 1.5rem 1.25rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1A1A1A;
    --color-surface: #242424;
    --color-border: #333333;
    --color-text: #E8E8E8;
    --color-text-secondary: #A8A8A8;
  }

  body {
    background: linear-gradient(135deg, #1A1A1A 0%, #242424 100%);
  }

  .card {
    border-color: rgba(255, 255, 255, 0.1);
  }

  .social-button {
    background: #2A2A2A;
    border-color: #404040;
  }

  .social-button:hover {
    background: rgba(88, 101, 242, 0.15);
    border-color: #5865F2;
  }
}