/* Custom styles voor het project */

/* v2.html Safe Area Support */
:root { 
    --sat: env(safe-area-inset-top); 
    --sab: env(safe-area-inset-bottom);
    --muted: #9ca3af; /* gray-400 for muted text */
}

/* LinkedIn bookmarklet preview image styles */
.linkedin-preview-img {
    max-height: 400px;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.75rem; /* matches rounded-xl */
}

@media (max-width: 768px) {
    .linkedin-preview-img {
        max-height: 260px;
    }
}

:root.dark {
    --muted: #6b7280; /* gray-500 for dark mode */
}

/* v2.html Scrollbar hiding */
.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* Grid layout utilities for app cards */
.grid-3-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

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

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

/* ==================== DETAILED VIEW STYLING ==================== */

/* Sticky search bar for detailed view */
.search-container {
    transition: all 0.3s ease;
}

.detailed-view-active .search-container {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-body);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Grid adjustments for detailed view */
#appsGrid.detailed-view {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
}

@media (max-width: 1280px) {
    #appsGrid.detailed-view {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    #appsGrid.detailed-view {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* Detailed card styling - Inspired by app.html */
.app-card-detailed {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 220px;
    cursor: pointer;
}

.app-card-detailed:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
    transform: translateY(-4px);
}

/* Card header with icon and name */
.app-card-detailed-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.app-card-detailed-icon {
    width: 72px;
    height: 72px;
    border-radius: 1rem;
    object-fit: contain;
    border: 1px solid var(--border-color);
    background: white;
    flex-shrink: 0;
    padding: 0.5rem;
}

.app-card-detailed-info {
    flex: 1;
    min-width: 0;
    padding-top: 0.25rem;
}

.app-card-detailed-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.375rem;
}

.app-card-detailed-url {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, monospace;
}

/* Description - More prominence like app.html */
.app-card-detailed-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0.5rem 0;
}

/* Tags - Better styling */
.app-card-detailed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.app-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
}

.app-tag:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

/* Action buttons (hover only) */
.app-card-detailed-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.app-card-detailed:hover .app-card-detailed-actions {
    opacity: 1;
}

.card-action-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.card-action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.card-action-btn.card-favorite:hover {
    background: #fef3c7;
    border-color: #fbbf24;
}

.card-action-btn.card-favorite.active {
    background: #fbbf24;
    border-color: #f59e0b;
}

.card-action-btn.card-delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Dark mode support for detailed cards */
.dark .app-card-detailed {
    background: rgb(30 41 59 / 0.9);
    border-color: #334155;
}

.dark .app-card-detailed:hover {
    border-color: var(--accent-color);
    background: rgb(30 41 59 / 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dark .app-card-detailed-icon {
    border-color: #475569;
    background: #0f172a;
}

.dark .app-card-detailed-title {
    color: #f1f5f9;
}

.dark .app-card-detailed-url {
    color: #64748b;
}

.dark .app-card-detailed-description {
    color: #cbd5e1;
}

.dark .app-tag {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #bfdbfe;
    border-color: #3b82f6;
}

.dark .app-tag:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border-color: #60a5fa;
}

.dark .card-action-btn {
    background: #1e293b;
    border-color: #475569;
}

.dark .card-action-btn:hover {
    background: #334155;
    border-color: #64748b;
}

/* Mobile responsiveness for detailed cards */
@media (max-width: 640px) {
    .app-card-detailed {
        padding: 1rem;
    }

    .app-card-detailed-icon {
        width: 3rem;
        height: 3rem;
    }

    .app-card-detailed-title {
        font-size: 1rem;
    }

    .app-card-detailed-description {
        font-size: 0.8125rem;
    }
}

/* ==================== END DETAILED VIEW STYLING ==================== */

@media (min-width: 640px) {
    .sm\:grid-3-cols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .sm\:grid-4-cols {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .sm\:grid-5-cols {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    
    .sm\:grid-6-cols {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    
    .sm\:grid-8-cols {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

/* Dark mode support */
:root {
    color-scheme: light dark;
    /* Custom CSS properties for One favorite styling */
    --sat: env(safe-area-inset-top);
    --sab: env(safe-area-inset-bottom);
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-body: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --ring-color: rgba(14, 165, 233, 0.5);
    --tw-bg-opacity: 1;
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x: ;
    --tw-pan-y: ;
    --tw-pinch-zoom: ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position: ;
    --tw-gradient-via-position: ;
    --tw-gradient-to-position: ;
    --tw-ordinal: ;
    --tw-slashed-zero: ;
    --tw-numeric-figure: ;
    --tw-numeric-spacing: ;
    --tw-numeric-fraction: ;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgb(59 130 246 / 0.5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
    --tw-backdrop-blur: ;
    --tw-backdrop-brightness: ;
    --tw-backdrop-contrast: ;
    --tw-backdrop-grayscale: ;
    --tw-backdrop-hue-rotate: ;
    --tw-backdrop-invert: ;
    --tw-backdrop-opacity: ;
    --tw-backdrop-saturate: ;
    --tw-backdrop-sepia: ;
    --tw-contain-size: ;
    --tw-contain-layout: ;
    --tw-contain-paint: ;
    --tw-contain-style: ;
}

.dark {
    color-scheme: dark;
}

.dark body {
    background-color: #1f2937;
}

/* Basis styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* Achtergrond kleur - wissel tussen wit en grijs */
    background-color: #ffffff; /* Wit */
    /* background-color: #f3f4f6; */ /* Grijs - uitgecommenteerd */
}

/* === FIREBASE AUTH MODAL === */
#authModal {
    display: none;
}

#authModal.flex {
    display: flex;
}

.auth-tab {
    color: hsl(0 0% 60%);
    background: transparent;
}

.auth-tab.active {
    color: hsl(0 0% 9%);
}

.dark .auth-tab.active {
    color: hsl(0 0% 100%);
}

#tabIndicator {
    width: 50%;
}

#passwordStrength {
    width: 0%;
}

#passwordStrength.weak {
    width: 33%;
    background-color: #ef4444;
}

#passwordStrength.medium {
    width: 66%;
    background-color: #f59e0b;
}

