body {
    background-color: #121212; /* Черный */
    color: #fff; /* Белый */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #333; /* Темно-серый */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    width: 350px;
    max-width: 90vw;
    position: relative;
}

h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #fff;
}

input[type="email"],
input[type="password"],
input[type="submit"],
input[type="text"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    background-color: #444; /* Темно-серый */
    color: #fff; /* Белый */
    box-sizing: border-box;
}

input[type="password"],
input[type="email"],
input[type="text"] {
    border: 2px solid #555;
    transition: border-color 0.3s;
    padding-right: 40px; /* Для иконки глаза */
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #8F00FF;
    outline: none;
}

input[type="submit"] {
    background-color: #8F00FF; /* Фиолетовый */
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    border: none;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #a200ff; /* Более светлый фиолетовый при наведении */
}

text {
    color: #777;
    font-size: 14px;
    margin-top: 15px;
    display: block;
}

text2 {
    position: relative;
    top: 10px;
    display: block;
    text-align: center;
    margin-top: 20px;
}

text2 a {
    cursor: pointer;
    text-decoration: none;
    color: #a200ff;
    font-weight: bold;
    transition: color 0.3s;
}

text2 a:hover {
    color: #c266ff;
    text-decoration: underline;
}

/* Стили для сообщений */
.error {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    text-align: center;
}

.success {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    text-align: center;
}

/* Стили для иконки показа пароля */
.password-container {
    position: relative;
    width: 100%;
}

.password-control {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: #777 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center;
    background-size: 20px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.password-control:hover {
    background-color: #8F00FF;
}

.password-control.view {
    background: #8F00FF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>') no-repeat center;
    background-size: 20px;
}

/* Стили для капчи (если будет добавлена на страницу авторизации) */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 5px;
    border: 1px solid #444;
}

.captcha-code {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 5px;
    background: #444;
    padding: 10px 15px;
    border-radius: 5px;
    user-select: none;
    color: #fff;
    flex-grow: 1;
    text-align: center;
}

.refresh-captcha {
    cursor: pointer;
    color: #8F00FF;
    font-size: 20px;
    padding: 5px;
    transition: color 0.3s;
}

.refresh-captcha:hover {
    color: #a200ff;
}

/* Стили для чекбоксов и радио-кнопок */
.remember-me {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: #ccc;
}

.remember-me input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #8F00FF;
}

.remember-me label {
    cursor: pointer;
    font-size: 14px;
}

/* Стили для ссылки "Забыли пароль?" */
.forgot-password {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    color: #a200ff;
    font-weight: bold;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #c266ff;
    text-decoration: underline;
}

/* Стили для разделителя */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #777;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #555;
}

.separator span {
    padding: 0 15px;
    font-size: 14px;
}

/* Стили для социальных кнопок */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 5px;
    background: #444;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.social-btn:hover {
    border-color: #8F00FF;
    background: #555;
}

.social-btn.google::before {
    content: 'G';
    background: #DB4437;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.social-btn.github::before {
    content: 'Git';
    background: #333;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* Адаптивность */
@media (max-width: 400px) {
    .container {
        padding: 20px;
        width: 90vw;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .social-btn {
        font-size: 14px;
    }
}

/* Валидационные сообщения */
input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ff6b6b;
}

input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #4CAF50;
}

/* Анимация для сообщений */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error,
.success {
    animation: fadeIn 0.3s ease-out;
}

/* Стиль для логотипа */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8F00FF, #a200ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

/* Дополнительные стили для формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
}

/* Стиль для ссылки "Назад" на странице авторизации */
.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    cursor: pointer;
    text-decoration: none;
    color: #a200ff;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 14px;
}

.back-link:hover {
    color: #c266ff;
    text-decoration: underline;
}