/* css/glossary.css */

/* -- Main Glossary Page Layout -- */
.glossary-container { max-width: 900px; margin: 40px auto; padding: 20px; }
.glossary-header { text-align: center; margin-bottom: 40px; }
.glossary-header h1 { font-size: 36px; color: var(--title-color); }
.glossary-nav { text-align: center; margin-bottom: 30px; }
.glossary-nav a { text-decoration: none; color: var(--link-color); font-weight: bold; font-size: 18px; margin: 0 8px; }
.glossary-section { margin-bottom: 30px; }
.glossary-section h2 { font-size: 28px; border-bottom: 2px solid var(--header-border); padding-bottom: 10px; margin-bottom: 20px; }
.term-item { display: flex; gap: 20px; margin-bottom: 20px; }
.term-title { font-weight: bold; color: var(--title-color); width: 180px; flex-shrink: 0; }
.term-definition { flex-grow: 1; }

.dark-mode .glossary-section h2 { border-bottom-color: var(--header-border); }
.dark-mode .term-title { color: var(--title-color); }

/* -- Pop-up Glossary Definition Modal -- */
.glossary-term {
    border-bottom: 2px dotted var(--link-color);
    cursor: help;
    text-decoration: none;
    position: relative;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--box-bg);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    z-index: 1001;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.modal-overlay.active,
.modal-content.active {
    display: block;
    opacity: 1;
}

.modal-content h3 {
    margin-top: 0;
    color: var(--title-color);
    font-size: 24px;
    border-bottom: 1px solid var(--header-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 0;
    line-height: 1.7;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: var(--text-color);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-close-btn:hover {
    opacity: 1;
}
