﻿const style = document.createElement('style');
style.innerHTML = `
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 30px 25px;
    width: 90%;
    max-width: 460px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    animation: fadeIn 0.4s ease-in-out;
    color: #212529;
}

    .modal-content h3,
    .modal-content p,
    .modal-content label {
        color: #212529;
    }

    .modal-content input,
    .modal-content textarea {
        width: 100%;
        padding: 10px 12px;
        margin: 8px 0;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 8px;
        outline: none;
        transition: border-color 0.3s;
    }

        .modal-content input:focus,
        .modal-content textarea:focus {
            border-color: #4a90e2;
        }

    .modal-content button {
        background-color: #007bff;
        color: #fff;
        border: none;
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 8px;
        margin-top: 10px;
        cursor: pointer;
        transition: background 0.3s ease;
    }

        .modal-content button:hover {
            background-color: #0056b3;
        }

ul {
    list-style: none;
    padding-left: 0;
}

    ul li {
        margin: 8px 0;
    }

        ul li a {
            text-decoration: underline;
            color: #007bff;
        }

.hidden {
    display: none;
}

/* 🌙 DARK MODE OVERRIDES */
body.dark-mode .modal-content {
    background: linear-gradient(to right, #1f1f1f, #2b2b2b);
    color: #f1f1f1;
}

    body.dark-mode .modal-content h3,
    body.dark-mode .modal-content p,
    body.dark-mode .modal-content label {
        color: #f1f1f1;
    }

    body.dark-mode .modal-content input,
    body.dark-mode .modal-content textarea {
        background-color: #333;
        color: #eee;
        border: 1px solid #555;
    }

        body.dark-mode .modal-content input:focus,
        body.dark-mode .modal-content textarea:focus {
            border-color: #80bdff;
        }

body.dark-mode ul li a {
    color: #66b3ff;
}

`;
document.head.appendChild(style);
