/* Общие стили */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%); /* Легкий голубой фон */
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

.login-container {
    background: #fff;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Заголовок */
h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
}

/* Сообщения об ошибке */
.error {
    display: none;
    color: #fff;
    background-color: #e74c3c;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 5px solid #c0392b;
    font-size: 0.95rem;
    animation: fadeIn 0.5s ease-out forwards;
}

.error::before {
    content: "⚠️";
    margin-right: 10px;
    font-size: 1.3rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-size: 1rem;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: #34495e;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

/* Кнопка */
button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: linear-gradient(to right, #2980b9, #3498db);
    transform: translateY(-3px);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(to right, #bdc3c7, #95a5a6);
}

/* Спиннер (крутящийся индикатор) */
.spinner {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        margin: 0 1rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    input {
        font-size: 1.1rem;
    }

    button {
        font-size: 1.1rem;
    }
}
