:root {
    /* Premium Color Palette - Inspired by Robinhood/Mercury */
    --primary-gradient: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
    --secondary-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --accent-gradient: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    --dark-gradient: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    --light-gradient: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    
    /* Belt Colors - Premium versions */
    --white-belt: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --yellow-belt: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    --orange-belt: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    --green-belt: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
    --blue-belt: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    --brown-belt: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    --black-belt: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    --gold-belt: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Spacing & Layout */
    --container-max-width: 1200px;
    --content-max-width: 800px;
    --sidebar-width: 320px;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    /* Shadows - Premium depth */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 64px rgba(0,0,0,0.16);
    
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --border-light: #ddd6fe;
    --border-medium: #a5b4fc;
    --border-color: #dee2e6;
    --background-light: #fafafb;
    --background-white: #ffffff;
    --surface-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3d3d3d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-light: #404040;
    --border-medium: #505050;
    --border-color: #404040;
    --background-light: #1a1a1a;
    --background-white: #2d2d2d;
    --surface-color: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #2d2d2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-light);
    font-weight: var(--font-weight-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Common Components */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--background-white);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

/* Header */
.header {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.95);
}

.header-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 28px;
    font-weight: var(--font-weight-extrabold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 1px;
}
/* 
Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 16px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--background-light);
    color: var(--text-primary);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    background: var(--dark-gradient);
    color: white;
    margin-top: 80px;
}

.footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 24px;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
}

.footer-bottom-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.8;
}

.footer-disclaimer {
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 40px 24px 32px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    
    .footer-brand {
        margin-bottom: 0;
    }
    
    .social-links {
        justify-content: center;
    }
}
/* Dark Mode Toggle in Header */
.dark-mode-toggle-header {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.dark-mode-toggle-header:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Update existing styles to use CSS variables */
body {
    background: var(--background-light);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-content {
    background: var(--background-light);
}

/* Mobile Navigation Dark Mode */
.mobile-nav {
    background: var(--background-white);
    border-top: 1px solid var(--border-light);
}

.mobile-nav-link {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link:hover {
    background: var(--background-light);
    color: var(--text-primary);
}

/* ===== AUTOCOMPLETE STYLES ===== */
.autocomplete-container {
    position: relative;
    z-index: 1000;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.autocomplete-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.autocomplete-loading {
    display: none;
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-color, #00d09c);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.autocomplete-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-secondary);
    transition: background-color 0.15s ease;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.selected {
    background-color: var(--bg-secondary);
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.suggestion-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.suggestion-title mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.suggestion-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.belt-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
}

.belt-white { background: #f8f9fa; color: #495057; }
.belt-yellow { background: #fff3cd; color: #856404; }
.belt-orange { background: #ffeaa7; color: #d63031; }
.belt-green { background: #d4edda; color: #155724; }
.belt-blue { background: #cce5ff; color: #004085; }
.belt-brown { background: #d7b899; color: #6f4e37; }
.belt-black { background: #343a40; color: #ffffff; }
.belt-gold { background: linear-gradient(45deg, #ffd700, #ffed4e); color: #b8860b; }

.type-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    text-transform: capitalize;
}

.quality-indicator {
    color: #ffc107;
    font-size: 0.875rem;
}

.autocomplete-footer {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.autocomplete-footer kbd {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 0.7rem;
    margin: 0 1px;
}

.response-time {
    color: #28a745;
    font-weight: var(--font-weight-medium);
}

.autocomplete-error,
.autocomplete-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.error-icon,
.no-results-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.error-message {
    font-weight: var(--font-weight-medium);
}

.no-results-suggestion {
    font-size: 0.875rem;
    margin-top: 4px;
    opacity: 0.8;
}

/* Mobile optimizations */
.autocomplete-mobile .autocomplete-dropdown {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: var(--shadow-md);
}

.autocomplete-mobile .suggestion-content {
    padding: 16px 12px;
}

.autocomplete-mobile .suggestion-icon {
    font-size: 20px;
}

/* Dark mode support */
[data-theme="dark"] .autocomplete-dropdown {
    background: var(--bg-dark, #2d3748);
    border-color: var(--border-dark, #4a5568);
    color: var(--text-dark, #e2e8f0);
}

[data-theme="dark"] .autocomplete-suggestion:hover,
[data-theme="dark"] .autocomplete-suggestion.selected {
    background-color: var(--hover-bg-dark, #4a5568);
}

[data-theme="dark"] .suggestion-title mark {
    background-color: var(--highlight-bg-dark, #d69e2e);
    color: var(--highlight-text-dark, #1a202c);
}/* ====
= ADVANCED SEARCH STYLES ===== */
.advanced-search-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    margin: 1rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.advanced-search-toggle {
    padding: 0;
}






        gap: 16px;
    }
    
    .filters-body {
        padding: 20px;
    }
    
    .filters-header, .filters-footer {
        padding: 16px 20px;
    }
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: var(--font-weight-medium);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.active-filters-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.active-filters-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
}

.filter-tag .remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-size: 14px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-tag .remove:hover {
    opacity: 1;
}

/* Search Controls */
.search-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.results-count {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.search-time {
    opacity: 0.7;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-controls label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.sort-select {
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.view-toggle {
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle:hover,
.view-toggle.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Search Results */
.search-result {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.search-result:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.result-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
}

.result-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: var(--primary-color, #00d09c);
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.content-type {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    text-transform: capitalize;
}

.quality-score {
    color: #ffc107;
    font-size: 0.875rem;
}

.result-summary {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.result-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    text-transform: capitalize;
}

.tag.difficulty {
    background: #e3f2fd;
    color: #1976d2;
}

.tag.risk {
    background: #fff3e0;
    color: #f57c00;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.bookmark-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bookmark-btn:hover {
    color: var(--primary-color, #00d09c);
    background: var(--bg-secondary);
}

/* Grid View */
.search-results.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.view-grid .search-result {
    margin-bottom: 0;
}

.view-grid .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.view-grid .result-meta {
    align-self: flex-end;
}

/* Search Shortcuts */
.search-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.search-shortcuts h4 {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.history-list,
.saved-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item,
.saved-item {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.history-item:hover,
.saved-item:hover {
    background: var(--bg-tertiary);
}

.history-query,
.saved-name {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.history-time,
.saved-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* No Results */
.no-results,
.search-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results-icon,
.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.no-results h3,
.search-error h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.no-results p,
.search-error p {
    margin: 0 0 20px 0;
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .active-filters {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .sort-controls {
        justify-content: space-between;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .search-shortcuts {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .search-results.view-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .advanced-search-panel {
    background: var(--bg-dark, #2d3748);
    border-color: var(--border-dark, #4a5568);
}





[data-theme="dark"] .filters-footer {
    background: #4b5563;
    border-top-color: #6b7280;
}

[data-theme="dark"] .btn-clear-modern {
    color: #9ca3af;
}

[data-theme="dark"] .btn-clear-modern:hover {
    background: #6b7280;
    color: #f9fafb;
}

[data-theme="dark"] .btn-apply-modern {
    background: #8b5cf6;
}

[data-theme="dark"] .btn-apply-modern:hover {
    background: #7c3aed;
}

[data-theme="dark"] .filter-pill {
    background: #312e81;
    color: #c4b5fd;
    border-color: #4c1d95;
}

[data-theme="dark"] .filter-pill .remove {
    color: #c4b5fd;
}

[data-theme="dark"] .filter-pill .remove:hover {
    background: #4c1d95;
    color: #e0e7ff;
}

[data-theme="dark"] .search-result {
    background: var(--bg-dark, #2d3748);
    border-color: var(--border-dark, #4a5568);
}

[data-theme="dark"] .result-title a {
    color: var(--text-dark, #e2e8f0);
}

[data-theme="dark"] .history-item,
[data-theme="dark"] .saved-item {
    background: var(--bg-secondary-dark, #4a5568);
}

[data-theme="dark"] .history-item:hover,
[data-theme="dark"] .saved-item:hover {
    background: var(--bg-tertiary-dark, #5a6578);
}