.auth-container {
    max-width: 1100px;
    margin: 70px auto 2rem;
    padding: 2.5rem 3rem;
    background: rgba(10, 20, 40, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 90%;
    box-sizing: border-box;
    max-height: 85vh;
    overflow-y: auto;
}

.auth-form h1 {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.auth-form h3 {
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Горизонтальная раскладка для десктопа */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-column {
    flex: 1;
    min-width: 250px;
}

.form-group {
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 500;
    width: 100%;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    min-height: 42px;
}

.form-group input:focus {
    outline: none;
    border-color: #4fc3f7;
    background: rgba(255, 255, 255, 0.15);
}

.password-input {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

.form-group small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    line-height: 1.3;
    font-family: 'Montserrat', sans-serif;
    flex-grow: 1;
}

.error-message {
    color: #f44336;
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    min-height: 1rem;
    font-family: 'Montserrat', sans-serif;
}

/* Стили для статусов доступности */
.availability-status {
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    min-height: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s;
}

.availability-status.available {
    color: #4caf50;
}

.availability-status.unavailable {
    color: #f44336;
}

.btn-primary {
    width: 100%;
    padding: 0.85rem;
    background: #4fc3f7;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    margin-top: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.btn-primary:hover {
    background: #29b6f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 182, 246, 0.3);
}

.btn-primary:disabled {
    background: #90caf9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.message.success {
    background: rgba(76, 175, 80, 0.25);
    color: #4caf50;
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.message.error {
    background: rgba(244, 67, 54, 0.25);
    color: #f44336;
    border-color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

.message.info {
    background: rgba(33, 149, 243, 0.2);
    color: #2196f3;
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 149, 243, 0.2);
}

/* Стили для ссылки на регистрацию */
.auth-redirect {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

.auth-redirect a {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: 500;
}

.auth-redirect a:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.remember-me {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.forgot-password {
    color: #4fc3f7;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Кастомный скроллбар для контейнера */
.auth-container::-webkit-scrollbar {
    width: 6px;
}

.auth-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.auth-container::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.6);
    border-radius: 3px;
}

.auth-container::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.8);
}

/* Анимации для сообщений */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 1200px) {
    .auth-container {
        max-width: 900px;
        padding: 2rem;
    }
    
    .form-row {
        gap: 1rem;
    }
    
    .form-column {
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .auth-container {
        max-width: 700px;
        padding: 1.8rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-column {
        min-width: 100%;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        margin: 60px auto 1rem;
        padding: 1.5rem;
        width: 95%;
        max-height: 80vh;
    }
    
    .auth-form h1 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }
    
    .form-group input {
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group small {
        font-size: 0.7rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .message {
        padding: 0.65rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
        margin: 50px auto 1rem;
        max-height: 75vh;
    }
    
    .auth-form h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .form-group input {
        padding: 0.6rem;
    }
    
    .btn-primary {
        padding: 0.6rem;
    }
    
    .message {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
}

/* Для очень маленьких экранов */
@media (max-height: 600px) {
    .auth-container {
        max-height: 70vh;
        margin: 40px auto 1rem;
    }
}