#passwordStrength.strong {
    width: 100%;
    background-color: #10b981;
}

/* Login Button Indicator */
#loginIndicator {
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

#loginIndicator.hidden {
    opacity: 0;
    transform: scale(0);
}

#loginIndicator:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    animation: pulse-indicator 2s ease-in-out infinite;
}

@keyframes pulse-indicator {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Login Button States */
#loginBtn {
    transition: all 0.2s ease;
}

#loginBtn.text-blue-600 {
    background-color: rgb(239 246 255 / 0.8);
}

#loginBtn.text-blue-600:hover {
    background-color: rgb(239 246 255);
}

.dark #loginBtn.text-blue-600 {
    background-color: rgb(30 58 138 / 0.3);
}

.dark #loginBtn.text-blue-600:hover {
    background-color: rgb(30 58 138 / 0.5);
}

/* One favorite title styling */
.one-favorite-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    color: hsl(0 0% 9%);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: color 200ms ease;
}

.dark .one-favorite-title {
    color: hsl(0 0% 100%); /* White in dark mode */
}

/* Category filter container styling */
.category-filter-container {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
    --sat: env(safe-area-inset-top);
    --sab: env(safe-area-inset-bottom);
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-body: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --ring-color: rgba(14, 165, 233, 0.5);
    line-height: inherit;
    --tw-bg-opacity: 1;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x: ;
    --tw-pan-y: ;
    --tw-pinch-zoom: ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position: ;
    --tw-gradient-via-position: ;
    --tw-gradient-to-position: ;
    --tw-ordinal: ;
    --tw-slashed-zero: ;
    --tw-numeric-figure: ;
    --tw-numeric-spacing: ;
    --tw-numeric-fraction: ;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgb(59 130 246 / 0.5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
    --tw-backdrop-blur: ;
    --tw-backdrop-brightness: ;
    --tw-backdrop-contrast: ;
    --tw-backdrop-grayscale: ;
    --tw-backdrop-hue-rotate: ;
    --tw-backdrop-invert: ;
    --tw-backdrop-opacity: ;
    --tw-backdrop-saturate: ;
    --tw-backdrop-sepia: ;
    --tw-contain-size: ;
    --tw-contain-layout: ;
    --tw-contain-paint: ;
    --tw-contain-style: ;
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
    scrollbar-width: none;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

/* Custom animaties voor dropdown menu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-enter {
    animation: fadeIn 0.2s ease-out;
}

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states verbeteren */
*:focus-visible {
    outline: 2px solid rgb(59 130 246 / 0.5);
    outline-offset: 2px;
}

/* Scrollbar styling (optioneel) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Sortable.js drag & drop styling */
.sortable-ghost {
    opacity: 0.4;
    background: #e5e7eb;
    border: 2px dashed #9ca3af;
    border-radius: 0.5rem;
}

.dark .sortable-ghost {
    background: #374151;
    border-color: #6b7280;
}

.sortable-drag {
    opacity: 1;
    cursor: grabbing !important;
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    z-index: 1000;
    transition: transform 0.1s ease;
}

/* Alt+Drag styling verwijderd - niet meer nodig omdat alle apps altijd draggable zijn */

.app-item.long-press-active {
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    z-index: 20;
}

.app-item.long-press-active:before {
    content: "📱 Long Press";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #10b981;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 25;
    opacity: 1;
    font-weight: 600;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

.dark .app-item.long-press-active:before {
    background: #34d399;
    color: #1f2937;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.sortable-chosen {
    cursor: grabbing !important;
}

.sortable-dragging {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Cursor states voor draggable items */
.cursor-grab {
    cursor: grab;
}

.cursor-grabbing {
    cursor: grabbing;
}

/* Hide scrollbar but keep scroll functionality */
.hide-scrollbar,
.scrollbar-none {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* Smooth scrolling for containers */
.scroll-smooth {
    scroll-behavior: smooth;
}

/* Search highlighting improvements */
.search-highlight {
    display: inline-block;
    position: relative;
    padding: 0.125rem 0.25rem;
    margin: 0 0.0625rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    animation: highlightPulse 0.3s ease-out;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.dark .search-highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.4);
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Tooltip animatie - improved stability */
.group:hover .group-hover\:block {
    animation: tooltipFadeIn 0.2s ease-out;
}

/* Better tooltip transition for stability */
.tooltip-stable {
    transition: opacity 0.2s ease-in-out;
}

/* Prevent tooltip flickering by adding pointer-events-none and z-index */
.group .tooltip,
.group [class*="tooltip"] {
    pointer-events: none;
    z-index: 50;
}

/* ============================================
   ENHANCED APP CARD HOVER EFFECTS
   ============================================ */

/* App item stability improvements */
.app-item {
    position: relative;
    pointer-events: auto;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.app-item .tooltip {
    pointer-events: none;
}

/* Enhanced Hover State - Lift Effect */
.app-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 
                0 2px 8px rgba(0, 0, 0, 0.08);
}

.dark .app-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 
                0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Active state - slight press down */
.app-item:active {
    transform: translateY(-2px);
    transition-duration: 0.1s;
}

/* Scale effect for icon on hover */
.app-item:hover .app-icon-container {
    transform: scale(1.05);
}

.app-icon-container {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background-color: #ffffff;
}

/* Loading state for images */
.app-icon-container img {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.app-icon-container img[src=""],
.app-icon-container img:not([src]) {
    opacity: 0;
}

/* Loading spinner for slow-loading images on mobile Chrome Android */
.app-icon-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: iconSpinner 0.8s linear infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.app-icon-container.loading::before {
    opacity: 1;
}

.app-icon-container.loading img {
    opacity: 0.3;
}

@keyframes iconSpinner {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.dark .app-icon-container {
    background-color: #374151;
}

.dark .app-icon-container::before {
    border-color: #4b5563;
    border-top-color: #60a5fa;
}

/* Smooth border color transition */
.app-item {
    border-color: var(--border-color, #e5e7eb);
}

.app-item:hover {
    border-color: rgb(96, 165, 250); /* blue-400 */
}

.dark .app-item:hover {
    border-color: rgb(59, 130, 246); /* blue-500 */
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 8px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Zoekbalk focus animatie */
#appSearch:focus {
    transform: scale(1.01);
}

/* Smooth transitions voor filter */
.app-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Reset button hover effect */
#resetOrder:hover svg {
    animation: rotate 0.6s ease-in-out;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* Category buttons */
.category-btn.active {
    background-color: rgb(59 130 246);
    color: white;
}

/* ============================================
   FAVORITE APPS STYLING
   ============================================ */

/* Favorite star button */
.favorite-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .favorite-btn {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.8);
}

/* Show favorite button on hover */
.app-item:hover .favorite-btn {
    opacity: 1;
}

/* Favorite button hover effect */
.favorite-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    border-color: rgb(234, 179, 8); /* yellow-600 */
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}

.dark .favorite-btn:hover {
    background: rgba(31, 41, 55, 1);
    border-color: rgb(250, 204, 21); /* yellow-400 */
}

/* Active favorite button (always visible) */
.favorite-btn.is-favorite {
    opacity: 1;
}

/* Star icon styling */
.favorite-btn svg {
    width: 14px;
    height: 14px;
    color: rgb(156, 163, 175); /* gray-400 */
    transition: all 0.2s ease;
}

.favorite-btn:hover svg,
.favorite-btn.is-favorite svg {
    color: rgb(234, 179, 8); /* yellow-600 */
}

.dark .favorite-btn:hover svg,
.dark .favorite-btn.is-favorite svg {
    color: rgb(250, 204, 21); /* yellow-400 */
}

/* Fill star when favorite */
.favorite-btn.is-favorite svg {
    fill: currentColor;
}

/* Favorite app border highlight - subtle yellow glow */
.app-item.is-favorite {
    border-color: rgb(250, 204, 21) !important; /* yellow-400 */
    box-shadow: 0 0 0 1px rgb(250, 204, 21, 0.2),
                0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .app-item.is-favorite {
    border-color: rgb(234, 179, 8) !important; /* yellow-600 */
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Enhanced hover for favorite apps */
.app-item.is-favorite:hover {
    border-color: rgb(234, 179, 8) !important; /* yellow-600 */
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.12), 
                0 2px 8px rgba(0, 0, 0, 0.08);
}

.dark .app-item.is-favorite:hover {
    border-color: rgb(250, 204, 21) !important; /* yellow-400 */
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.4),
                0 8px 24px rgba(0, 0, 0, 0.4), 
                0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Homepage chip buttons */
.homepage-chip-btn {
    border-color: rgb(229 231 235) !important; /* gray-200 - neutrale border */
    background-color: rgb(255 255 255) !important; /* witte achtergrond */
    color: rgb(75 85 99) !important; /* gray-600 - neutrale tekst */
    font-weight: 400; /* normale font weight */
    -webkit-user-select: none;
    user-select: none;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.homepage-chip-btn:hover {
    background-color: rgb(249 250 251) !important; /* gray-50 - subtiele hover */
    border-color: rgb(209 213 219) !important; /* gray-300 */
}

.homepage-chip-btn.active {
    border-color: rgb(125 211 252) !important; /* sky-300 - lichtblauw outline alleen */
    background-color: rgb(255 255 255) !important; /* wit - zelfde als normale buttons */
    color: rgb(3 105 161) !important; /* sky-700 - donkerblauw tekst */
    font-weight: 500; /* medium weight voor actieve */
}

.dark .homepage-chip-btn.active {
    background-color: rgb(30 41 59) !important; /* slate-800 - zelfde donkere achtergrond als normale buttons */
    border-color: rgb(125 211 252) !important; /* sky-300 - lichtblauw outline */
    color: rgb(125 211 252) !important; /* sky-300 - lichtblauw tekst in dark mode */
}

.dark .homepage-chip-btn {
    border-color: rgb(75 85 99) !important; /* gray-600 - neutrale border in dark mode */
    background-color: rgb(30 41 59) !important; /* slate-800 - donkere achtergrond */
    color: rgb(156 163 175) !important; /* gray-400 - neutrale tekst in dark mode */
}

.dark .homepage-chip-btn:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 - subtiele hover in dark mode */
    border-color: rgb(107 114 128) !important; /* gray-500 */
}

/* Context menu */
.context-menu {
    min-width: 150px;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
}

/* Modal backdrop */
.backdrop-blur-sm {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Apps grid max height */
#appsGrid {
    max-height: 400px;
    overflow-y: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#pinnedSection,
#collectionsSection {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Homepage apps visibility transitions */
#homePageAppsGrid,
#homePagePinnedSection,
#homePageCategoryFilter {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Apps visibility toggle animation */
#appsVisibilityToggle svg {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

#appsVisibilityToggle:hover svg {
    transform: scale(1.1);
}

/* Pin badge animation */
@keyframes pinBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.app-item:hover .pin-badge {
    animation: pinBounce 0.3s ease;
}

/* Theme toggle animation */
#themeToggle svg {
    transition: transform 0.3s ease;
}

/* Drag & Drop states */
.app-item[draggable="true"] {
    cursor: grab;
}

.app-item[draggable="true"]:active {
    cursor: grabbing;
}

.app-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Drop zone animation */
@keyframes dropZonePulse {
    0%, 100% { 
        border-color: rgb(96, 165, 250);
        background-color: rgb(239, 246, 255);
    }
    50% { 
        border-color: rgb(59, 130, 246);
        background-color: rgb(219, 234, 254);
    }
}

/* Dropzone styling */
#linkDropzone {
    cursor: pointer;
    user-select: none;
}

#linkDropzone.drag-over {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.dark #linkDropzone.drag-over {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #60a5fa;
}

#linkDropzone.drag-over svg {
    color: #3b82f6;
    transform: scale(1.1);
}

.dark #linkDropzone.drag-over svg {
    color: #60a5fa;
}

/* Remove old appMenu drag-over (conflicts with sortable) */
#appMenu.drag-over {
    background-color: transparent;
}

/* App URL drag cursor */
.app-item[data-url]:hover {
    cursor: pointer;
}


#themeToggle:hover svg {
    transform: rotate(20deg);
}

