:root {
  --font1: 'Comfortaa', sans-serif;
  --font2: 'Roboto', sans-serif;
  --main-color: #AF1536;
  --background-color: #F6F6F6;
  --menu-text-color: #767676;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--background-color);
  font-family: var(--font2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.auth-box {
  background-color: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

h2 {
  font-family: var(--font1);
  color: var(--main-color);
  margin-bottom: 10px;
  font-size: 28px;
}

.subtitle {
  color: var(--menu-text-color);
  font-size: 15px;
  margin-bottom: 25px;
}

input[type="email"],
input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  font-family: var(--font2);
}

.password-wrapper {
  position: relative;
}

button {
  width: 100%;
  padding: 14px;
  background-color: var(--main-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  font-family: var(--font2);
  transition: background 0.3s ease;
}

button:hover {
  background-color: #91122d;
}

.error-message {
  color: #e53935;
  margin-bottom: 15px;
  display: none;
  font-size: 14px;
}

.register-text {
  font-size: 14px;
  color: var(--menu-text-color);
  margin-top: 20px;
}

.register-text a {
  color: var(--main-color);
  text-decoration: none;
  font-weight: bold;
}

.register-text a:hover {
  text-decoration: underline;
}

/* Уже есть базовые стили для input */
input[type="text"],
input[type="email"],
input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  font-family: var(--font2);
  transition: border-color 0.3s ease;
}

input.invalid {
  border-color: #e53935;
  background-color: #ffe6e6;
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 13%;
  cursor: pointer;
  font-size: 20px;
  color: var(--menu-text-color);
}

.error {
  color: #ff0000;
  font-size: 14px;
  margin-top: -10px;
  margin-bottom: 15px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  padding: 0 5%;
  box-sizing: border-box;

}

.logo {
  font-family: var(--font1);
  font-size: 24px;
  font-weight: bold;
  color: var(--menu-text-color);
}

.header nav {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.header nav a {
  position: relative;
  font-family: var(--font2);
  font-size: 24px;
  text-decoration: none;
  color: var(--menu-text-color);
  transition: color 0.3s ease;
}

.header nav a:hover {
  color: var(--main-color);
}

.header nav a:hover::after {
  width: 100%;
}

.header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--main-color);
  transition: width 0.3s ease;
}

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.burger span {
  width: 30px;
  height: 3px;
  background: var(--menu-text-color);
  transition: 0.3s;
}

/* Меню скрыто */
@media (max-width: 800px) {
  .nav {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 80px);
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    transition: 0.3s ease;
    justify-content: flex-start !important;
  }

  .nav.active {
    right: 0;
  }

  .burger {
    display: flex;
  }
}

/* Анимация бургера */
.burger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}