/* ============================================================
   auth.css - AvtoPick Mustaqil Kirish Sahifasi Stili (Login & Auth)
   Faqat login uchun kerakli eng yengil CSS. Asosiy app kodlari yo'q.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #0B0F19;
  --bg-card: #111827;
  --primary: #38BDF8;
  --primary-hover: #0284C7;
  --primary-gradient: linear-gradient(135deg, #38BDF8 0%, #2563EB 100%);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.3);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 40%);
}

/* Tilni tanlash bloki (Top-Right) */
.auth-lang-switcher {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.auth-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-lang-btn:hover {
  color: #fff;
}

.auth-lang-btn.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* Auth Markaziy Konteyner */
.auth-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-img {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
  display: inline-block;
  transition: transform 0.25s ease;
}

.auth-logo-img:hover {
  transform: scale(1.05);
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

/* 1-Klikda Kirish Tugmalari */
.social-auth-wrapper {
  margin-top: 1.75rem;
}

.social-auth-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-social-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.btn-social-auth svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-social-auth:hover svg {
  transform: scale(1.1);
}

.btn-social-auth:active {
  transform: translateY(1px);
}

.btn-google-auth {
  background: #ffffff !important;
  color: #1f2937 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-google-auth:hover {
  background: #f8fafc !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.btn-telegram-auth {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.btn-telegram-auth:hover {
  background: linear-gradient(135deg, #32b5f8 0%, #25a8e6 100%) !important;
  box-shadow: 0 8px 22px rgba(34, 158, 217, 0.55);
  transform: translateY(-2px);
}

.btn-social-auth:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Toast Bildirishnomalar */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #1E293B;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 4px solid var(--primary);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 380px;
}

.toast.toast-error {
  border-left-color: #EF4444;
}

.toast.toast-success {
  border-left-color: #10B981;
}

.toast.toast-info {
  border-left-color: #38BDF8;
}

.toast.toast-warning {
  border-left-color: #F59E0B;
}

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

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

/* Mobil Moslashuv */
@media (max-width: 480px) {
  .auth-wrapper {
    padding: 1rem;
  }
  .auth-card {
    padding: 2rem 1.25rem;
  }
  .auth-title {
    font-size: 1.4rem;
  }
  .auth-lang-switcher {
    top: 1rem;
    right: 1rem;
  }
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }
  .toast {
    max-width: 100%;
  }
}