/* Color picker active state */
.color-picker.ring-4 {
    transform: scale(1.1);
}

/* Context Menu */
#contextMenu {
    animation: contextMenuFadeIn 0.15s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.dark #contextMenu {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#contextMenu button {
    cursor: pointer;
}

#contextMenu button:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

#contextMenu button:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Toast notification */
@keyframes toast {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    10%, 90% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
}

.animate-toast {
    animation: toast 2s ease-in-out;
}

/* Quick Apps Widget */
#quickAppsWidget {
    animation: fadeInSlide 0.3s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#quickAppsWidget button:hover {
    transform: translateY(-2px);
}

/* Responsive: Hide Quick Apps on small screens */
@media (max-width: 768px) {
    #quickAppsWidget {
        display: none !important;
    }
}

/* Autocomplete Dropdown */
#autocompleteDropdown {
    animation: autocompleteSlideIn 0.2s ease-out;
}

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

#autocompleteDropdown .autocomplete-item {
    transition: all 0.15s ease;
}

#autocompleteDropdown .autocomplete-item:hover,
#autocompleteDropdown .autocomplete-item.selected {
    background-color: rgba(59, 130, 246, 0.1);
}

.dark #autocompleteDropdown .autocomplete-item:hover,
.dark #autocompleteDropdown .autocomplete-item.selected {
    background-color: rgba(96, 165, 250, 0.15);
}

