/* BabushkaPhone - Warm Nostalgic Connection Design System */
/* Distinctive, memorable aesthetic evoking nostalgia, warmth, and emotional connection to home */

/* Typography - Warm, characterful fonts with excellent Cyrillic support */
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800&family=Spectral:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Warm Nostalgic Color Palette */
  --coral-warm: #FF6B6B;
  --peach-glow: #FFD93D;
  --sunset-orange: #FF8B5A;
  --soft-purple: #A8DADC;
  --lavender-mist: #D4A5FF;
  --cream-bg: #FFF8E7;
  --cream-card: #FFFDF7;

  /* Accent colors */
  --warm-red: #E63946;
  --gentle-blue: #457B9D;
  --sage-green: #95D5B2;

  /* Neutrals with warmth */
  --warm-gray-50: #FDFCF9;
  --warm-gray-100: #F7F5F0;
  --warm-gray-200: #EBE7DD;
  --warm-gray-300: #D4CFC1;
  --warm-gray-600: #6B6658;
  --warm-gray-700: #4D4942;
  --warm-gray-900: #2D2821;

  /* Gradients */
  --gradient-sunset: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 50%, #FF8B5A 100%);
  --gradient-twilight: linear-gradient(135deg, #A8DADC 0%, #D4A5FF 50%, #FFD93D 100%);
  --gradient-warm-light: linear-gradient(135deg, #FFF8E7 0%, #FFFDF7 100%);
}

/* Base Typography - Golos Text (modern Russian font with warmth) */
body {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--warm-gray-900);
  background: var(--cream-bg);
}

/* Emotional serif font for special moments */
.font-spectral {
  font-family: 'Spectral', Georgia, serif;
}

/* Authentication Page Layout - Warm gradient background */
.auth-body {
  background: linear-gradient(135deg,
    #FFE5E5 0%,
    #FFF8E7 25%,
    #E8F4F8 50%,
    #F4E8FF 75%,
    #FFE5E5 100%);
  background-size: 400% 400%;
  animation: gradient-flow 15s ease infinite;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Subtle animated background pattern */
.auth-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(168, 218, 220, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 217, 61, 0.06) 0%, transparent 50%);
  animation: breathe 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* Container with depth */
.auth-container {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Warm, inviting card design with organic shapes */
.auth-card {
  background: var(--cream-card);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 248, 231, 0.95) 100%);
  border-radius: 32px;
  box-shadow:
    0 20px 60px -10px rgba(255, 107, 107, 0.15),
    0 10px 30px -5px rgba(168, 218, 220, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* Warm glow effect on hover */
.auth-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.auth-card:hover::before {
  opacity: 1;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 30px 80px -10px rgba(255, 107, 107, 0.2),
    0 15px 40px -5px rgba(168, 218, 220, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Brand styling - warm and characterful */
.auth-brand {
  font-family: 'Golos Text', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
}

/* Subtle shimmer animation on brand */
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.auth-brand {
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* Form inputs - organic, warm feel */
.auth-input {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--warm-gray-200);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Golos Text', sans-serif;
  color: var(--warm-gray-900);
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.auth-input:focus {
  border-color: var(--coral-warm);
  background: white;
  box-shadow:
    0 0 0 4px rgba(255, 107, 107, 0.12),
    0 4px 12px rgba(255, 107, 107, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.auth-input::placeholder {
  color: var(--warm-gray-300);
  font-style: italic;
}

/* Error state with warm red */
.auth-input.border-red-500,
.field_with_errors .auth-input {
  border-color: var(--warm-red);
  background: rgba(255, 235, 235, 0.5);
}

.auth-input.border-red-500:focus,
.field_with_errors .auth-input:focus {
  border-color: var(--warm-red);
  box-shadow:
    0 0 0 4px rgba(230, 57, 70, 0.12),
    0 4px 12px rgba(230, 57, 70, 0.08);
}

/* Primary button - warm gradient with personality */
.auth-button {
  background: var(--gradient-sunset);
  background-size: 200% auto;
  color: white;
  font-family: 'Golos Text', sans-serif;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(255, 107, 107, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Button shimmer on hover */
.auth-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.auth-button:hover::before {
  width: 300px;
  height: 300px;
}

.auth-button:hover {
  background-position: right center;
  box-shadow:
    0 12px 30px rgba(255, 107, 107, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.auth-button:active {
  transform: translateY(0) scale(0.98);
}

.auth-button:disabled {
  background: var(--warm-gray-200);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Links - warm and inviting */
.auth-link {
  color: var(--coral-warm);
  font-family: 'Golos Text', sans-serif;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

/* Animated underline */
.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-sunset);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-link:hover::after {
  width: 100%;
}

.auth-link:hover {
  color: var(--sunset-orange);
}

/* Flash messages - warm and organic */
.auth-alert {
  border-left: 4px solid var(--warm-red);
  background: linear-gradient(135deg, rgba(255, 235, 235, 0.9) 0%, rgba(254, 242, 242, 0.9) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.1);
  animation: slide-in-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-notice {
  border-left: 4px solid var(--sage-green);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.9) 0%, rgba(220, 252, 231, 0.9) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(149, 213, 178, 0.1);
  animation: slide-in-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Validation error messages */
.validation-error {
  color: var(--warm-red);
  font-family: 'Golos Text', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  animation: shake 0.4s ease;
}

/* Form field errors wrapper */
.field_with_errors {
  display: contents;
}

/* Enhanced Animations */
@keyframes slide-in-bounce {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 107, 107, 0.5); }
}

/* Utility animation classes */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Decorative elements for warmth */
.decorative-circle {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  position: absolute;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.decorative-circle-1 {
  background: var(--coral-warm);
  top: -200px;
  left: -200px;
}

.decorative-circle-2 {
  background: var(--soft-purple);
  bottom: -200px;
  right: -200px;
  animation-delay: -4s;
}

.decorative-circle-3 {
  background: var(--peach-glow);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}

/* Responsive design */
@media (max-width: 640px) {
  .auth-brand {
    font-size: 2rem;
  }

  .auth-card {
    border-radius: 24px;
    margin: 16px;
  }

  .decorative-circle {
    width: 300px;
    height: 300px;
  }
}

/* Smooth, organic transitions */
* {
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scrollbar styling for warmth */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--cream-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--coral-warm) 0%, var(--sunset-orange) 100%);
  border-radius: 6px;
  border: 2px solid var(--cream-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--sunset-orange) 0%, var(--peach-glow) 100%);
}
