:root {
    --modal-bg: rgba(0, 0, 0, 0.7);
    --modal-shadow: 0 25px 50px rgba(0,0,0,0.25);
    --modal-border-radius: 12px;
    --modal-primary-color: #005177;
    --modal-text-color: #333;
    --modal-close-color: #666;
    --modal-close-hover: #000;
    --modal-max-width: 900px;
    --modal-padding: 20px;
    --modal-mobile-padding: 10px;
    --modal-z-index: 9999;
}

/* ===== Trigger Link (existing featured image) ===== */
.nms-modal-popup a {
    position: relative;
    z-index: 10;
}

/* ===== Modal Container ===== */
.nms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--modal-z-index);
    max-width: none!important;
}

.nms-modal-overlay {
    position: absolute;
    top: -25px;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--modal-bg);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--modal-padding);
}

.nms-modal-content {
    background: white;
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    width: 90%;
    max-width: var(--modal-max-width);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-height: 85vh;
    border-bottom: 15px solid white;
}

.nms-modal-close {
    position: absolute;
    top: 0px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--modal-close-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 2;
    padding: 0;
}

.nms-modal-close:hover {
    color: var(--modal-close-hover);
}

.nms-modal-body {
    overflow: auto;
    max-height: 85vh;
    margin-top: 35px;
    padding: 15px 10px 0 15px;
}



.modal-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


.modal-code-title,
.modal-post-title {
    font-size: 1.5em;
    margin: 0;
    line-height: 1.1;
}

.modal-code-title {
    font-weight: bold;
    color: var(--modal-primary-color);
    margin-bottom: 10px;
	margin-top: 10px;
}

.modal-post-title {
    color: var(--modal-text-color);
    font-weight: 500;
}

/* ===== Full Content ===== */
.modal-content-full {
    margin-bottom: 30px;
    line-height: 1.7;
}

.modal-content-full * {
    max-width: 100%;
}

/* ===== Fictional Section ===== */
.modal-fictional-section {
    width: 100%;
    margin-bottom: 60px;
}

.modal-fictional-section h3 {
    font-size: 1.2em;
    color: var(--modal-primary-color);
    margin: 0 0 20px 0;
    font-weight: 600;
}

.modal-fictional-image {
    margin-bottom: 15px;
}

.modal-fictional-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.modal-fictional-title {
    font-style: italic;
    color: #666;
    font-size: 1.1em;
    margin-top: 10px;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .nms-modal-overlay {
        padding: var(--modal-mobile-padding);
    }

    .modal-header-row {
        flex-direction: column;
        gap: 15px;
    }

    .modal-code-title {
        font-size: 2em;
    }

    .nms-modal-close {
        right: 0;
    }
}

@media (max-width: 480px) {
    .modal-code-title {
        font-size: 1.5em;
    }

    .nms-modal-content {
        border: 0;
        border-bottom: 10px solid white;
    }

    .nms-modal-body {
        margin: 50px var(--modal-mobile-padding);
    }
}
