
.form-container {
    background: white;
    border-radius: 10px;
    padding: 40px;
    margin: 50px auto;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="code"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus,
.form-group input[type="code"]:focus {
    outline: none;
    border-color: #f54900;
}
.form-group button[type="send-code-btn"]{
    border: none;
    background-color: white;
    color: #333;
    transition: color 0.2s;
}
.form-group button[type="send-code-btn"]:hover{
    color: #f54900;
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: normal;
}

.forgot-password {
    color: #f54900;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #d14000;
}

.form-group label input[type="checkbox"] {
    margin-right: 8px;
}

.form-group a {
    color: #f54900;
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-group a:hover {
    color: #d14000;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: #f54900;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #d14000;
}


.switch-form {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.switch-form p {
    color: #666;
}

.switch-form a {
    color: #f54900;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.switch-form a:hover {
    color: #d14000;
}

/* Адаптивность */
@media (max-width: 768px) {
    .form-container {
        margin: 30px auto;
        padding: 30px 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .form-container h2 {
        font-size: 24px;
    }
.modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 9999; /* Очень высокий z-index для перекрытия всех элементов */
            justify-content: center;
            align-items: center;
        }
        
        /* Убедимся, что header имеет более низкий z-index */
        .header {
            position: relative;
            z-index: 100; /* Стандартный z-index для header */
        }
        
        .modal-content {
            background-color: white;
            border-radius: 10px;
            width: 90%;
            max-width: 450px;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 10000; /* Выше чем overlay */
            padding: 40px 30px 30px 30px;
            animation: modalAppear 0.3s ease-out;
        }
        
        @keyframes modalAppear {
            from {
                opacity: 0;
                transform: translateY(-30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        .close-modal {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            cursor: pointer;
            color: #666;
            background: none;
            border: none;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s;
            z-index: 10001;
        }
        
        .close-modal:hover {
            background-color: #f0f0f0;
            color: #333;
            transform: rotate(90deg);
        }
        
        .form-container {
            width: 100%;
        }
        
        .form-container h2 {
            margin-top: 0;
            margin-bottom: 25px;
            color: #333;
            text-align: center;
        }
        
        /* Стилизация кнопок в формах */
        .form-container button[type="submit"] {
            width: 100%;
            padding: 14px;
            background-color: #f54900;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s;
            margin-top: 20px;
        }
        
        .form-container button[type="submit"]:hover {
            background-color: #f54900;
        }
        
        /* Когда модальное окно открыто, body получает класс */
        body.modal-open {
            overflow: hidden;
            height: 100vh;
        }
        
        /* Усилим затемнение для header */
        .modal-overlay.active {
            display: flex;
        }
        
        /* Адаптивные стили */
        @media (max-width: 768px) {
            .modal-content {
                width: 95%;
                padding: 30px 20px 20px 20px;
                max-height: 90vh;
                margin: 10px;
            }
            
            .close-modal {
                top: 10px;
                right: 15px;
                font-size: 24px;
                width: 32px;
                height: 32px;
            }
        }
        
        @media (max-width: 480px) {
            .modal-content {
                width: 100%;
                height: 100vh;
                max-height: 100vh;
                border-radius: 0;
                margin: 0;
                padding: 25px 15px 15px 15px;
            }
            
            .close-modal {
                top: 15px;
                right: 15px;
                background-color: rgba(255, 255, 255, 0.9);
            }
        }
        /* Дополнительные стили для модального окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content-login {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10000;
    padding: 40px 30px 30px 30px;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10001;
}

.close-modal:hover {
    background-color: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
}

.send-code {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #f54900;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.send-code:hover {
    background-color: #d43f00;
}

.send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #f54900;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.login-submit-btn:hover {
    background-color: #d43f00;
}
.login-container {
                display: flex;
                justify-content: center;
                align-items: center;
                min-height: 80vh;
                padding: 20px;
            }

            .login-box {
                max-width: 400px;
                width: 100%;
                padding: 40px;
                background: white;
                border-radius: 16px;
                box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            }

                .login-box h2 {
                    text-align: center;
                    margin-bottom: 30px;
                    color: #333;
                }

            .form-group {
                margin-bottom: 20px;
            }

                .form-group label {
                    display: block;
                    margin-bottom: 8px;
                    font-weight: 600;
                    color: #333;
                }

            .form-control {
                width: 100%;
                padding: 12px 15px;
                border: 2px solid #e0e0e0;
                border-radius: 8px;
                font-size: 16px;
                box-sizing: border-box;
            }

                .form-control:focus {
                    outline: none;
                    border-color: #f54900;
                }

            .btn-submit {
                width: 100%;
                padding: 14px;
                background-color: #f54900;
                color: white;
                border: none;
                border-radius: 8px;
                font-size: 16px;
                font-weight: 600;
                cursor: pointer;
                margin-top: 10px;
            }

                .btn-submit:hover {
                    background-color: #d43f00;
                }

            .error-message {
                color: #dc3545;
                text-align: center;
                margin-bottom: 20px;
                padding: 10px;
                background: #fff8f8;
                border-radius: 8px;
            }

            .register-link {
                text-align: center;
                margin-top: 20px;
                padding-top: 15px;
                border-top: 1px solid #e0e0e0;
            }

                .register-link a {
                    color: #f54900;
                    text-decoration: none;
                }

                    .register-link a:hover {
                        text-decoration: underline;
                    }    

}