* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    background-image: url('/frontend/images/background1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.window {
    width: 40vw;
    aspect-ratio: 16 / 9;
    background-color: #EBEBEB;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    
    /* Включаем flex для разделения на две части вертикально */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Верхняя половина - строго 50% */
.top-half {
    height: 50%;
    min-height: 50%;
    max-height: 50%;
    background-color: #EBEBEB;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
}

/* Нижняя половина - строго 50% */
.bottom-half {
    height: 50%;
    min-height: 50%;
    max-height: 50%;
    background-color: #EBEBEB;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Контейнер для контента нижней части */
.bottom-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 15%;
    position: relative;
}

/* Контейнер для контента верхней части */
.top-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

/* Заголовок "Авторизация" */
.title {
    font-family: 'Unbounded', Arial, sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #002A7F;
    padding-top: 4vh;
    flex-shrink: 0;
    margin-bottom: auto; /* Отталкивает контейнеры от заголовка */
}

/* Контейнеры полей ввода */
.input-container {
    border-radius: 10px;
    width: 70%;
    height: 22%;
    background-color: #FFFFFF;
    border: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px; /* Расстояние между иконкой и полем ввода */
}

/* Иконки внутри контейнеров */
.input-icon {
    width: auto;
    height: 67%;
    flex-shrink: 0;
    /* Красим SVG через filter */
    filter: brightness(0) saturate(100%) invert(46%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(85%);
}

/* Поля ввода внутри контейнеров */
.input-field {
    flex: 1; /* Занимает всё оставшееся место */
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    color: #7A7A7A;
}

/* Стили для плейсхолдера */
.input-field::placeholder {
    color: #7A7A7A;
    font-size: 16px;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Верхний контейнер - отталкивается от заголовка */
.input-container:first-of-type {
    margin-top: 0;
}

/* Нижний контейнер - прилегает к низу */
.input-container:last-of-type {
    margin-top: auto; /* Прижимает к низу */
    margin-bottom: 0;
}

/* Кнопка "Войти" */
.login-button {
    width: 25%;
    height: 20%;
    background-color: #0055FF;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 10px; /* Отступ от текста */
}

/* Эффект при наведении */
.login-button:hover {
    background-color: #0044CC;
}

/* Эффект при нажатии */
.login-button:active {
    background-color: #0033AA;
}

/* Текст под кнопкой */
.info-text {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #7A7A7A;
    text-align: center;
    line-height: 1.5;
    margin-top: 0;
    max-width: 100%;
}

/* Ссылка в тексте */
.info-link {
    color: #0055FF;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

/* Эффект при наведении на ссылку */
.info-link:hover {
    color: #0044CC;
}

/* ========== АДАПТИВНОСТЬ ========== */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1200px) {
    .window {
        width: 50vw;
    }
    
    .title {
        font-size: 24px;
        padding-top: 3vh;
    }
    
    .input-container {
        width: 75%;
        padding: 0 12px;
        gap: 8px;
    }
    
    .input-field {
        font-size: 14px;
    }
    
    .input-field::placeholder {
        font-size: 14px;
    }
    
    .login-button {
        width: 30%;
        font-size: 14px;
    }
    
    .info-text {
        font-size: 12px;
    }
}

/* Большие планшеты */
@media (max-width: 992px) {
    .window {
        width: 60vw;
    }
    
    .title {
        font-size: 22px;
        padding-top: 2vh;
    }
    
    .input-container {
        width: 80%;
        padding: 0 10px;
        gap: 8px;
    }
    
    .input-field {
        font-size: 14px;
    }
    
    .input-field::placeholder {
        font-size: 14px;
    }
    
    .bottom-content {
        padding: 0 12%;
    }
}

/* Телефоны и маленькие планшеты */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .window {
        width: 85vw;
        border-radius: 12px;
    }
    
    .title {
        font-size: 20px;
        padding-top: 2vh;
    }
    
    .input-container {
        width: 85%;
        padding: 0 10px;
        gap: 6px;
        border-radius: 8px;
    }
    
    .input-field {
        font-size: 14px;
    }
    
    .input-field::placeholder {
        font-size: 14px;
    }
    
    .bottom-content {
        padding: 0 10%;
    }
    
    .login-button {
        width: 40%;
        height: 18%;
        font-size: 14px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .info-text {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .window {
        width: 95vw;
        border-radius: 10px;
    }
    
    .title {
        font-size: 16px;
        padding-top: 1.5vh;
    }
    
    .input-container {
        width: 90%;
        padding: 0 8px;
        gap: 5px;
        border-radius: 6px;
        height: 20%;
    }
    
    .input-field {
        font-size: 12px;
    }
    
    .input-field::placeholder {
        font-size: 12px;
    }
    
    .bottom-content {
        padding: 0 8%;
    }
    
    .login-button {
        width: 50%;
        height: 16%;
        font-size: 12px;
        border-radius: 6px;
        margin-bottom: 6px;
    }
    
    .info-text {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .input-icon {
        height: 55%;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 360px) {
    .window {
        width: 98vw;
        border-radius: 8px;
    }
    
    .title {
        font-size: 14px;
        padding-top: 1vh;
    }
    
    .input-container {
        width: 95%;
        padding: 0 6px;
        gap: 4px;
        border-radius: 5px;
        height: 18%;
    }
    
    .input-field {
        font-size: 11px;
    }
    
    .input-field::placeholder {
        font-size: 11px;
    }
    
    .login-button {
        width: 55%;
        height: 14%;
        font-size: 11px;
        border-radius: 5px;
    }
    
    .info-text {
        font-size: 9px;
    }
    
    .input-icon {
        height: 50%;
    }
}

/* Высокие экраны (телефоны в портретной ориентации) */
@media (max-height: 600px) {
    .window {
        width: 60vw;
    }
    
    .title {
        font-size: 18px;
        padding-top: 1vh;
    }
    
    .input-container {
        height: 18%;
    }
    
    .login-button {
        height: 16%;
    }
}

/* Очень высокие экраны */
@media (max-height: 400px) {
    .window {
        width: 50vw;
    }
    
    .title {
        font-size: 14px;
        padding-top: 0.5vh;
    }
    
    .input-container {
        height: 15%;
        padding: 0 6px;
        gap: 4px;
    }
    
    .input-field {
        font-size: 11px;
    }
    
    .input-field::placeholder {
        font-size: 11px;
    }
    
    .login-button {
        height: 14%;
        font-size: 11px;
    }
    
    .info-text {
        font-size: 9px;
    }
    
    .bottom-content {
        padding: 0 10%;
    }
}

/* ========== ГЛАЗОК ДЛЯ ПАРОЛЯ ========== */

.eye-icon {
    width: auto;
    height: 67%;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    filter: brightness(0) saturate(100%) invert(46%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(85%);
}

.eye-icon:hover {
    opacity: 1;
}

/* Адаптив для глазка */
@media (max-width: 480px) {
    .eye-icon {
        height: 45%;
    }
}

@media (max-width: 360px) {
    .eye-icon {
        height: 40%;
    }
}