/* --- GLOSSARY PANE --- */
.glossary-pane {
    position: fixed;
    top: 0;
    right: -450px;
    /* Hidden by default */
    width: 400px;
    height: 100%;
    background: rgba(15, 15, 15, 0.95);
    border-left: 1px solid var(--border);
    backdrop-filter: blur(10px);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.glossary-pane.active {
    right: 0;
}

.glossary-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glossary-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent);
}

.glossary-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.glossary-close:hover {
    color: var(--accent);
}

.glossary-controls {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-container input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 10px 10px 35px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent);
}

.tooltip-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: var(--bg-color);
}

/* Content Area */
.glossary-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.glossary-category {
    margin-bottom: 30px;
}

.glossary-category h4 {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.glossary-item {
    margin-bottom: 20px;
}

.glossary-item dt {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1rem;
}

.glossary-item dd {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-left: 0;
}

/* Scrollbar */
.glossary-content::-webkit-scrollbar {
    width: 6px;
}

.glossary-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.glossary-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.glossary-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 768px) {
    .glossary-pane {
        width: 100%;
        right: -100%;
    }
}