/* Apps Dashboard Widget Styles */
.dashboard-category-btn.active {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Dashboard drag handle */
#dashboardDragHandle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#dashboardDragHandle:active {
    cursor: grabbing !important;
}

/* Dashboard widget slide animation */
#appsDashboardWidget {
    animation: dashboardSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dashboardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive: Adjust Apps Dashboard on smaller screens */
@media (max-width: 768px) {
    #appsDashboardWidget {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 50;
        width: 90vw;
        max-width: 320px;
    }
}

#autocompleteDropdown .autocomplete-item.selected {
    border-left: 3px solid #3b82f6;
}

.dark #autocompleteDropdown .autocomplete-item.selected {
    border-left-color: #60a5fa;
}

/* Floating Action Button (FAB) Styles */
#quickAddAppFAB {
    animation: fabFadeIn 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@keyframes fabFadeIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

#quickAddAppFAB:active {
    transform: scale(0.95);
}

#quickAddAppFAB svg {
    transition: transform 0.3s ease;
}

/* Pulse animation on page load */
@keyframes fabPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6), 0 0 0 8px rgba(59, 130, 246, 0.1);
    }
}

#quickAddAppFAB.pulse {
    animation: fabPulse 2s ease-in-out 3;
}

/* Hide FAB on very small screens */
@media (max-width: 480px) {
    #quickAddAppFAB {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
    
    #quickAddAppFAB svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ============================================
   ENHANCED FEATURES STYLES
   ============================================ */

/* Recent Badge */
.recent-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.75rem;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 0, 0.3));
    z-index: 10;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Usage Counter */
