* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f6fa;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: #E8532B;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: #f8f9fa;
    width: 300px;
    font-size: 0.9rem;
}

.search-box:focus {
    outline: 2px solid #E8532B;
}

.container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs {
    background: white;
    border-bottom: 1px solid #ddd;
    display: flex;
    padding: 0 2rem;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.tab.active {
    border-bottom-color: #E8532B;
    color: #84532D;
}

.tab:hover {
    background: #f8f9fa;
}

.content-area {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.svg-viewer {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: row;
    overflow: hidden;
}

.svg-viewer.active {
    display: flex;
}

.sidebar {
    width: 320px;
    min-width: 320px;
    background: white;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    height: 100%;
}

.svg-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: white;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevent text selection during pan/zoom */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.svg-container svg {
    cursor: grab;
    background: white;
    max-width: 90%;
    max-height: 90%;
    /* Critical for crisp rendering */
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    shape-rendering: crispEdges;
    text-rendering: geometricPrecision;
}

.svg-container svg:active {
    cursor: grabbing;
}

.documentation {
    padding: 2rem;
    background: white;
    overflow-y: auto;
    display: none;
    line-height: 1.6;
    height: 100%;
}

.documentation.active {
    display: block;
}

/* Enhanced Documentation Styles */
.doc-header {
    border-bottom: 2px solid #E8532B;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.doc-header h1 {
    color: #84532D;
    margin-bottom: 0.5rem;
}

.doc-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.metadata-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.metadata-item {
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #495057;
}

.missing-tables {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.missing-tables h2 {
    color: #c53030;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #666;
    margin-bottom: 1rem;
}

.missing-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.missing-domain h3 {
    color: #e53e3e;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.missing-table-list {
    list-style: none;
    padding: 0;
}

.missing-table-item {
    background: white;
    border: 1px solid #fed7d7;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.missing-table-item strong {
    display: block;
    color: #c53030;
}

.table-meta {
    font-size: 0.8rem;
    color: #666;
}

.doc-group {
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.group-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.group-header:hover {
    background: #e9ecef;
}

.group-header h2 {
    margin: 0;
    color: #84532D;
    font-size: 1.3rem;
}

.group-stats {
    display: contents;
}

.stat-item {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.toggle-arrow {
    font-size: 1.2rem;
    color: #666;
    transition: transform 0.2s;
}

.group-content {
    padding: 1.5rem;
    display: none;
}

.diagram-links {
    margin-bottom: 2rem;
}

.diagram-links h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.diagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.diagram-link-btn {
    background: #E8532B;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-align: left;
}

.diagram-link-btn:hover {
    background: #C9441F;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.tables-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.table-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.table-header {
    background: #f8f9fa;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.table-header:hover {
    background: #e9ecef;
}

.table-header h5 {
    margin: 0;
    color: #84532D;
    font-family: 'Courier New', monospace;
}

.table-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.table-stats span {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.table-details {
    padding: 1rem;
    display: none;
    background: white;
}

.columns-section h6,
.relationships-section h6 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.columns-table {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.column-header {
    background: #f8f9fa;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 2fr 0.5fr;
    gap: 1rem;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    border-bottom: 1px solid #e2e8f0;
}

.column-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 2fr 0.5fr;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
    align-items: center;
}

.column-row:last-child {
    border-bottom: none;
}

.column-row.primary-key {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.col-name {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #84532D;
}

.col-type {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.85rem;
}

.col-pk {
    text-align: center;
    font-size: 1.1rem;
}

.relationships-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.fk-section,
.ref-section {
    margin-bottom: 1rem;
}

.fk-section ul,
.ref-section ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.fk-section li,
.ref-section li {
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.fk-section code,
.ref-section code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Performance Metrics Styles */
.performance-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.performance-section h6 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.perf-subsection {
    margin-bottom: 1rem;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #E8532B;
}

.perf-subsection strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #84532D;
    font-size: 0.9rem;
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.perf-grid span {
    background: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    border: 1px solid #dee2e6;
}

.frag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    font-size: 0.85rem;
}

.frag-item.frag-high {
    background: #fee2e2;
    border-left: 3px solid #dc2626;
}

.frag-item.frag-medium {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.frag-item.frag-low {
    background: #dcfce7;
    border-left: 3px solid #16a34a;
}

.idx-name {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    flex: 1;
}

.frag-percent {
    font-weight: 600;
    margin: 0 0.5rem;
}

.idx-pages {
    color: #6c757d;
    font-size: 0.8rem;
}

.usage-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.25rem 0;
}

.usage-item .idx-name {
    display: block;
    margin-bottom: 0.25rem;
    color: #84532D;
}

.usage-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.usage-stats span {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .doc-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .diagram-grid {
        grid-template-columns: 1fr;
    }
    
    .column-header,
    .column-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .column-header span,
    .column-row span {
        padding: 0.25rem 0;
        border-bottom: 1px solid #f1f3f4;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.domain-group {
    margin-bottom: 1rem;
}

.domain-header {
    background: #E8532B;
    color: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-weight: 500;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    gap: 0.5rem;
}

.domain-header:hover {
    background: #E8532B;
}

.domain-count {
    color: #bdc3c7;
    font-weight: 400;
    font-size: 0.9rem;
}

.domain-header::after {
    content: '▶';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: auto;
    order: 3;
}

.domain-header.expanded::after {
    transform: rotate(90deg);
}

.domain-content {
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.domain-content.expanded {
    max-height: 2000px;
}

.component-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.component-item:hover {
    background: #e9ecef;
}

.component-item.active {
    background: #E8532B;
    color: white;
}

.component-name {
    font-weight: 500;
}

.component-size {
    font-size: 0.8rem;
    opacity: 0.7;
}

.chevron {
    transition: transform 0.2s;
}

.chevron.rotated {
    transform: rotate(90deg);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    font-size: 1.2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
    margin: 1rem;
}

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 2rem;
    background: #fff5f5;
    border-radius: 8px;
    border: 2px solid #fed7d7;
    margin: 1rem;
    text-align: center;
}

.error h3 {
    color: #c53030;
    margin-bottom: 0.5rem;
}

.error p {
    color: #718096;
    margin-bottom: 1rem;
}

.retry-btn {
    background: #E8532B;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: #C9441F;
}

.doc-section {
    margin-bottom: 2rem;
}

.doc-section h2 {
    color: #84532D;
    border-bottom: 2px solid #E8532B;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.doc-section h3 {
    color: #84532D;
    margin: 1.5rem 0 0.5rem 0;
}

.table-link {
    color: #84532D;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s;
}

.table-link:hover {
    text-decoration: underline;
    background: #e3f2fd;
}

.diagram-link-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 12px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.diagram-domain {
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

.zoom-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    z-index: 100;
    /* Make touch-friendly */
    touch-action: manipulation;
}

.zoom-btn {
    padding: 0.75rem;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    /* Touch-friendly sizing */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Improve touch response */
    touch-action: manipulation;
}

.zoom-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zoom-btn:active {
    transform: translateY(0);
}

.zoom-btn.help {
    background: #e8f4fd;
    color: #1976d2;
}

/* Google Authentication Styles */
#google-auth-overlay {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#google-auth-overlay h2 {
    margin-bottom: 20px;
    color: #84532D;
}

#google-auth-overlay p {
    margin-top: 20px;
    color: #888;
    font-size: 0.95em;
}

#google-user-info {
    position: absolute;
    top: 10px;
    right: 20px;
    background: #e8f4fd;
    color: #1976d2;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 1em;
    display: none;
    z-index: 1000;
}

#google-signout-btn {
    background: none;
    border: none;
    color: #1976d2;
    font-weight: bold;
    margin-left: 10px;
    cursor: pointer;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .svg-viewer {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-width: unset;
        max-height: 30vh;
        order: 1;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .svg-container {
        order: 2;
        flex: 1;
    }
    
    .search-box {
        width: 200px;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .zoom-controls {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .zoom-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    .tabs {
        padding: 0 1rem;
    }
    
    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .documentation {
        padding: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .component-item {
        padding: 1rem;
    }
    
    .domain-header {
        padding: 1rem;
    }
    
    .zoom-btn {
        min-width: 48px;
        min-height: 48px;
    }
}

/* Additional utility classes for remaining inline styles */
.loading-message {
    background: #e3f2fd;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 4px solid #2196f3;
}

.search-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.clear-search-btn {
    float: right;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

.clear-search-btn:hover {
    color: #d63384;
}

.auth-error {
    color: red;
}

.auth-restriction-text {
    margin-top: 20px;
    color: #888;
    font-size: 0.95em;
}

/* Modal styles for help dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: pre-line;
    line-height: 1.6;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #f0f0f0;
}

.modal-title {
    margin: 0 0 20px 0;
    color: #84532D;
    font-size: 1.5em;
}

/* Search functionality styles */
.sidebar-search-results {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    max-height: 70vh;
    overflow-y: auto;
}

.search-results-header {
    background: #E8532B;
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.result-group {
    margin-bottom: 1rem;
}

.result-group h4 {
    background: #E8532B;
    color: white;
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.search-result-item:hover {
    background: #e3f2fd;
    border-left: 3px solid #E8532B;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-match {
    display: block;
    font-weight: 600;
    color: #84532D;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.result-match mark {
    background: #fff59d;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 700;
    color: #f57f17;
}

.result-info {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.result-domain {
    display: block;
    font-size: 0.75rem;
    color: #495057;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 0.25rem;
}

.no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background: white;
}

.table-count {
    font-size: 0.75rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
}

/* Enhanced component item display */
.component-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.component-item .component-name {
    font-weight: 500;
    color: #84532D;
}

.component-item .table-count {
    align-self: flex-end;
}

/* Smooth transitions for search state changes */
.sidebar > * {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar > .hidden {
    opacity: 0;
    transform: translateY(-10px);
}

/* Search input enhancements */
.search-box {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.search-box:focus {
    outline: none;
    border-color: #E8532B;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.search-box::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Loading state for search */
.search-loading {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    background: white;
    border-bottom: 1px solid #dee2e6;
}

.search-loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #6c757d;
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow: .25em 0 0 #6c757d, .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 #6c757d, .5em 0 0 #6c757d;
    }
}

/* Mobile search enhancements */
@media (max-width: 768px) {
    .sidebar-search-results {
        max-height: 30vh;
    }
    
    .search-result-item {
        padding: 1rem;
    }
    
    .result-match {
        font-size: 0.85rem;
    }
    
    .search-box {
        width: 180px;
        font-size: 0.85rem;
    }
}
