.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 20%;
    width: 100%;
    height: 80%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    z-index: 999;
}

.modal-content {
    background-color: black;
    margin: 10% auto; /* Adjusted top and bottom margin */
    padding: 20px;
    width: 50%;
    border-radius: 5px;
    border: 2px solid blue;
    text-align: center;
    max-height: 38%; /* Reduced max height */
    overflow-y: auto; /* Add scroll for overflow content */
}

.close-button {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.policy-button {
    background-color: blue;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px; /* Reduced bottom margin */
    margin-top: 20px; /* Reduced top margin */
    width: 45%; /* Adjust width for better layout */
}

.policy-button:hover {
    background-color: darkblue;
}

@media screen and (max-width: 600px) {
    .modal-content {
        width: 90%; /* Adjust width for smaller screens */
        margin: 10% auto;
        z-index: 999;
    }

    .policy-button {
        font-size: 14px; /* Adjust font size for smaller screens */
        padding: 8px 15px; /* Adjust padding for smaller screens */
        width: 80%; /* Full-width buttons on smaller screens */
        margin: 10px auto; /* Adjust margins for smaller screens */
        display: block; /* Stack buttons vertically on smaller screens */
        margin-bottom: 20px; /* Reduced bottom margin */
        margin-top: 20px;
    }

    .close-button {
        font-size: 22px; /* Adjust close button size for smaller screens */
    }
}
