@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(-45deg, #6ea8fe, #4f7cff, #8b54ff, #ff5f9e);
  background-size: 400% 400%;
  animation: gradientMove 12s ease infinite;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  transition: background 0.4s, color 0.4s;
  overflow: hidden;
}

/* === Цветовые переменные === */
:root {
  --bg: rgba(255, 255, 255, 0.12);
  --text: #222;
  --box-bg: rgba(255, 255, 255, 0.25);
  --accent: #2a6df4;
  --border: rgba(255,255,255,0.3);
}

body.dark {
  --bg: rgba(0,0,0,0.3);
  --text: #e5e7eb;
  --box-bg: rgba(0, 0, 0, 0.45);
  --accent: #478bff;
  --border: rgba(255,255,255,0.1);
  background: linear-gradient(-45deg, #141820, #232b3d, #1b2233, #2f3b55);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

/* === Переключатель темы === */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 1.5em;
  cursor: pointer;
  user-select: none;
  color: white;
  z-index: 10;
  transition: transform 0.3s;
}
.theme-toggle:hover {
  transform: scale(1.15);
}

/* === Контейнер === */
.auth-container {
  background: var(--box-bg);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.2);
  padding: 50px 40px;
  width: 100%;
  max-width: 400px;
  color: var(--text);
  transition: background 0.4s, color 0.4s;
}

.auth-form h1 {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: var(--text);
}

.auth-form h1 span {
  color: var(--accent);
}

.subtitle {
  color: rgba(255,255,255,0.8);
  margin-bottom: 30px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  background: rgba(255,255,255,0.1);
  color: var(--text);
  transition: border-color 0.3s, background 0.3s;
}

input:focus {
  border-color: var(--accent);
  outline: none;
  background: rgba(42, 109, 244, 0.08);
}

/* === Поле с паролем и глаз === */
.password-wrapper {
  position: relative;
}
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.1em;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.toggle-pass:hover {
  opacity: 1;
}

/* === Подвал формы === */
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  margin-top: -5px;
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* === Кнопка === */
button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}
button:hover {
  background: #1f56c0;
  transform: translateY(-1px);
}

/* === Регистрация === */
.register {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: rgba(255,255,255,0.8);
}
.register a {
  color: var(--accent);
  text-decoration: none;
}
.register a:hover {
  text-decoration: underline;
}

/* === Анимации === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeInUp 0.9s ease forwards;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

