/* Clickable Term Style */
.clickable-term {
    color: var(--link-light);
    cursor: pointer;
    font-weight: 500;
    border-bottom: 1px dashed var(--link-light);
    transition: all 0.2s ease;
}

.clickable-term:hover {
    color: var(--nav-link-hover-light);
    border-bottom-style: solid;
    background-color: rgba(0, 123, 255, 0.05);
}

html.dark-mode .clickable-term {
    color: var(--link-dark);
    border-bottom-color: var(--link-dark);
}

html.dark-mode .clickable-term:hover {
    color: var(--nav-link-hover-dark);
    background-color: rgba(187, 134, 252, 0.05);
}

/* Modal content styling */
#modal-body h5 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--card-border-light);
    padding-bottom: 5px;
}

html.dark-mode #modal-body h5 {
    border-bottom-color: var(--card-border-dark);
}

#modal-body pre {
    background-color: var(--bg-light);
    border: 1px solid var(--card-border-light);
    border-radius: 8px;
    padding: 15px;
}

html.dark-mode #modal-body pre {
    background-color: var(--bg-dark);
    border-color: var(--card-border-dark);
}

/* Keyboard Key (kbd) Styling */
kbd {
    background: linear-gradient(to bottom, #f9f9f9, #e9e9e9);
    border: 1px solid #bbb;
    border-radius: 3px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 1px 2px rgba(0,0,0,0.15),
        inset 0 -1px 0 rgba(0,0,0,0.05);
    color: #222;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Monaco, "Roboto Mono", Consolas, monospace;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 2px;
    padding: 2px 6px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

html.dark-mode kbd {
    background: linear-gradient(to bottom, #5c5c5c, #3c3c3c);
    border: 1px solid #666;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 1px 2px rgba(0,0,0,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    color: #eee;
    text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

/* Shortcut Operator Spacing */
.shortcut-op {
    margin: 0 8px;
    font-weight: 500;
}

/* Utility classes for common patterns */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Grid utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* Flex utilities */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* Hidden utility for animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
