* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основные стили для body */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Анимированные частицы фона */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 204, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(106, 17, 203, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 117, 252, 0.15) 0%, transparent 50%);
    animation: float 20s infinite linear;
}

/* Контейнер для формы */
.login-container {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 20px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation:
        fadeInUp 0.8s ease-out,
        containerGlow 4s ease-in-out infinite alternate;
    margin: 20px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Эффект бликов на контейнере */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
    z-index: -1;
}

.login-container:hover::before {
    left: 100%;
}

/* Заголовок формы */
.login-header {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #ffcc00, #ffaa00);
    border-radius: 2px;
    animation: expandWidth 1s ease-out 0.5s both;
}

/* Форма */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Группа полей формы */
.form-group {
    position: relative;
}

/* Поля ввода */
.input {
    width: 85%;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input:focus {
    border-color: #ffcc00;
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 5px 20px rgba(255, 204, 0, 0.25),
        0 0 0 3px rgba(255, 204, 0, 0.1);
    transform: translateY(-2px);
}

.input:focus::placeholder {
    transform: translateX(10px);
    opacity: 0;
}

/* Иконки внутри полей ввода */
.form-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.input:focus + i {
    color: #ffcc00;
    transform: translateY(-50%) scale(1.1);
}

/* Строка с "Reset password" и "Remember me" */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Ссылка "Reset password" */
.reset-password a {
    color: #ffcc00;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.reset-password a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffcc00;
    transition: width 0.3s ease;
}

.reset-password a:hover {
    color: white;
}

.reset-password a:hover::after {
    width: 100%;
}

/* Чекбокс "Remember me" */
.remember-me {
    display: flex;
    align-items: center;
}

.remember-me label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
}

.remember-me input[type="checkbox"]:checked {
    background: #ffcc00;
    border-color: #ffcc00;
}

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6a11cb;
    font-weight: bold;
    font-size: 12px;
}

.remember-me input[type="checkbox"]:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2);
}

/* Кнопка для входа */
.login-button {
    background: linear-gradient(135deg, #ffcc00, #ffaa00);
    color: #6a11cb;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 6px 20px rgba(255, 204, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-button:hover::after {
    width: 300px;
    height: 300px;
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 30px rgba(255, 204, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #6a11cb;
}

.login-button:active {
    transform: translateY(-1px);
}

/* Ссылка "Don't have an account?" */
.no-account {
    margin-top: 20px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeIn 1s ease-in-out 0.8s both;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.no-account a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.no-account a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffcc00;
    transition: width 0.3s ease;
}

.no-account a:hover {
    color: white;
}

.no-account a:hover::after {
    width: 100%;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes containerGlow {
    0% {
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 15px 35px rgba(106, 17, 203, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    100% {
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 50px; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для валидации */
.input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.input.success {
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.validation-message {
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
    padding-left: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.validation-message.error {
    color: #ff6b6b;
}

.validation-message.success {
    color: #4ecdc4;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 15px;
        border-radius: 15px;
        backdrop-filter: blur(15px);
    }

    .login-header {
        font-size: 2rem;
    }

    .input {
        padding: 12px 40px 12px 15px;
        width: 80%;
    }

    .form-group i {
        font-size: 1rem;
        right: 15px;
    }

    .login-button {
        padding: 14px;
        font-size: 1rem;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .reset-password, .remember-me {
        margin: 0;
    }

    .login-body::before {
        animation: float 30s infinite linear;
    }
}

/* Плавное появление элементов формы */
.login-form > * {
    animation: slideIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.login-form > *:nth-child(1) { animation-delay: 0.1s; }
.login-form > *:nth-child(2) { animation-delay: 0.2s; }
.login-form > *:nth-child(3) { animation-delay: 0.3s; }
.login-form > *:nth-child(4) { animation-delay: 0.4s; }
.login-form > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Эффект загрузки для кнопки */
.login-button.loading {
    pointer-events: none;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #6a11cb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}