:root {
    --main-color: #29D852;
    --main-color-dark: #24c048;
    --gray-btn-color: #f1f1f1;
    --gray-btn-border: #ccc;
    --gray-btn-text: #333;
}

.terms-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 10px;
}

.terms-modal.show {
    display: flex;
    opacity: 1;
}

.terms-modal-content {
    background-color: #fefefe;
    width: 95%;
    max-width: 700px;

    height: 70%;
    max-height: 70%;

    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-50px);
    transition: transform 0.3s ease-in-out;

    display: flex;
    flex-direction: column;
}

.terms-modal.show .terms-modal-content {
    transform: translateY(0);
}

.terms-modal-header {
    padding: 18px 20px;
    background-color: var(--main-color);
    color: white;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.terms-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: lighter;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px;
    opacity: 0.9;
}

.terms-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

.terms-scroll-area {
    flex-grow: 1;
}

.terms-modal-footer {
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    flex-shrink: 0;
    background-color: #fefefe;

    margin-left: -25px;
    margin-right: -25px;
    padding-left: 25px;
    padding-right: 25px;
}

.terms-btn-close {
    background-color: var(--gray-btn-color);
    color: var(--gray-btn-text);
    border: 1px solid var(--gray-btn-border);
    width: 100%;

    max-width: 150px;
    padding: 10px 40px;
    font-size: 16px;

    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, border-color 0.2s;
}

.terms-btn-close:hover {
    background-color: #e6e6e6;
    border-color: #bbb;
}

.terms-scroll-area p, .terms-scroll-area ul, .terms-scroll-area li {
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
}
.term-title {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
}
.term-section {
    margin-top: 15px;
    padding-bottom: 5px;
}
.section-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .terms-modal {
        padding: 5px;
    }

    .terms-modal-content {
        width: 100%;
        height: 80%;
        max-height: 80%;
    }

    .terms-modal-body {
        padding: 15px;
    }

    .terms-modal-header {
        font-size: 18px;
        padding: 15px 10px;
    }

    .terms-close-btn {
        font-size: 28px;
    }

    .terms-modal-footer {
        padding: 15px;
        margin-left: -15px;
        margin-right: -15px;
    }

    .terms-btn-close {
        max-width: 200px;
        width: 100%;
        padding: 10px 30px;
        font-size: 15px;
    }
}