.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #064420 0%, #f58220 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    background: none;
    border: none;
}

.close:hover {
    color: #ffeb3b;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.terms-content h3 {
    color: #064420;
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.terms-content p {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.terms-content ul {
    margin: 10px 0 15px 20px;
    color: #333;
}

.terms-content li {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.modal-btn {
    background: #064420;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 68, 32, 0.3);
}

.modal-btn:hover {
    background: #f58220;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 130, 32, 0.4);
}

.terms-link {
    color: #064420;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #f58220;
    text-decoration: underline;
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 650px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 10px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media screen and (max-width: 400px) {
    .modal-header {
        padding: 12px 15px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 15px;
    }

    .modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}