/* ========================================
   SKILLTALK AI — Auth page
   ======================================== */

:root {
  --auth-white: #ffffff;
  --auth-black: #0d1117;
  --auth-text: #0d1117;
  --auth-text-muted: #6b7280;
  --auth-border: #e5e7eb;
  --auth-bg: #f8faff;
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Layout ---- */
.auth-page {
  display: flex;
  min-height: 100vh;
  background: var(--auth-bg);
  position: relative;
}

/* ========================================
   БЛОБЫ (левая светлая панель)
   ======================================== */
.auth-bg {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.auth-bg-1 {
  width: 500px; height: 500px;
  top: -15%; left: -10%;
  background: radial-gradient(circle, #93c5fd 0%, #3b82f6 45%, transparent 70%);
  filter: blur(72px);
  opacity: 0.55;
  animation: blobFloat1 20s ease-in-out infinite;
}

.auth-bg-2 {
  width: 380px; height: 380px;
  top: 22%; left: 15%;
  background: radial-gradient(circle, #bfdbfe 0%, #60a5fa 40%, #2563eb 62%, transparent 76%);
  filter: blur(60px);
  opacity: 0.5;
  animation: blobFloat2 24s ease-in-out infinite;
}

.auth-bg-3 {
  width: 420px; height: 420px;
  bottom: -12%; left: 0%;
  background: radial-gradient(circle, #7dd3fc 0%, #38bdf8 50%, transparent 72%);
  filter: blur(70px);
  opacity: 0.52;
  animation: blobFloat3 22s ease-in-out infinite;
}

.auth-bg-4 {
  width: 320px; height: 320px;
  bottom: 22%; left: 28%;
  background: radial-gradient(circle, #a5f3fc 0%, #22d3ee 45%, #0891b2 65%, transparent 78%);
  filter: blur(62px);
  opacity: 0.45;
  animation: blobFloat1 26s ease-in-out infinite reverse;
}

.auth-liquid-1 {
  width: 360px; height: 360px;
  top: 50%; left: 5%;
  background: radial-gradient(circle at 40% 40%, #dbeafe 0%, #93c5fd 38%, #3b82f6 58%, transparent 74%);
  filter: blur(64px);
  opacity: 0.48;
  animation: blobFloat2 18s ease-in-out infinite;
}

.auth-liquid-2 {
  width: 280px; height: 280px;
  top: 8%; left: 32%;
  background: radial-gradient(circle at 55% 45%, #bfdbfe 0%, #60a5fa 48%, transparent 70%);
  filter: blur(55px);
  opacity: 0.44;
  animation: blobFloat3 21s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(28px,-18px) scale(1.04); }
  66%       { transform: translate(-14px, 14px) scale(0.97); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(-22px, 18px) scale(1.03); }
  66%       { transform: translate(18px,-10px) scale(0.97); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%       { transform: translate(18px,-22px) scale(1.05); }
}

/* ========================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ======================================== */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

[data-animate="fade-down"] {
  animation: fadeDown 0.65s cubic-bezier(0.22,1,0.36,1) both;
}
[data-animate="fade-up"] {
  animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.15s both;
}
[data-animate="fade-up-delay"] {
  animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.35s both;
}
[data-animate="brand-1"] {
  animation: slideRight 0.6s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
[data-animate="brand-2"] {
  animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.2s both;
}
[data-animate="brand-3"] {
  animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.35s both;
}
[data-animate="brand-4"] {
  animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) 0.48s both;
}

/* ========================================
   ЛЕВАЯ ПАНЕЛЬ — форма
   ======================================== */
.auth-form-panel {
  flex: 1;
  min-width: 0;
  background: rgba(248, 250, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  padding: 28px 52px 36px;
  position: relative;
  z-index: 1;
}

.auth-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 52px;
}

.auth-header-badge {
  padding: 16px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,248,255,0.75));
  box-shadow: 0 10px 30px rgba(59,130,246,0.13), inset 0 1px 0 rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1e3a5f;
  white-space: nowrap;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-header-badge:hover {
  box-shadow: 0 14px 36px rgba(59,130,246,0.2), inset 0 1px 0 rgba(255,255,255,0.85);
  transform: translateY(-1px);
}

.auth-header-badge-ai {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Контент формы ---- */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 8vh;
}

.auth-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--auth-black);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-title--hero {
  font-size: 3rem;
  margin-bottom: 14px;
}

.auth-subtitle {
  font-size: 1rem;
  color: var(--auth-text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.auth-subtitle--hero {
  font-size: 1.15rem;
  margin-bottom: 40px;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Кнопки ---- */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
  text-decoration: none;
  border: none;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.auth-btn--primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(30,58,138,0.4);
}
.auth-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(30,58,138,0.55);
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #1d4ed8 100%);
}
.auth-btn--primary:active {
  transform: translateY(0);
}

.auth-btn--hero {
  padding: 18px 28px;
  font-size: 1.1rem;
  border-radius: 16px;
}

/* ---- Переключатель ---- */
.auth-switch-link {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--auth-text-muted);
}
.auth-switch-link a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.auth-switch-link a:hover { opacity: 0.75; }

/* ---- Footer ---- */
.auth-footer {
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  line-height: 1.5;
  text-align: center;
}
.auth-footer a { color: var(--auth-text-muted); text-decoration: underline; }
.auth-footer a:hover { color: var(--auth-black); }

/* ---- Блоки форм ---- */
.auth-form-block { display: none; }
.auth-form-block.is-active { display: block; }

.auth-form .field, .field {
  display: block;
  margin-bottom: 16px;
}
.auth-form .field span, .field span {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.auth-form input, .field input, input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--auth-black);
}
.auth-form input:focus, .field input:focus,
input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
input::placeholder { color: #9ca3af; }

.submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 15px 24px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(30,58,138,0.4);
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
  letter-spacing: -0.01em;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(30,58,138,0.55);
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #1d4ed8 100%);
}

.auth-error {
  font-size: 0.875rem;
  color: #ef4444;
  margin-bottom: 12px;
  min-height: 1.25rem;
  font-weight: 500;
}

/* ========================================
   ПРАВАЯ ПАНЕЛЬ — тёмная с блобами и текстом
   ======================================== */
.auth-brand-panel {
  flex: 0 0 45%;
  min-width: 320px;
  background: linear-gradient(155deg, #0a1628 0%, #0f2040 45%, #162e57 100%);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Пульсация блобов */
@keyframes blobPulse1 {
  0%, 100% { transform: scale(1);    opacity: 0.48; }
  50%       { transform: scale(1.12); opacity: 0.62; }
}
@keyframes blobPulse2 {
  0%, 100% { transform: scale(1);    opacity: 0.42; }
  50%       { transform: scale(1.1);  opacity: 0.56; }
}
@keyframes blobPulse3 {
  0%, 100% { transform: scale(1);    opacity: 0.36; }
  50%       { transform: scale(1.15); opacity: 0.52; }
}

/* Блобы на тёмной панели */
.auth-brand-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-blob-1 {
  width: 520px; height: 520px;
  top: -20%; right: -22%;
  background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 40%, transparent 68%);
  filter: blur(80px);
  opacity: 0.48;
  animation: blobPulse1 7s ease-in-out infinite;
}

.auth-brand-blob-2 {
  width: 440px; height: 440px;
  bottom: -18%; left: -18%;
  background: radial-gradient(circle, #0ea5e9 0%, #0284c7 42%, transparent 70%);
  filter: blur(72px);
  opacity: 0.42;
  animation: blobPulse2 9s ease-in-out infinite;
}

.auth-brand-blob-3 {
  width: 340px; height: 340px;
  top: 38%; right: 2%;
  background: radial-gradient(circle, #38bdf8 0%, #0369a1 48%, transparent 72%);
  filter: blur(64px);
  opacity: 0.36;
  animation: blobPulse3 6s ease-in-out infinite;
}

/* Контент */
.auth-brand-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 52px;
}

.auth-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 22px;
}
.auth-brand-eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
}

.auth-brand-heading {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.16;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.auth-brand-heading-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand-text {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(186, 216, 245, 0.8);
  font-weight: 400;
  max-width: 340px;
  margin-bottom: 38px;
}

.auth-brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-brand-features li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 0.9375rem;
  color: rgba(209, 232, 248, 0.9);
  font-weight: 400;
  line-height: 1.4;
}
.auth-brand-feature-icon {
  font-size: 0.85rem;
  color: #60a5fa;
  flex-shrink: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 24px 28px 32px; }
  .auth-header-row { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 20px 20px 24px; }
  .auth-title { font-size: 1.7rem; }
}

/* ========================================
   PROFILE PAGE (использует auth.css)
   ======================================== */
.liquid-bg { display: none; }

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--auth-white);
}
.auth-panel {
  max-width: 400px;
  width: 100%;
  padding: 32px;
  background: var(--auth-white);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
}
.auth-header { margin-bottom: 24px; }
.auth-header .brand-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--auth-text-muted);
  margin-bottom: 8px;
}
.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auth-black);
  margin-bottom: 4px;
}
.auth-header p { font-size: 0.9375rem; color: var(--auth-text-muted); }
.profile-info { margin-bottom: 24px; }