.usage-counter {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    z-index: 10;
    min-width: 18px;
    text-align: center;
}

.dark .usage-counter {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* Enhanced Hover Effects */
.app-hover-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-hover-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.15), 
                0 8px 16px -8px rgba(0, 0, 0, 0.1);
}

.dark .app-hover-enhanced:hover {
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4), 
                0 8px 16px -8px rgba(0, 0, 0, 0.3);
}

/* Loading Skeleton */
.app-skeleton {
    padding: 1rem;
    border-radius: 0.75rem;
    background: #f3f4f6;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.dark .app-skeleton {
    background: #374151;
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    margin: 0 auto 0.5rem;
}

.dark .skeleton-icon {
    background: #4b5563;
}

.skeleton-text {
    height: 12px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 0 auto;
    max-width: 80%;
}

.dark .skeleton-text {
    background: #4b5563;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
}

.dark .toast {
    background: #1f2937;
    color: #f3f4f6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

/* Note Indicator */
.note-indicator {
    position: absolute;
    top: -4px;
    left: -4px;
    font-size: 0.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 10;
}

/* Group Indicator */
.group-indicator {
    position: absolute;
    bottom: -4px;
    left: -4px;
    font-size: 0.75rem;
    background: white;
    border-radius: 50%;
    padding: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 10;
}

.dark .group-indicator {
    background: #1f2937;
}

/* Tag Filter Chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark .tag-chip {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.tag-chip:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.dark .tag-chip:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.tag-chip.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.dark .tag-chip.active {
    background: #2563eb;
    border-color: #2563eb;
}

.tag-chip .badge {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-chip.active .badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Recent Searches Chips */
.recent-search-chip {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .recent-search-chip {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.recent-search-chip:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.dark .recent-search-chip:hover {
    background: #4b5563;
    border-color: #60a5fa;
}

/* Smart Suggestions Section */
.smart-suggestions-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 0.75rem;
    border: 1px solid #bae6fd;
}

.dark .smart-suggestions-container {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    border-color: #3b82f6;
}

/* Usage Stats Widget */
.usage-stats-widget {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.dark .usage-stats-widget {
    background: #1f2937;
    border-color: #374151;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
}

.dark .stat-card {
    background: #374151;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-weight: 500;
}

.dark .stat-label {
    color: #9ca3af;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .progress-bar {
    background: #4b5563;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Keyboard Shortcut Hint */
.keyboard-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
    color: #4b5563;
}

.dark .keyboard-hint {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

/* App with keyboard shortcut indicator */
.app-with-shortcut {
    position: relative;
}

.app-with-shortcut::before {
    content: attr(data-shortcut);
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    z-index: 10;
}

/* Bulk Selection Mode */
.bulk-select-mode .app-item {
    cursor: pointer;
}

.bulk-select-mode .app-item.selected {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
    background: rgba(59, 130, 246, 0.05);
}

.dark .bulk-select-mode .app-item.selected {
    background: rgba(59, 130, 246, 0.1);
}

/* Bulk Actions Toolbar */
.bulk-actions-toolbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}

.dark .bulk-actions-toolbar {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Most Used Section */
.most-used-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0.75rem;
    border: 1px solid #fbbf24;
}

.dark .most-used-section {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    border-color: #d97706;
}

.most-used-badge {
    background: #fbbf24;
    color: #78350f;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

/* Feature Toggle in Settings */
.feature-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.feature-toggle:hover {
    background: #f9fafb;
}

.dark .feature-toggle:hover {
    background: #374151;
}

.feature-toggle-label {
    flex: 1;
}

.feature-toggle-title {
    font-weight: 500;
    font-size: 0.875rem;
    color: #111827;
}

.dark .feature-toggle-title {
    color: #f3f4f6;
}

.feature-toggle-description {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.dark .feature-toggle-description {
    color: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .usage-stats-widget {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .bulk-actions-toolbar {
        bottom: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   SIDEBAR MODULE STYLES
   ============================================ */

/* Main Layout */
.main-layout {
    position: relative;
    min-height: calc(100vh - 80px);
    width: 100%;
    margin-top: 80px; /* Space for fixed header */
}

/* Sidebar Container - Responsive: In-flow on desktop, overlay on mobile */
.sidebar {
    width: 260px;
    background: var(--bg-primary, #ffffff);
    border-right: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Default mobile: Fixed overlay */
    position: fixed;
    left: 0;
    top: 80px;
    bottom: 0;
    z-index: 30;
    transform: translateX(-100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Sidebar open state (mobile) */
.sidebar.open {
    transform: translateX(0);
}

/* Desktop: In-flow sidebar (pushes content) */
@media (min-width: 1024px) {
    .sidebar {
        position: relative;
        transform: translateX(0);
        top: 0;
        background: var(--bg-primary, #ffffff);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }
    
    .main-layout {
        display: flex;
    }
}

.dark .sidebar {
    background: rgba(31, 41, 55, 0.95);
    border-right-color: #374151;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1024px) {
    .dark .sidebar {
        background: #1f2937;
        box-shadow: none;
    }
}

/* Collapsed State */
.sidebar.collapsed {
    width: 60px;
}

/* Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    top: 16px;
    right: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dark .sidebar-toggle-btn {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.sidebar-toggle-btn:hover {
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1f2937);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark .sidebar-toggle-btn:hover {
    background: #374151;
    color: #f3f4f6;
}

.sidebar.collapsed .sidebar-toggle-btn {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-toggle-btn:hover {
    transform: rotate(180deg) scale(1.15);
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: all 0.3s ease;
}

.dark .sidebar-header {
    border-bottom-color: #374151;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
}

.sidebar-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

.dark .sidebar-header h3 {
    color: #9ca3af;
}

.sidebar.collapsed .sidebar-header h3 {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.dark .category-item {
    color: #9ca3af;
}

.sidebar.collapsed .category-item {
    padding: 10px;
    justify-content: center;
    position: relative;
}

.sidebar.collapsed .category-item .category-name,
.sidebar.collapsed .category-item .category-count {
    display: none;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .category-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    padding: 6px 12px;
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #1f2937);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
}

.dark .sidebar.collapsed .category-item:hover::after {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

.category-item:hover {
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1f2937);
}

.dark .category-item:hover {
    background: #374151;
    color: #f3f4f6;
}

.category-item.active {
    background: #3b82f6;
    color: white;
}

.dark .category-item.active {
    background: #2563eb;
}

.category-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.category-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
    background: var(--bg-tertiary, #f1f5f9);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.dark .category-count {
    background: #4b5563;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    opacity: 1;
}

/* Sidebar Content (Tags) */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.tag-section {
    margin-bottom: 20px;
}

.tag-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 0 12px;
}

.dark .tag-section-title {
    color: #9ca3af;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tag-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary, #6b7280);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.dark .tag-item {
    color: #9ca3af;
}

.tag-item:hover {
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #1f2937);
}

.dark .tag-item:hover {
    background: #374151;
    color: #f3f4f6;
}

.tag-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    font-weight: 500;
}

.dark .tag-item.active {
    background: rgba(37, 99, 235, 0.25);
    color: #60a5fa;
}

.tag-count {
    font-size: 11px;
    opacity: 0.7;
    background: var(--bg-tertiary, #f1f5f9);
    padding: 2px 6px;
    border-radius: 8px;
}

.dark .tag-count {
    background: #4b5563;
}

.tag-item.active .tag-count {
    background: #3b82f6;
    color: white;
    opacity: 1;
}

.dark .tag-item.active .tag-count {
    background: #2563eb;
}

/* Content Area (next to sidebar) */
.main-layout > *:not(.sidebar) {
    flex: 1;
    overflow: auto;
}

/* Scrollbar styling for sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
}

.dark .sidebar-content::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #6b7280);
}

.dark .sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============================================
   ENHANCED SEARCH SECTION
   ============================================ */

/* Search Section - Centered & Prominent (like start.html) */
.search-section {
    padding: 24px 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: all 0.3s ease;
    position: relative;
    z-index: 40;
}

.dark .search-section {
    border-bottom-color: #374151;
}

.search-section.has-results {
    padding: 16px 40px;
}

.search-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    text-align: center;
    margin: 0 0 8px 0;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.dark .search-title {
    color: #f3f4f6;
}

.search-section.has-results .search-title {
    display: none;
}

.search-subtitle {
    font-size: 16px;
    color: var(--text-secondary, #6b7280);
    text-align: center;
    margin: 0 0 16px 0;
    transition: all 0.3s ease;
}

.dark .search-subtitle {
    color: #9ca3af;
}

.search-section.has-results .search-subtitle {
    display: none;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.search-section.has-results .quick-actions {
    display: none;
}

.quick-action {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-secondary, #6b7280);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark .quick-action {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.quick-action:hover {
    background: var(--bg-primary, #ffffff);
    border-color: #3b82f6;
    color: var(--text-primary, #1f2937);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .quick-action:hover {
    background: #1f2937;
    border-color: #2563eb;
    color: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quick-action:active {
    transform: translateY(0);
}

.quick-action-icon {
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .search-section {
        padding: 20px 20px 20px;
    }
    
    .search-section.has-results {
        padding: 12px 20px;
    }
    
    .search-title {
        font-size: 24px;
    }
    
    .search-subtitle {
        font-size: 14px;
    }
    
    .quick-action {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .quick-action-icon {
        width: 14px;
        height: 14px;
    }
}

@media (min-width: 1024px) {
    .search-section {
        padding: 32px 40px 32px;
    }
    
    .search-title {
        font-size: 32px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        /* Sidebar blijft fixed overlay op tablet */
        z-index: 40;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px; /* Iets breder op mobiel */
        top: 0; /* Full height op mobiel */
    }

    .sidebar.collapsed {
        transform: translateX(-100%); /* Slide out volledig */
    }

    .sidebar-toggle-btn {
        right: -32px;
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   🔍 PROMINENT SEARCH BAR ENHANCEMENTS
   ============================================ */

/* Search bar hover effect */
[role="search"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[role="search"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Search input animations */
#homePageSearch {
    transition: all 0.2s ease;
}

#homePageSearch:focus {
    transform: scale(1.01);
}

/* Pulse animation on search icon */
[role="search"] svg {
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Stop animation when typing */
[role="search"]:focus-within svg {
    animation: none;
    opacity: 1;
}

/* Enhanced search section spacing */
.search-section {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

/* Gradient text for title (optional - uncomment to enable) */
/*
.search-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
*/

/* Mobile optimizations for prominent search */
@media (max-width: 640px) {
    .search-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    [role="search"] {
        border-radius: 16px; /* Minder rond op mobiel */
    }
    
    #homePageSearch {
        font-size: 16px; /* Voorkom zoom op iOS */
    }
}

/* Dark mode enhancements */
.dark [role="search"] {
    background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dark [role="search"]:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.dark [role="search"]:focus-within {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

/* Line clamp utility for multi-line text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* ============================================
   TOAST NOTIFICATIONS
   Modern, animated toast notifications
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 
                0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid currentColor;
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

/* Toast Types */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-success .toast-title {
    color: #065f46;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-error .toast-title {
    color: #991b1b;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning .toast-title {
    color: #92400e;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-info .toast-title {
    color: #1e40af;
}

/* Dark Mode */
.dark .toast {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 
                0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark .toast-title {
    color: #f3f4f6;
}

.dark .toast-message {
    color: #d1d5db;
}

.dark .toast-close {
    color: #6b7280;
}

.dark .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

.dark .toast-success .toast-title {
    color: #86efac;
}

.dark .toast-error .toast-title {
    color: #fca5a5;
}

.dark .toast-warning .toast-title {
    color: #fcd34d;
}

.dark .toast-info .toast-title {
    color: #93c5fd;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Animation variants */
@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 0 12px;
}

/* ============================================
   CLIPBOARD MODAL ANIMATIONS
   ============================================ */

/* Modal backdrop - no background, just for positioning */
#clipboardModal {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Modal content slide-in from bottom-right animation */
.clipboard-modal-content {
    transform: translateX(100%) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

#clipboardModal:not(.hidden) .clipboard-modal-content {
    transform: translateX(0) translateY(0);
    opacity: 1;
}

/* Scrollbar voor modal */
.clipboard-modal-content::-webkit-scrollbar {
    width: 6px;
}

.clipboard-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.clipboard-modal-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.clipboard-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

/* Category button compact styling */
.category-option {
    position: relative;
    transition: all 0.15s ease;
}

.category-option:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.dark .category-option:hover {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.category-option:active {
    transform: scale(0.98);
}

/* ============================================
   CLIPBOARD NOTIFICATION BUTTON
   ============================================ */

#clipboardNotificationBtn {
    animation: slideInFromRight 0.3s ease-out;
}

#clipboardNotificationBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#clipboardNotificationBtn:active {
    transform: scale(0.95);
}

/* Badge pulse animation */
#clipboardBadge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Notification button dark mode */
.dark #clipboardNotificationBtn {
    color: rgb(229, 231, 235);
    background: rgb(31, 41, 55);
    border-color: rgb(75, 85, 99);
}

.dark #clipboardNotificationBtn:hover {
    background: rgb(55, 65, 81);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Enhanced Search Engine Dropdown Styles */
#searchEngineDropdown {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark #searchEngineDropdown {
    background: rgba(31, 41, 55, 0.95);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Dropdown animation improvements */
#searchEngineDropdown.opacity-0 {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
}

#searchEngineDropdown.opacity-100 {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Enhanced button hover effects */
#searchEngineDropdown button[data-engine] {
    position: relative;
    overflow: hidden;
}

#searchEngineDropdown button[data-engine]:hover {
    transform: translateX(2px);
}

#searchEngineDropdown button[data-engine]:active {
    transform: translateX(1px) scale(0.98);
}

/* Focus ring for keyboard navigation */
#searchEngineDropdown button[data-engine]:focus {
    outline: 2px solid rgb(59, 130, 246);
    outline-offset: -2px;
}

.dark #searchEngineDropdown button[data-engine]:focus {
    outline-color: rgb(96, 165, 250);
}

/* Active state enhancement */
#searchEngineDropdown button[data-engine][aria-selected="true"] {
    background: linear-gradient(135deg, rgb(239, 246, 255), rgb(219, 234, 254));
}

.dark #searchEngineDropdown button[data-engine][aria-selected="true"] {
    background: linear-gradient(135deg, rgb(55, 65, 81), rgb(75, 85, 99));
}

/* Dropdown arrow animation */
#dropdownArrow {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Improved scrollbar for dropdown */
#searchEngineDropdown::-webkit-scrollbar {
    width: 6px;
}

#searchEngineDropdown::-webkit-scrollbar-track {
    background: transparent;
}

#searchEngineDropdown::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

#searchEngineDropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

.dark #searchEngineDropdown::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.5);
}

.dark #searchEngineDropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.7);
}

/* Section headers in dropdown */
#searchEngineDropdown .text-xs.text-gray-400 {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Shortcut code styling */
#searchEngineDropdown code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.6875rem;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    #searchEngineDropdown {
        min-width: 260px;
        max-width: calc(100vw - 32px);
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }
    
    #searchEngineDropdown button[data-engine] {
        padding: 12px 16px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    #searchEngineDropdown,
    #dropdownArrow,
    #searchEngineDropdown button[data-engine] {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #searchEngineDropdown {
        border-width: 2px;
        border-color: currentColor;
    }
    
    #searchEngineDropdown button[data-engine]:focus {
        outline-width: 3px;
    }
}
