/* Стили для страницы входа */

body {
    background: #f8f9fa;
    overflow: hidden;
}

.login-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрируем по вертикали, но логотип выбивается из потока */
    justify-content: flex-start; 
}

/* Обертка логотипа */
.logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    z-index: 10;
    will-change: transform, top, opacity;
}

.animated-logo {
    width: 120px;
    height: auto;
    display: block;
}

/* 1. Фаза Зума */
.logo-wrapper.start-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(4);
    transition: transform 2s ease-out, opacity 1s ease-out;
}

/* 2. Фаза Хэдера */
.login-container.header-mode .logo-wrapper {
    top: 140px; 
    transform: translate(-50%, -50%) scale(2.66); 
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Форма входа */
.login-form {
    background: #fff;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    
    /* Отступ сверху */
    margin-top: 320px; 
    z-index: 5;
}

.login-form.visible {
    opacity: 1;
    transform: translateY(0);
}

.input-group {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 120px; /* Увеличил, чтобы влезала ошибка */
    display: flex;
    flex-direction: column;
}

/* Скрытый элемент */
.input-group.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    background: #fdfdfd;
}

.input-group input:focus {
    border-color: #2c3e50;
    background: #fff;
}

/* Стиль ошибки */
.input-group input.error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.error-text {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 4px;
    display: none; /* Скрыт по умолчанию */
}

.btn-login {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}

.btn-login:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(1px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.links {
    display: flex;
    justify-content: center;
    font-size: 14px;
    margin-top: 5px;
}

.links a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px dashed transparent;
}

.links a:hover {
    color: #2c3e50;
    border-bottom-color: #2c3e50;
}
