.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fcfbf8;
    border: 1px solid #ddd7ce;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(12px);
    transition: transform 0.2s ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.modal-wide {
    max-width: 900px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header,
.modal-footer {
    padding: 1.25rem 1.5rem;
    background: #f8f5ef;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd7ce;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.modal-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    color: #334155;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #ddd7ce;
}

.demo-credentials,
.module-list-item,
.about-feature,
.contact-link {
    background: #f8f5ef;
    border: 1px solid #ddd7ce;
}

.demo-credentials {
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.credential-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e7e1d8;
}

.credential-row:last-child {
    border-bottom: 0;
}

.credential-label {
    color: #64748b;
    font-size: 0.92rem;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.credential-value code {
    background: #111111;
    color: #f3f4f6;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
}

.copy-btn,
.modal-footer .btn,
.modal-footer a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #ddd7ce;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
}

.modal-footer .btn.btn-primary,
.modal-footer a.btn.btn-primary {
    background: #111111;
    border-color: #111111;
    color: #f9f9f7;
}

.developer-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.developer-gif {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.developer-info h3,
.contact-section h3 {
    margin-bottom: 0.4rem;
}

.developer-title,
.markdown-content,
.module-list-content p {
    color: #64748b;
}

.contact-links {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-radius: 10px;
    padding: 0.95rem 1rem;
    color: #111111;
}

@media (max-width: 720px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-footer,
    .credential-row,
    .developer-intro {
        flex-direction: column;
        align-items: flex-start;
    }
}
