:root {
            --bg: hsl(0 0% 100%);
            --text: hsl(0 0% 9%);
            --muted: hsl(0 0% 45%);
            --panel: hsl(0 0% 98%);
            --panel-2: hsl(0 0% 95%);
            --ring: hsl(210 100% 50%);
            --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        [data-theme="dark"] {
            --bg: hsl(0 0% 7%);
            --text: hsl(0 0% 95%);
            --muted: hsl(0 0% 60%);
            --panel: hsl(0 0% 11%);
            --panel-2: hsl(0 0% 15%);
            --ring: hsl(210 100% 60%);
            --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.5;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .wrap {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            width: 100%;
        }

        header {
            position: sticky;
            top: 0;
            background: var(--bg);
            border-bottom: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
            z-index: 100;
            backdrop-filter: blur(10px);
        }

        .toolbar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            flex-wrap: wrap;
        }

        /* Mobile: Header met hamburger rechts */
        @media (max-width: 768px) {
            .toolbar {
                padding: 12px 16px;
                gap: 12px;
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: space-between;
                align-items: center;
            }

            .title {
                order: 1;
                flex: 0 0 auto;
                font-size: 1.125rem;
                font-weight: 600;
            }

            .hamburger-btn {
                order: 2;
                flex: 0 0 auto;
            }

            .search {
                order: 3;
                flex: 1 1 100%;
                width: 100%;
                max-width: 100%;
                margin-top: 8px;
                height: 48px;
                border-radius: 12px;
                padding: 12px 14px;
            }

            .search input {
                font-size: 16px;
            }

            .toolbar-actions {
                display: none !important;
            }
        }

        .toolbar-actions {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            margin-left: auto;
            flex-wrap: nowrap;
        }

        .title {
            font-size: 18px;
            font-weight: 600;
            white-space: nowrap;
        }

        /* One Favorite Logo Styling */
        .one-favorite-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.125rem;
            font-weight: 700;
            line-height: 1.6;
            color: var(--text);
            margin: 0;
            padding: 0;
            transition: color 200ms ease;
            -webkit-font-smoothing: antialiased;
        }

        .one-favorite-title .star-icon {
            width: 1.25rem;
            height: 1.25rem;
            color: #eab308;
            transition: transform 300ms ease;
        }

        .one-favorite-title:hover .star-icon {
            transform: rotate(72deg) scale(1.1);
        }

        .one-favorite-title span {
            font-weight: 700;
            font-size: 1.125rem;
        }

        @media (max-width: 768px) {
            .one-favorite-title {
                font-size: 1rem;
            }

            .one-favorite-title .star-icon {
                width: 1rem;
                height: 1rem;
            }

            .one-favorite-title span {
                font-size: 1rem;
            }
        }

        .search {
            flex: 1 1 auto;
            max-width: 600px;
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 12px;
            padding: 10px 14px;
            height: 44px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease;
        }

        .search:focus-within {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        .search svg {
            flex-shrink: 0;
            color: var(--muted);
        }

        .search input {
            flex: 1;
            border: none;
            background: transparent;
            color: var(--text);
            font-size: 14px;
            outline: none;
            width: 100%;
        }

        .search input::placeholder {
            color: var(--muted);
        }

        /* Engine Selector Button in Search Bar */
        #engine-btn {
            flex-shrink: 0;
            color: var(--text);
        }

        #engine-btn:hover {
            background: var(--panel-2) !important;
        }

        .btn {
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 14px;
            color: var(--text);
            cursor: pointer;
            transition: all .2s ease;
            white-space: nowrap;
        }

        .btn:hover {
            background: var(--panel-2);
            border-color: color-mix(in hsl, var(--text) 20%, transparent);
        }

        main {
            flex: 1;
            padding: 24px 0;
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        .card {
            background: var(--panel);
            border-radius: 16px;
            padding: 16px;
            box-shadow: var(--card-shadow);
            display: grid;
            grid-template-rows: auto 1fr auto;
            gap: 10px;
            border: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
            transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
            outline: none;
            text-decoration: none;
            cursor: pointer;
            position: relative;
        }

        /* Herstel de icon styling */

        .card h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            font-weight: 600;
            margin: 0;
            color: var(--text);
        }

        .card .icon {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg);
            border-radius: 6px;
            overflow: hidden;
        }

        .card .icon img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
            transition: transform 0.2s ease;
        }

        .card:hover .icon img {
            transform: scale(1.05);
        }

        /* Icon loading state */
        .card .icon img[src*="clearbit.com"],
        .card .icon img[src*="google.com/s2/favicons"],
        .card .icon img[src*="duckduckgo.com"] {
            padding: 2px;
        }

        .card p {
            font-size: 13px;
            color: var(--muted);
            line-height: 1.4;
            margin: 0;
        }

        .card-actions {
            position: absolute;
            top: 8px;
            right: 8px;
            display: none;
            gap: 6px;
            z-index: 10;
        }

        .card:hover .card-actions {
            display: flex;
        }

        .card-action-btn {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .card-action-btn:hover {
            transform: scale(1.1);
        }

        .card-favorite:hover {
            background: #fbbf24;
            color: white;
            border-color: #fbbf24;
        }

        .card-favorite.is-favorite {
            background: #fbbf24;
            color: white;
            border-color: #fbbf24;
        }

        .card-delete:hover {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }

        /* Article card specific styles */
        .card-icon-wrapper {
            position: relative;
            width: 64px;
            height: 64px;
            margin: 0 auto 8px;
        }

        .card-icon {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border-radius: 12px;
            background: var(--bg);
            padding: 8px;
        }

        .article-mini-badge {
            position: absolute;
            bottom: -6px;
            right: -6px;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.65rem;
            font-weight: 600;
            white-space: nowrap;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }

        .article-mini-badge.read {
            background: rgba(34, 197, 94, 0.95);
            color: white;
        }

        .article-mini-badge.unread {
            background: rgba(59, 130, 246, 0.95);
            color: white;
        }

        /* Sortable drag & drop styles */
        .sortable-ghost {
            opacity: 0.4;
            background: var(--ring);
            transform: scale(1.05);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        }

        .sortable-drag {
            opacity: 1;
            cursor: grabbing !important;
            transform: rotate(2deg);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        /* Mobile drag feedback - show when user is holding */
        @media (max-width: 768px) {
            .card {
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }
            
            .card:active {
                transform: scale(0.98);
            }
            
            /* Visual feedback during delay period */
            .sortable-fallback {
                animation: pulseGrab 0.2s ease-out;
            }
        }

        @keyframes pulseGrab {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(0.98);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            }
            100% {
                transform: scale(1.02);
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
            }
        }

        .card-title {
            font-size: 14px;
            font-weight: 600;
            margin: 8px 0 4px 0;
            color: var(--text);
            line-height: 1.3;
        }

        .card-subtitle {
            font-size: 12px;
            color: var(--text-secondary);
            margin: 0;
        }

        .articles-feed-section {
            padding: 20px;
            max-width: 1400px;
            margin: 0 auto;
        }

        /* Article Tags Filter (Mobiel) */
        .article-tags-filter {
            padding: 12px 0;
            margin: 0 -20px 16px -20px;
            background: var(--panel);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .article-tags-scroll {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 0 20px;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .article-tags-scroll::-webkit-scrollbar {
            display: none;
        }

        .article-tag-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 20px;
            border: 2px solid var(--border);
            background: var(--bg);
            color: var(--text);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }

        .article-tag-chip:hover {
            border-color: #fbbf24;
            background: rgba(251, 191, 36, 0.1);
        }

        .article-tag-chip.active {
            background: #fbbf24;
            border-color: #fbbf24;
            color: #78350f;
            font-weight: 600;
        }

        .tag-chip-icon {
            font-size: 16px;
            line-height: 1;
        }

        .tag-chip-text {
            line-height: 1;
        }

        .tag-chip-count {
            background: rgba(0, 0, 0, 0.15);
            color: currentColor;
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            min-width: 18px;
            text-align: center;
        }

        .article-tag-chip.active .tag-chip-count {
            background: rgba(120, 53, 15, 0.2);
        }

        /* Verberg tag filter op desktop (alleen mobiel) */
        @media (min-width: 769px) {
            .article-tags-filter {
                display: none !important;
            }
        }

        .articles-feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .articles-feed-header h2 {
            margin: 0;
            font-size: 1.75rem;
            color: var(--text);
        }

        #articles-grid-inline {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 24px;
            margin-top: 20px;
        }

        /* Article Card Styling - EXACT COPY from modern.html css/components.css */
        .article-card {
            background: var(--panel);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            border: 1px solid var(--border);
            display: flex;
            flex-direction: column;
        }

        .article-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            border-color: var(--ring);
        }

        .article-card-image {
            width: 100%;
            height: 200px;
            overflow: hidden;
            background: var(--panel-2);
            position: relative;
        }

        .article-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .article-card:hover .article-card-image img {
            transform: scale(1.05);
        }

        .article-card-content {
            padding: 16px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .article-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            gap: 8px;
        }

        .article-domain {
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
        }

        .article-read-badge {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .article-read-badge.read {
            background: rgba(34, 197, 94, 0.15);
            color: #22c55e;
        }

        .article-read-badge.unread {
            background: rgba(59, 130, 246, 0.15);
            color: #3b82f6;
        }

        .article-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text);
            margin: 0 0 8px 0;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .article-description {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.5;
            margin: 0 0 12px 0;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            flex: 1;
        }

        .article-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            padding-top: 12px;
            border-top: 1px solid var(--border);
        }

        .article-date {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .article-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .article-tag {
            padding: 4px 10px;
            background: var(--panel-2);
            border-radius: 12px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .article-tag:hover {
            background: var(--ring);
            color: white;
        }

        .article-actions {
            position: absolute;
            top: 12px;
            right: 12px;
            display: flex;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .article-card:hover .article-actions {
            opacity: 1;
        }

        .article-action-btn {
            background: rgba(255, 255, 255, 0.95);
            border: none;
            border-radius: 6px;
            padding: 8px 10px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .article-action-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        }

        .article-action-btn.delete {
            background: rgba(239, 68, 68, 0.95);
            color: white;
        }

        [data-theme="dark"] .article-action-btn {
            background: rgba(30, 30, 30, 0.95);
            color: var(--text);
        }

        /* Add Article Card Styling */
        #articles-grid-inline .add-article-card {
            border: 2px dashed color-mix(in hsl, var(--text) 20%, transparent);
            background: color-mix(in hsl, var(--panel) 50%, transparent);
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 200px;
            transition: all 0.2s ease;
        }

        #articles-grid-inline .add-article-card:hover {
            border-color: color-mix(in hsl, var(--ring) 40%, transparent);
            background: color-mix(in hsl, var(--panel) 80%, var(--ring) 5%);
            transform: translateY(-2px);
        }

        .add-article-content {
            text-align: center;
            padding: 20px;
        }

        .add-article-icon {
            font-size: 3rem;
            margin-bottom: 12px;
            opacity: 0.6;
        }

        .add-article-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
            margin: 0 0 8px 0;
        }

        .add-article-description {
            font-size: 13px;
            color: var(--muted);
            margin: 0 0 16px 0;
        }

        .add-article-btn {
            background: var(--ring);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .add-article-btn:hover {
            background: color-mix(in hsl, var(--ring) 85%, black 15%);
        }

        .deleted-apps-banner {
            background: transparent;
            border: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
            border-radius: 8px;
            padding: 8px 12px;
            margin-bottom: 16px;
            display: none;
            align-items: center;
            gap: 12px;
            font-size: 13px;
        }

        .deleted-apps-banner.show {
            display: flex;
        }

        .deleted-apps-banner .banner-text {
            flex: 1;
            color: var(--muted);
            font-size: 12px;
        }

        .deleted-apps-banner .banner-count {
            color: var(--text);
            font-weight: 500;
            font-size: 12px;
        }

        .deleted-apps-banner button {
            background: transparent;
            color: var(--ring);
            border: 1px solid color-mix(in hsl, var(--ring) 30%, transparent);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .deleted-apps-banner button:hover {
            background: color-mix(in hsl, var(--ring) 10%, transparent);
            border-color: var(--ring);
        }

        .footer {
            border-top: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
            padding: 12px 20px;
            text-align: center;
            color: var(--muted);
            font-size: 12px;
            background: var(--bg);
        }

        .footer-content {
            display: flex;
            align-items: center;
            justify-content: center;
            max-width: 1200px;
            margin: 0 auto;
        }

        .footer-text {
            color: var(--muted);
            line-height: 1.5;
        }

        .footer-link {
            color: var(--ring);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        .footer-link:hover {
            color: var(--text);
            text-decoration: underline;
        }

        .coffee-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            border-radius: 8px;
            background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
            color: #ea580c;
            text-decoration: none;
            font-weight: 600;
            font-size: 12px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(234, 88, 12, 0.15);
        }

        .coffee-btn:hover {
            background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(234, 88, 12, 0.25);
        }

        [data-theme="dark"] .coffee-btn {
            background: linear-gradient(135deg, rgba(234, 88, 12, 0.3) 0%, rgba(234, 88, 12, 0.2) 100%);
            color: #fb923c;
        }

        [data-theme="dark"] .coffee-btn:hover {
            background: linear-gradient(135deg, rgba(234, 88, 12, 0.4) 0%, rgba(234, 88, 12, 0.3) 100%);
        }

        /* Responsive footer */
        @media (min-width: 768px) {
            .footer-text {
                font-size: 13px;
            }
        }

        .kpi {
            display: flex;
            gap: 10px;
            align-items: center;
            color: var(--muted);
            font-size: 12px;
            flex-wrap: nowrap;
            padding-right: 12px;
            border-right: 1px solid var(--border);
        }

        .pill {
            padding: 4px 10px;
            border-radius: 999px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
            white-space: nowrap;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        /* Tabs styling */
        .tabs {
            display: flex;
            gap: 8px;
            padding: 16px 0 0 0;
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .tabs::-webkit-scrollbar {
            display: none;
        }

        .tab {
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            padding: 12px 20px;
            font-size: 14px;
            font-weight: 500;
            color: var(--muted);
            cursor: pointer;
            transition: all .2s ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .tab:hover {
            color: var(--text);
            background: color-mix(in hsl, var(--text) 5%, transparent);
            border-radius: 8px 8px 0 0;
        }

        .tab.active {
            color: var(--ring);
            border-bottom-color: var(--ring);
        }

        .tab-icon {
            font-size: 16px;
        }

        /* Floating Chat Widget */
        .chat-fab {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
            color: white;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
            z-index: 1000;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .chat-fab .chat-icon {
            width: 28px;
            height: 28px;
            stroke-width: 2;
            transition: transform 0.3s ease;
        }

        .chat-fab:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
        }

        .chat-fab:hover .chat-icon {
            transform: scale(1.1);
            animation: sparkle 0.6s ease-in-out;
        }

        .chat-fab:active {
            transform: scale(0.95);
        }

        @keyframes sparkle {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.2) rotate(10deg);
            }
        }

        /* Floating Tags Filter Button (Mobiel - Later Lezen) */
        .tags-fab {
            position: fixed;
            bottom: 104px;
            right: 24px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            color: #78350f;
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
            z-index: 1001;
            transition: all 0.3s ease;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        .tags-fab:hover {
            transform: scale(1.1) rotate(-5deg);
            box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
        }

        .tags-fab:active {
            transform: scale(0.95);
        }

        .tags-fab svg {
            width: 24px;
            height: 24px;
        }

        .tags-fab-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #dc2626;
            color: white;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 20px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .chat-panel {
            position: fixed;
            bottom: 94px;
            right: 24px;
            width: 380px;
            max-width: calc(100vw - 48px);
            height: 500px;
            max-height: calc(100vh - 150px);
            background: var(--panel);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            display: none;
            flex-direction: column;
            z-index: 999;
            animation: slideUp 0.3s ease;
        }

        .chat-panel.open {
            display: flex;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .chat-header {
            padding: 16px;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chat-header h3 {
            margin: 0;
            font-size: 16px;
            font-weight: 600;
        }

        .chat-bot-select {
            flex: 1;
            padding: 8px 12px;
            border-radius: 8px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--text);
            font-size: 14px;
            cursor: pointer;
        }

        .chat-clear {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background: transparent;
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all 0.2s ease;
        }

        .chat-clear:hover {
            background: var(--panel-2);
            color: #ef4444;
            border-color: #ef4444;
        }

        .chat-close {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background: transparent;
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            transition: all 0.2s ease;
        }

        .chat-close:hover {
            background: var(--panel-2);
            color: var(--text);
        }

        .chat-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chat-message {
            padding: 10px 14px;
            border-radius: 12px;
            max-width: 80%;
            font-size: 14px;
            line-height: 1.4;
        }

        .chat-message.user {
            background: var(--ring);
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }

        .chat-message.bot {
            background: var(--panel-2);
            color: var(--text);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }

        .chat-input-form {
            padding: 16px;
            border-top: 1px solid color-mix(in var(--text) 10%, transparent);
            display: flex;
            gap: 8px;
        }

        .chat-input-form input {
            flex: 1;
            padding: 10px 14px;
            border-radius: 8px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--text);
            font-size: 14px;
            outline: none;
        }

        .chat-input-form input:focus {
            border-color: var(--ring);
        }

        .chat-send {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: var(--ring);
            color: white;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            transition: all 0.2s ease;
        }

        .chat-send:hover {
            opacity: 0.9;
            transform: scale(1.05);
        }

        .chat-send:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .chat-history {
            padding: 12px 16px;
            background: var(--panel-2);
            border-bottom: 1px solid color-mix(in var(--text) 10%, transparent);
        }

        .chat-history-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 8px;
        }

        .chat-history-items {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .chat-history-item {
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 13px;
            color: var(--text);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-history-item:hover {
            background: var(--panel);
        }

        /* Mobile tab aanpassingen */
        @media (max-width: 768px) {
            .tabs {
                gap: 4px;
                padding: 12px 0 0 0;
            }

            .tab {
                padding: 10px 14px;
                font-size: 13px;
                flex: 1;
                justify-content: center;
            }

            .tab-icon {
                font-size: 14px;
            }

            .chat-panel {
                bottom: 90px;
                right: 16px;
                width: calc(100vw - 32px);
                height: calc(100vh - 140px);
            }

            .chat-fab {
                bottom: 16px;
                right: 16px;
                width: 56px;
                height: 56px;
                font-size: 24px;
            }
        }

        /* Mobile optimalisaties */
        @media (max-width: 768px) {
            .wrap {
                padding: 0 16px;
            }

            /* Verwijderd - nieuwe mobile header regels staan eerder in het bestand */

            /* Verberg theme toggle en modern design knop op mobiel voor schonere UI */
            #toggle,
            .toolbar-actions a[href="index.html"] {
                display: none !important;
            }

            /* Verberg sidebar toggle op mobiel - wordt vervangen door FAB */
            .sidebar-toggle {
                display: none !important;
            }

            .kpi {
                border-right: none;
                padding-right: 0;
            }

            .btn {
                padding: 10px 12px;
                font-size: 13px;
            }

            .grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            /* 7. Compactere cards op mobiel */
            .card {
                padding: 12px;
                gap: 8px;
            }

            .card h3 {
                font-size: 14px;
                margin-bottom: 2px;
            }

            .card p {
                font-size: 11px;
                line-height: 1.3;
            }

            .card .icon {
                width: 48px;
                height: 48px;
            }

            /* 5. Floating Action Button optimaliseren voor mobiel */
            .add-favorite-btn {
                bottom: 80px;
                right: 16px;
                min-width: 56px;
                width: 56px;
                height: 56px;
                padding: 0;
                border-radius: 50%;
            }

            .add-favorite-btn .add-btn-text {
                display: none; /* Verberg tekst, toon alleen + icon */
            }

            .add-favorite-btn .add-btn-icon {
                font-size: 24px;
            }

            /* 6. Chat Widget versimpelen op mobiel */
            .chat-fab {
                width: 56px;
                height: 56px;
                bottom: 20px;
                right: 16px;
                font-size: 24px;
            }

            .chat-panel {
                bottom: 86px;
                right: 16px;
                width: calc(100vw - 32px);
                max-width: 100%;
                height: 60vh;
                max-height: 500px;
            }

            /* 4. Auto-hide header support */
            header {
                will-change: transform;
                transition: transform 0.3s ease-in-out;
            }

            header.header-hidden {
                transform: translateY(-100%);
            }

            .footer {
                padding: 16px;
                font-size: 12px;
            }

            main {
                padding: 16px 0;
            }
        }

        /* Tablet optimalisaties */
        @media (min-width: 769px) and (max-width: 1024px) {
            .grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 18px;
            }
        }

        /* Small desktop */
        @media (min-width: 1025px) and (max-width: 1280px) {
            .grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Touch-friendly aanpassingen */
        @media (pointer: coarse) {
            .btn {
                min-height: 44px;
                padding: 10px 16px;
            }

            .card {
                min-height: 120px;
            }
        }

        .add-favorite-btn {
            position: fixed;
            bottom: 100px;
            right: 24px;
            min-width: 140px;
            height: 48px;
            border-radius: 24px;
            background: var(--ring);
            border: 2px solid var(--ring);
            color: white;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 998;
            transition: all 0.2s ease;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 20px;
        }

        .add-favorite-btn.show {
            display: flex;
        }

        .add-favorite-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
            opacity: 0.95;
        }

        .add-btn-icon {
            font-size: 20px;
            line-height: 1;
        }

        .add-btn-text {
            font-size: 14px;
            letter-spacing: 0.3px;
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 1001;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal {
            background: var(--panel);
            border-radius: 16px;
            padding: 24px;
            max-width: 750px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
        }

        .modal h2 {
            margin: 0 0 20px 0;
            font-size: 20px;
            color: var(--text);
        }

        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-group label {
            font-size: 13px;
            font-weight: 500;
            color: var(--text);
        }

        .form-group input {
            padding: 10px 14px;
            border-radius: 8px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--text);
            font-size: 14px;
            outline: none;
        }

        .form-group input:focus {
            border-color: var(--ring);
        }

        .form-actions {
            display: flex;
            gap: 12px;
            margin-top: 8px;
        }

        .form-actions button {
            flex: 1;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-primary {
            background: var(--ring);
            color: white;
            border: none;
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-secondary {
            background: transparent;
            color: var(--text);
            border: 1px solid color-mix(in var(--text) 12%, transparent);
        }

        .btn-secondary:hover {
            background: var(--panel-2);
        }

        .empty-state {
            grid-column: 1 / -1;
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 16px;
        }

        .empty-state h3 {
            margin: 0 0 8px 0;
            color: var(--text);
            font-size: 18px;
        }

        .empty-state p {
            color: var(--muted);
            font-size: 14px;
            margin: 0 0 20px 0;
        }

        .delete-modal {
            background: var(--panel);
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            text-align: center;
        }

        .delete-modal-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }

        .delete-modal h2 {
            margin: 0 0 12px 0;
            font-size: 20px;
            color: var(--text);
        }

        .delete-modal p {
            margin: 0 0 24px 0;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.5;
        }

        .delete-modal-actions {
            display: flex;
            gap: 12px;
        }

        .delete-modal-actions button {
            flex: 1;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-danger {
            background: #ef4444;
            color: white;
            border: none;
        }

        .btn-danger:hover {
            background: #dc2626;
        }

        .restore-modal {
            background: var(--panel);
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            text-align: center;
        }

        .restore-modal-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }

        .restore-modal h2 {
            margin: 0 0 12px 0;
            font-size: 20px;
            color: var(--text);
        }

        .restore-modal p {
            margin: 0 0 24px 0;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.5;
        }

        .restore-modal-actions {
            display: flex;
            gap: 12px;
        }

        .restore-modal-actions button {
            flex: 1;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-success {
            background: var(--ring);
            color: white;
            border: none;
        }

        .btn-success:hover {
            opacity: 0.9;
        }

        .reset-modal {
            background: var(--panel);
            border-radius: 16px;
            padding: 24px;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            text-align: center;
        }

        .reset-modal-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }

        .reset-modal h2 {
            margin: 0 0 12px 0;
            font-size: 20px;
            color: var(--text);
        }

        .reset-modal p {
            margin: 0 0 24px 0;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.5;
        }

        .reset-modal-actions {
            display: flex;
            gap: 12px;
        }

        .reset-modal-actions button {
            flex: 1;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        /* Social media creator badge */
        .creator-badge {
            position: absolute;
            top: 8px;
            left: 8px;
            font-size: 9px;
            padding: 3px 7px;
            border-radius: 10px;
            background: var(--ring);
            color: white;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            z-index: 5;
            opacity: 0.9;
        }

        /* Badge colors per subcategory */
        .creator-badge.ai {
            background: #8b5cf6;
        }

        .creator-badge.content {
            background: #3b82f6;
        }

        .creator-badge.ceo {
            background: #ef4444;
        }

        .creator-badge.video {
            background: #f59e0b;
        }

        .creator-badge.design {
            background: #ec4899;
        }

        .creator-badge.social-selling {
            background: #10b981;
        }

        .creator-badge.marketing {
            background: #6366f1;
        }

        .creator-badge.coaching {
            background: #14b8a6;
        }

        /* Nieuwe stijlen voor subcategorieën */
        .subcategory-filters {
            display: none;
            padding: 12px 0;
            gap: 8px;
            flex-wrap: wrap;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
        }

        .subcategory-filters.show {
            display: flex;
        }

        .subcategory-pill {
            padding: 6px 14px;
            border-radius: 16px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .subcategory-pill:hover {
            background: var(--panel);
            color: var(--text);
        }

        .subcategory-pill.active {
            background: var(--ring);
            color: white;
            border-color: var(--ring);
        }

        /* Article subcategory pills - same styling as social media pills */
        .article-subcategory-pill {
            padding: 6px 14px;
            border-radius: 16px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .article-subcategory-pill:hover {
            background: var(--panel);
            color: var(--text);
        }

        .article-subcategory-pill.active {
            background: var(--ring);
            color: white;
            border-color: var(--ring);
        }

        /* Tag filters */
        .tag-filters {
            display: none;
            padding: 12px 0;
            gap: 8px;
            flex-wrap: wrap;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
            max-height: 200px;
            overflow-y: auto;
        }

        .tag-filters.show {
            display: flex;
        }

        .tag-pill {
            padding: 5px 12px;
            border-radius: 12px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--muted);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .tag-pill:hover {
            background: var(--panel);
            color: var(--text);
            transform: translateY(-1px);
        }

        .tag-pill.active {
            background: var(--ring);
            color: white;
            border-color: var(--ring);
        }

        .tag-pill .tag-count {
            font-size: 10px;
            opacity: 0.7;
            font-weight: 400;
        }

        .tag-clear-btn {
            background: transparent;
            color: var(--muted);
            border: 1px dashed color-mix(in hsl, var(--text) 12%, transparent);
        }

        .tag-clear-btn:hover {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }

        /* Sidebar Toggle Button */
        .sidebar-toggle {
            position: fixed;
            top: 80px;
            left: 16px;
            z-index: 999;
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            color: var(--text);
            width: 40px;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .sidebar-toggle:hover {
            background: var(--ring);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .sidebar-badge {
            position: absolute;
            top: -6px;
            right: -6px;
            background: var(--ring);
            color: white;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 10px;
            min-width: 20px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        /* Tags Sidebar */
        .tags-sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: 280px;
            height: 100vh;
            background: var(--panel);
            border-right: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
        }

        .tags-sidebar.open {
            transform: translateX(0);
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .sidebar-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
        }

        .sidebar-close {
            background: transparent;
            border: none;
            color: var(--muted);
            font-size: 28px;
            line-height: 1;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .sidebar-close:hover {
            background: color-mix(in hsl, var(--text) 8%, transparent);
            color: var(--text);
        }

        .sidebar-search {
            padding: 16px 20px;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
        }

        .sidebar-search input {
            width: 100%;
            padding: 8px 12px;
            background: var(--bg);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 6px;
            color: var(--text);
            font-size: 14px;
            outline: none;
            transition: all 0.2s ease;
        }

        .sidebar-search input:focus {
            border-color: var(--ring);
            box-shadow: 0 0 0 3px color-mix(in hsl, var(--ring) 20%, transparent);
        }

        .sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 12px 0;
        }

        /* Tag Section */
        .tag-section {
            margin-bottom: 8px;
        }

        .tag-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 20px;
            cursor: pointer;
            user-select: none;
            transition: background 0.2s ease;
        }

        .tag-section-header:hover {
            background: color-mix(in hsl, var(--text) 5%, transparent);
        }

        .tag-section-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .tag-section-toggle {
            color: var(--muted);
            transition: transform 0.2s ease;
            font-size: 18px;
            line-height: 1;
        }

        .tag-section.collapsed .tag-section-toggle {
            transform: rotate(-90deg);
        }

        .tag-section-items {
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 4px 0;
            max-height: 500px;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .tag-section.collapsed .tag-section-items {
            max-height: 0;
        }

        .tag-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 20px 8px 32px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--muted);
            font-size: 14px;
        }

        .tag-item:hover {
            background: color-mix(in hsl, var(--text) 5%, transparent);
            color: var(--text);
        }

        .tag-item.active {
            background: color-mix(in hsl, var(--ring) 15%, transparent);
            color: var(--ring);
            font-weight: 500;
        }

        .tag-item-name {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .tag-item-count {
            font-size: 12px;
            opacity: 0.7;
            margin-left: 8px;
            background: color-mix(in hsl, var(--text) 8%, transparent);
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 500;
        }

        .tag-item.active .tag-item-count {
            background: var(--ring);
            color: white;
            opacity: 1;
        }

        .sidebar-footer {
            padding: 16px 20px;
            border-top: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
        }

        .clear-tags-btn {
            width: 100%;
            padding: 10px;
            background: transparent;
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 6px;
            color: var(--muted);
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s ease;
        }

        .clear-tags-btn:hover {
            background: #ef4444;
            border-color: #ef4444;
            color: white;
        }

        /* Sidebar Overlay */
        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .sidebar-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        /* Adjust main content when sidebar is open on desktop */
        @media (min-width: 1024px) {
            body.sidebar-open main {
                margin-left: 280px;
                transition: margin-left 0.3s ease;
            }

            body.sidebar-open header {
                margin-left: 280px;
                transition: margin-left 0.3s ease;
            }

            .sidebar-overlay {
                display: none;
            }
        }

        @media (max-width: 1023px) {
            .tags-sidebar {
                width: 280px;
            }

            .sidebar-toggle {
                display: flex;
            }
        }

        /* Toast Notifications */
        .toast-container {
            position: fixed;
            top: 80px;
            right: 24px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-width: 400px;
        }

        .toast {
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: start;
            gap: 12px;
            animation: slideInRight 0.3s ease;
            min-width: 300px;
        }

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

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

        .toast.info {
            border-left: 4px solid var(--ring);
        }

        .toast-icon {
            font-size: 20px;
            flex-shrink: 0;
        }

        .toast-content {
            flex: 1;
        }

        .toast-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: var(--text);
        }

        .toast-message {
            font-size: 13px;
            color: var(--muted);
        }

        .toast-undo-btn {
            background: transparent;
            border: 1px solid currentColor;
            color: var(--ring);
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            margin-right: 8px;
        }

        .toast-undo-btn:hover {
            background: var(--ring);
            color: white;
            transform: translateY(-1px);
        }

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

        .toast-close {
            background: transparent;
            border: none;
            color: var(--muted);
            cursor: pointer;
            padding: 0;
            font-size: 18px;
            line-height: 1;
            transition: color 0.2s ease;
        }

        .toast-close:hover {
            color: var(--text);
        }

        .toast-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }

        .toast-btn {
            flex: 1;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }

        .toast-btn-confirm {
            background: var(--ring);
            color: white;
        }

        .toast-btn-confirm:hover {
            background: color-mix(in hsl, var(--ring) 90%, black);
            transform: translateY(-1px);
        }

        .toast-btn-cancel {
            background: var(--panel-hover);
            color: var(--text);
            border: 1px solid var(--border);
        }

        .toast-btn-cancel:hover {
            background: var(--border);
            transform: translateY(-1px);
        }

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

        .confirmation-toast {
            min-width: 350px;
        }

        .confirmation-toast .toast-content {
            width: 100%;
        }


        @keyframes slideInRight {
            from {
                transform: translateX(400px);
                opacity: 0;
            }

            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* Clipboard Notification Badge Styles */
        .clipboard-notification-btn {
            position: relative;
            transition: all 0.3s ease;
        }

        .clipboard-notification-btn:hover {
            transform: scale(1.05);
        }

        .clipboard-notification-btn.has-notification {
            animation: bellShake 0.5s ease-in-out;
        }

        .clipboard-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: white;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 5px;
            border-radius: 10px;
            min-width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
            animation: badgePulse 2s ease-in-out infinite;
            border: 2px solid var(--bg);
        }

        @keyframes badgePulse {

            0%,
            100% {
                transform: scale(1);
                box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
            }

            50% {
                transform: scale(1.1);
                box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
            }
        }

        @keyframes bellShake {

            0%,
            100% {
                transform: rotate(0deg);
            }

            10%,
            30%,
            50%,
            70%,
            90% {
                transform: rotate(-10deg);
            }

            20%,
            40%,
            60%,
            80% {
                transform: rotate(10deg);
            }
        }

        /* Clipboard Popup Styles */
        .clipboard-popup {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: var(--panel);
            border: 1px solid var(--ring);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            max-width: 400px;
            z-index: 10001;
            animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: none;
        }

        .clipboard-popup.show {
            display: block;
        }

        .clipboard-popup-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .clipboard-popup-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--ring), #667eea);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .clipboard-popup-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text);
            margin: 0;
        }

        .clipboard-popup-subtitle {
            font-size: 13px;
            color: var(--muted);
            margin: 0;
        }

        .clipboard-url-preview {
            background: var(--panel-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 48px;
        }

        .clipboard-url-preview.loading {
            opacity: 0.7;
        }

        .clipboard-preview-favicon {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background: var(--panel);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .clipboard-preview-favicon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .clipboard-preview-favicon.fallback {
            background: linear-gradient(135deg, var(--ring), #667eea);
            color: white;
            font-weight: 600;
            font-size: 14px;
        }

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

        .clipboard-preview-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
            margin: 0 0 4px 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .clipboard-preview-url {
            font-size: 11px;
            color: var(--muted);
            font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: 0.2px;
        }

        .clipboard-preview-loading {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--muted);
            font-size: 12px;
        }

        .clipboard-preview-spinner {
            width: 12px;
            height: 12px;
            border: 2px solid var(--border);
            border-top: 2px solid var(--ring);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .clipboard-popup-actions {
            display: flex;
            gap: 8px;
        }

        .clipboard-action-btn.dismiss {
            background: transparent;
            color: var(--muted);
            padding: 8px;
            flex: 0;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .clipboard-action-btn.dismiss:hover {
            color: var(--text);
        }

        /* Article Tag Selector Styles */
        .tag-suggestion {
            transition: all 0.2s ease;
        }

        .tag-suggestion:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .tag-suggestion:active {
            transform: translateY(0);
        }

        .selected-tag {
            animation: tagAppear 0.2s ease;
        }

        @keyframes tagAppear {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        #add-custom-tag-btn:hover {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        #custom-tag-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 2px var(--accent-light, rgba(59, 130, 246, 0.1));
        }

        /* Category Selector in Clipboard Modal - Redesigned */
        .clipboard-category-section {
            margin-bottom: 12px;
        }

        .clipboard-label {
            display: flex;
            align-items: center;
            font-size: 11px;
            font-weight: 600;
            color: var(--muted);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .clipboard-category-select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--panel);
            color: var(--text);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 10px center;
            background-repeat: no-repeat;
            background-size: 14px;
            padding-right: 32px;
        }

        .clipboard-category-select:hover {
            border-color: var(--ring);
            background-color: var(--panel-2);
        }

        .clipboard-category-select:focus {
            outline: none;
            border-color: var(--ring);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
        }

        /* Tags System in Clipboard Modal - Minimalistic Redesign */
        .clipboard-tags-section {
            margin-bottom: 12px;
        }

        .clipboard-tags-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .clipboard-tags-suggestions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 6px;
            max-height: 60px;
            overflow: hidden;
        }

        .clipboard-tags-selected {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            min-height: 32px;
            padding: 8px;
            border: 1px dashed var(--border);
            border-radius: 8px;
            background: var(--panel-2);
            align-items: center;
        }

        .clipboard-tags-selected:empty::before {
            content: 'Geen tags geselecteerd';
            color: var(--muted);
            font-size: 12px;
            opacity: 0.6;
            font-style: italic;
        }

        .tag-suggestion {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px 10px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--panel);
            color: var(--muted);
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .tag-suggestion:hover {
            border-color: var(--ring);
            color: var(--text);
            background: var(--panel-2);
        }

        .tag-suggestion.selected {
            background: var(--ring);
            color: white;
            border-color: var(--ring);
            font-weight: 600;
        }

        .tag-selected {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 5px;
            background: var(--ring);
            color: white;
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
        }

        .tag-selected:hover {
            background: #5a67d8;
        }

        .tag-selected::after {
            content: '×';
            font-size: 12px;
            font-weight: bold;
            opacity: 0.7;
            margin-left: 2px;
        }

        .tag-selected:hover::after {
            opacity: 1;
        }

        .clipboard-actions-row {
            display: flex;
            gap: 8px;
            margin-top: 16px;
        }

        /* Redesigned Action Buttons - Smaller & Cleaner */
        .clipboard-action-btn {
            padding: 10px 16px;
            border-radius: 8px;
            border: none;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            position: relative;
            overflow: hidden;
        }

        .clipboard-action-btn.primary {
            flex: 1;
            background: linear-gradient(135deg, var(--ring), #667eea);
            color: white;
            box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
        }

        .clipboard-action-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }

        .clipboard-action-btn.primary:active {
            transform: translateY(0);
        }

        .clipboard-action-btn.secondary {
            flex: 0.8;
            background: var(--panel-2);
            color: var(--text);
            border: 1px solid var(--border);
            font-size: 12px;
        }

        .clipboard-action-btn.secondary:hover {
            background: var(--panel);
            border-color: var(--ring);
        }

        .clipboard-action-btn.tertiary {
            flex: 0;
            width: 36px;
            padding: 10px;
            background: transparent;
            color: var(--muted);
            border: 1px solid var(--border);
            font-size: 14px;
            font-weight: normal;
        }

        .clipboard-action-btn.tertiary:hover {
            background: var(--panel-2);
            color: var(--text);
        }

        /* Advanced Clipboard Modal */
        .advanced-clipboard-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .advanced-clipboard-modal.show {
            display: flex;
        }

        .advanced-modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
        }

        .advanced-modal-content {
            position: relative;
            width: 90%;
            max-width: 500px;
            background: var(--bg);
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border);
            max-height: 80vh;
            overflow: hidden;
        }

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

        .advanced-modal-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
        }

        .advanced-modal-close {
            background: none;
            border: none;
            font-size: 20px;
            color: var(--muted);
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .advanced-modal-close:hover {
            background: var(--panel-2);
            color: var(--text);
        }

        .advanced-modal-body {
            padding: 20px 24px;
            max-height: 60vh;
            overflow-y: auto;
        }

        .advanced-url-preview {
            background: var(--panel-2);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 48px;
        }

        .advanced-url-preview.loading {
            opacity: 0.7;
        }

        .advanced-field-group {
            margin-bottom: 20px;
        }

        .advanced-label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 6px;
        }

        .advanced-select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--panel);
            color: var(--text);
            font-size: 14px;
            cursor: pointer;
        }

        .advanced-tags-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .advanced-tags-suggestions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 6px;
        }

        .advanced-tags-selected {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            min-height: 32px;
            padding: 8px;
            border: 1px dashed var(--border);
            border-radius: 6px;
            background: var(--panel-2);
            align-items: center;
        }

        .advanced-tags-selected:empty::before {
            content: 'Geen tags geselecteerd';
            color: var(--muted);
            font-size: 12px;
            opacity: 0.6;
            font-style: italic;
        }

        .advanced-modal-footer {
            display: flex;
            gap: 12px;
            padding: 16px 24px 20px;
            border-top: 1px solid var(--border);
            justify-content: flex-end;
        }

        .advanced-btn {
            padding: 10px 20px;
            border-radius: 8px;
            border: none;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .advanced-btn.primary {
            background: linear-gradient(135deg, var(--ring), #667eea);
            color: white;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
        }

        .advanced-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
        }

        .advanced-btn.secondary {
            background: var(--panel-2);
            color: var(--muted);
            border: 1px solid var(--border);
        }

        .advanced-btn.secondary:hover {
            background: var(--panel);
            color: var(--text);
        }

        @keyframes slideInUp {
            from {
                transform: translateY(100px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }

            to {
                transform: translateX(400px);
                opacity: 0;
            }
        }

        .toast.closing {
            animation: slideOutRight 0.3s ease;
        }

        /* Search Suggestions */
        .search-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-top: none;
            border-radius: 0 0 8px 8px;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .search-suggestions.show {
            display: block;
        }

        .search-suggestion-group {
            padding: 8px 0;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
        }

        .search-suggestion-group:last-child {
            border-bottom: none;
        }

        .search-suggestion-title {
            padding: 8px 14px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            color: var(--muted);
            letter-spacing: 0.5px;
        }

        .search-suggestion {
            padding: 10px 14px;
            cursor: pointer;
            transition: background 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text);
        }

        .search-suggestion:hover,
        .search-suggestion.selected {
            background: var(--panel-2);
        }

        .search-suggestion-icon {
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .search-suggestion-text {
            flex: 1;
            font-size: 14px;
        }

        .search-suggestion-meta {
            font-size: 12px;
            color: var(--muted);
        }

        /* Search wrapper for positioning */
        .search {
            position: relative;
            overflow: visible;
        }

        /* Search Engine Indicator */
        .search-engine-indicator {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            background: linear-gradient(135deg, var(--ring) 0%, color-mix(in hsl, var(--ring) 80%, transparent) 100%);
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: white;
            border: 1px solid color-mix(in hsl, var(--ring) 80%, transparent);
            animation: slideInRight 0.2s ease;
            box-shadow: 0 2px 8px color-mix(in hsl, var(--ring) 30%, transparent);
            white-space: nowrap;
            user-select: none;
        }

        .search-engine-indicator span:first-child {
            font-size: 16px;
            line-height: 1;
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(-10px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        [data-theme="dark"] .search-engine-indicator {
            background: linear-gradient(135deg, var(--ring) 0%, color-mix(in hsl, var(--ring) 70%, transparent) 100%);
            box-shadow: 0 2px 12px color-mix(in hsl, var(--ring) 40%, transparent);
        }

        /* Search Engine Selector - Always Visible */
        .search-engine-selector {
            position: relative;
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 10px;
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
            white-space: nowrap;
        }

        .search-engine-selector:hover {
            background: var(--panel-2);
            border-color: color-mix(in hsl, var(--text) 20%, transparent);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px color-mix(in hsl, var(--text) 8%, transparent);
        }

        .search-engine-selector:active {
            transform: translateY(0);
        }

        .selector-icon {
            font-size: 16px;
            line-height: 1;
        }

        .selector-arrow {
            color: var(--muted);
            transition: transform 0.2s ease;
        }

        .search-engine-selector.active .selector-arrow {
            transform: rotate(180deg);
        }

        /* Search Engine Dropdown */
        .search-engine-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: var(--panel);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 12px;
            box-shadow: 0 8px 24px color-mix(in hsl, var(--text) 15%, transparent);
            min-width: 200px;
            padding: 8px;
            z-index: 9999;
            pointer-events: auto;
        }

        /* Show dropdown when active */
        .search-engine-dropdown.active {
            display: block !important;
            animation: dropdownSlideIn 0.2s ease;
        }

        @keyframes dropdownSlideIn {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .engine-option {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .engine-option:hover {
            background: var(--panel-2);
        }

        .engine-option.active {
            background: color-mix(in hsl, var(--ring) 10%, transparent);
        }

        .engine-option .engine-icon {
            font-size: 18px;
            line-height: 1;
        }

        .engine-option .engine-name {
            flex: 1;
            font-size: 14px;
            font-weight: 500;
            color: var(--text);
        }

        .engine-option .engine-checkmark {
            font-size: 14px;
            color: var(--ring);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .engine-option.active .engine-checkmark {
            opacity: 1;
        }

        [data-theme="dark"] .search-engine-dropdown {
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }

        /* Keyboard shortcut hints */
        .keyboard-hint {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 6px;
            background: var(--panel-2);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            border-radius: 4px;
            font-size: 11px;
            color: var(--muted);
            font-family: monospace;
        }

        /* Loading skeleton */
        .skeleton {
            background: linear-gradient(90deg,
                    var(--panel-2) 25%,
                    color-mix(in hsl, var(--text) 5%, transparent) 50%,
                    var(--panel-2) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 8px;
        }

        @keyframes shimmer {
            0% {
                background-position: 200% 0;
            }

            100% {
                background-position: -200% 0;
            }
        }

        .skeleton-card {
            height: 120px;
        }

        /* Settings Modal Styles */
        .settings-section {
            margin-bottom: 24px;
            padding-bottom: 24px;
            border-bottom: 1px solid color-mix(in hsl, var(--text) 8%, transparent);
        }

        .settings-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .settings-section h3 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text);
        }

        .settings-section p {
            font-size: 13px;
            color: var(--muted);
            margin-bottom: 16px;
            line-height: 1.5;
        }

        .settings-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .settings-btn {
            flex: 1;
            min-width: 150px;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            background: var(--panel-2);
            color: var(--text);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .settings-btn:hover {
            background: var(--panel);
            transform: translateY(-1px);
        }

        .settings-btn.primary {
            background: var(--ring);
            color: white;
            border-color: var(--ring);
        }

        .settings-btn.primary:hover {
            opacity: 0.9;
        }

        .settings-btn.danger {
            background: transparent;
            color: #ef4444;
            border-color: #ef4444;
        }

        .settings-btn.danger:hover {
            background: #ef4444;
            color: white;
        }

        .settings-info {
            background: var(--panel-2);
            padding: 12px;
            border-radius: 8px;
            font-size: 12px;
            color: var(--muted);
            margin-top: 12px;
        }

        .settings-info strong {
            color: var(--text);
            display: block;
            margin-bottom: 4px;
        }

        /* File input styling */
        .file-input-wrapper {
            position: relative;
            overflow: hidden;
            display: inline-block;
            flex: 1;
            min-width: 150px;
        }

        .file-input-wrapper input[type=file] {
            position: absolute;
            left: -9999px;
        }

        .file-input-label {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
            background: var(--panel-2);
            color: var(--text);
        }

        .file-input-label:hover {
            background: var(--panel);
            transform: translateY(-1px);
        }

        /* Buy Me a Coffee Button */
        .coffee-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            margin-top: 12px;
            background: #FFDD00;
            color: #000000;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(255, 221, 0, 0.3);
        }

        .coffee-btn:hover {
            background: #FFED4E;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 221, 0, 0.4);
        }

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

        @media (max-width: 768px) {
            .toast-container {
                right: 16px;
                left: 16px;
                top: 70px;
            }

            .toast {
                min-width: unset;
            }
        }

        /* LinkedIn Feed Styles */
        .linkedin-feed {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .linkedin-feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .linkedin-header-actions {
            display: flex;
            gap: var(--spacing-one-x);
            align-items: center;
            flex-wrap: wrap;
        }

        .linkedin-feed-title {
            font-size: var(--font-size-2xlarge);
            font-weight: var(--font-weight-bold);
            color: var(--color-text);
            margin: 0;
            font-family: var(--font-family-display);
        }

        .linkedin-action-btn-secondary {
            background: var(--color-background-transparent);
            color: var(--color-action);
            border: 1px solid var(--color-action);
            padding: var(--spacing-one-x) var(--spacing-two-x);
            border-radius: var(--corner-radius-full);
            font-weight: var(--font-weight-bold);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: var(--spacing-half-x);
            transition: all var(--motion-transition-hover-in);
            font-size: var(--font-size-small);
        }

        .linkedin-action-btn-secondary:hover {
            background: var(--color-background-action-transparent-hover);
            border-color: var(--color-action-hover);
            color: var(--color-action-hover);
            transform: translateY(-1px);
        }

        .linkedin-action-btn-secondary:active {
            background: var(--color-background-action-transparent-active);
            transform: translateY(0);
        }

        /* LinkedIn Settings Dropdown */
        .linkedin-settings-dropdown {
            position: relative;
        }

        .linkedin-settings-btn {
            background: var(--color-background-transparent);
            color: var(--color-icon);
            border: 1px solid var(--color-border-faint);
            width: 40px;
            height: 40px;
            border-radius: var(--corner-radius-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--motion-transition-hover-in);
            padding: 0;
        }

        .linkedin-settings-btn:hover {
            background: var(--color-background-transparent-hover);
            border-color: var(--color-border-hover);
            color: var(--color-icon-hover);
            transform: translateY(-1px);
        }

        .linkedin-settings-btn svg {
            width: 20px;
            height: 20px;
        }

        .linkedin-settings-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            background: var(--color-background-container);
            border: 1px solid var(--color-border-faint);
            border-radius: var(--corner-radius-medium);
            box-shadow: var(--elevation-raised);
            min-width: 220px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all var(--motion-transition-slide-in);
            z-index: 1000;
            overflow: hidden;
        }

        .linkedin-settings-menu.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .linkedin-settings-item {
            width: 100%;
            background: transparent;
            border: none;
            padding: var(--spacing-one-and-a-half-x) var(--spacing-two-x);
            display: flex;
            align-items: center;
            gap: var(--spacing-one-x);
            cursor: pointer;
            transition: background var(--motion-transition-hover-in);
            color: var(--color-text);
            font-size: var(--font-size-small);
            text-align: left;
        }

        .linkedin-settings-item:hover {
            background: var(--color-background-transparent-hover);
        }

        .linkedin-settings-item svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            color: var(--color-icon);
        }

        .linkedin-settings-item span {
            flex: 1;
        }

        .add-linkedin-post-btn {
            background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 8px rgba(10, 102, 194, 0.25);
            position: relative;
            overflow: hidden;
            letter-spacing: 0.02em;
        }

        .add-linkedin-post-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .add-linkedin-post-btn:hover::before {
            left: 100%;
        }

        .add-linkedin-post-btn:hover {
            background: linear-gradient(135deg, #0958a8 0%, #003768 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(10, 102, 194, 0.4);
        }

        .add-linkedin-post-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
        }

        .add-linkedin-post-btn span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            font-size: 18px;
            font-weight: 700;
            line-height: 1;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            transition: all 0.3s ease;
        }

        .add-linkedin-post-btn:hover span {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .linkedin-posts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
            gap: 24px;
            margin-bottom: var(--spacing-six-x);
            padding: 0 var(--spacing-two-x);
            justify-items: center;
            max-width: 1400px;
            margin-left: auto;
            margin-right: auto;
        }

        .linkedin-post-card {
            background: var(--color-background-container);
            border-radius: var(--corner-radius-large);
            overflow: hidden;
            box-shadow: var(--elevation-raised);
            border: 1px solid var(--color-border-faint);
            transition: all var(--motion-transition-hover-in-raised);
            position: relative;
            width: 100%;
            max-width: 550px;
            min-width: 381px;
        }

        .linkedin-post-card:hover {
            transform: translateY(-2px);
            box-shadow: 0px 4px 12px var(--color-shadow);
            border-color: var(--color-border-low-emphasis);
        }

        .linkedin-embed-container {
            width: 100%;
            min-height: 650px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--color-background-canvas);
        }

        .linkedin-post-iframe {
            width: 100%;
            max-width: 550px;
            border: none;
            border-radius: var(--corner-radius-large);
            min-height: 650px;
            height: auto;
            background: var(--color-background-container);
        }

        @media (max-width: 640px) {
            .linkedin-posts-grid {
                grid-template-columns: 1fr;
                padding: 0 var(--spacing-one-x);
            }

            .linkedin-post-card {
                min-width: 100%;
                max-width: 100%;
            }

            .linkedin-post-iframe {
                max-width: 100%;
                min-height: 500px;
            }

            .linkedin-feed-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .linkedin-header-actions {
                width: 100%;
                justify-content: space-between;
            }

            .linkedin-settings-menu {
                right: auto;
                left: 0;
            }
        }

        .linkedin-post-link {
            border: 0;
            margin: 0;
            padding: 0;
        }

        .linkedin-post-actions {
            position: absolute;
            top: var(--spacing-one-and-a-half-x);
            right: var(--spacing-one-and-a-half-x);
            display: flex;
            gap: var(--spacing-one-x);
            opacity: 0;
            transition: opacity var(--motion-transition-hover-in);
            z-index: 10;
        }

        .linkedin-post-card:hover .linkedin-post-actions {
            opacity: 1;
        }

        .linkedin-action-btn {
            background: var(--color-background-overlay);
            color: var(--color-text-on-dark);
            border: none;
            width: 32px;
            height: 32px;
            border-radius: var(--corner-radius-full);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all var(--motion-transition-hover-in);
            box-shadow: var(--elevation-raised);
        }

        .linkedin-action-btn:hover {
            background: var(--color-background-overlay-hover);
            transform: scale(1.1);
        }

        .linkedin-action-btn.delete:hover {
            background: var(--color-signal-negative);
            color: white;
        }

        /* LinkedIn Fallback Card Styles */
        .linkedin-fallback-card {
            background: var(--color-background-container);
            border: 1px solid var(--color-border-low-emphasis);
            min-height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .linkedin-fallback-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: var(--spacing-three-x);
            max-width: 400px;
        }

        .linkedin-fallback-icon {
            margin-bottom: var(--spacing-two-x);
            opacity: 0.9;
        }

        .linkedin-fallback-text h3 {
            color: var(--color-text-high-emphasis);
            font-size: 18px;
            font-weight: 600;
            margin: 0 0 var(--spacing-one-x) 0;
        }

        .linkedin-fallback-text p {
            color: var(--color-text-medium-emphasis);
            font-size: 14px;
            line-height: 1.5;
            margin: 0 0 var(--spacing-two-x) 0;
        }

        .linkedin-fallback-button {
            display: inline-flex;
            align-items: center;
            gap: var(--spacing-half-x);
            background: #0A66C2;
            color: white;
            text-decoration: none;
            padding: var(--spacing-one-x) var(--spacing-two-x);
            border-radius: var(--corner-radius-large);
            font-weight: 500;
            font-size: 14px;
            transition: all var(--motion-transition-hover-in);
        }

        .linkedin-fallback-button:hover {
            background: #004182;
            transform: translateY(-1px);
            box-shadow: var(--elevation-raised);
        }

        .linkedin-empty-state {
            text-align: center;
            padding: var(--spacing-eight-x) var(--spacing-three-x);
            color: var(--color-text-low-emphasis);
            background: var(--color-background-canvas);
            border-radius: var(--corner-radius-large);
            border: 1px dashed var(--color-border-faint);
        }

        .linkedin-empty-icon {
            font-size: var(--font-size-5xlarge);
            margin-bottom: var(--spacing-two-x);
            opacity: 0.4;
        }

        .linkedin-empty-text {
            font-size: var(--font-size-xlarge);
            font-weight: var(--font-weight-bold);
            margin-bottom: var(--spacing-one-x);
            color: var(--color-text);
        }

        .linkedin-empty-subtext {
            font-size: var(--font-size-small);
            margin-bottom: var(--spacing-three-x);
            color: var(--color-text-low-emphasis);
        }

        /* LinkedIn Modal Styles */
        .linkedin-modal {
            background: var(--panel);
            border-radius: 16px;
            padding: 32px;
            max-width: 600px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            border: 1px solid color-mix(in hsl, var(--text) 12%, transparent);
        }

        .linkedin-modal h2 {
            margin: 0 0 24px 0;
            font-size: 24px;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .linkedin-url-input {
            width: 100%;
            padding: 16px;
            border: 2px solid color-mix(in hsl, var(--text) 15%, transparent);
            border-radius: 12px;
            background: var(--bg);
            color: var(--text);
            font-size: 16px;
            transition: all 0.2s ease;
            margin-bottom: 16px;
        }

        .linkedin-url-input:focus {
            outline: none;
            border-color: #0a66c2;
            box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
        }

        .linkedin-url-help {
            font-size: 14px;
            color: var(--muted);
            margin-bottom: 24px;
            line-height: 1.5;
        }

        .linkedin-url-help strong {
            color: var(--text);
        }

        .linkedin-url-help code {
            font-family: 'Courier New', monospace;
            font-size: 11px;
            background: var(--panel-2);
            padding: 8px 12px;
            border-radius: 6px;
            display: block;
            margin: 12px 0;
            overflow-x: auto;
            white-space: pre-wrap;
            word-break: break-all;
            border: 1px solid color-mix(in hsl, var(--text) 10%, transparent);
        }

        @media (max-width: 768px) {
            .linkedin-posts-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .linkedin-feed-header {
                flex-direction: column;
                text-align: center;
                gap: 16px;
            }

            .linkedin-header-actions {
                width: 100%;
                justify-content: center;
            }

            .add-linkedin-post-btn {
                width: 100%;
                justify-content: center;
                padding: 14px 24px;
                font-size: 15px;
            }

            .linkedin-modal {
                padding: 24px;
                margin: 16px;
            }
        }

        @media (max-width: 768px) {
            .linkedin-posts-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .linkedin-feed-header {
                flex-direction: column;
                text-align: center;
            }

            .linkedin-modal {
                padding: 24px;
                margin: 16px;
            }

            .linkedin-post-iframe {
                min-height: 500px;
            }
        }

        /* ===================================
           Modern LinkedIn Card Styles
           =================================== */

        .linkedin-modern-card {
            background: var(--color-background-container);
            border: 1px solid var(--color-border-faint);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            width: 100%;
            max-width: 550px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        .linkedin-modern-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
            border-color: var(--color-border-low-emphasis);
        }

        .linkedin-card-actions {
            position: absolute;
            top: 12px;
            right: 12px;
            display: flex;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s ease;
            z-index: 10;
        }

        .linkedin-modern-card:hover .linkedin-card-actions {
            opacity: 1;
        }

        .linkedin-card-actions .linkedin-action-btn {
            background: rgba(0, 0, 0, 0.75);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            color: white;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .linkedin-card-actions .linkedin-action-btn:hover {
            background: rgba(220, 38, 38, 0.9);
            transform: scale(1.1);
        }

        .linkedin-card-thumbnail {
            aspect-ratio: 16 / 9;
            width: 100%;
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        [data-theme="dark"] .linkedin-card-thumbnail {
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        }

        .linkedin-thumbnail-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            animation: subtle-pulse 3s ease-in-out infinite;
        }

        @keyframes subtle-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.85; }
        }

        .linkedin-card-content {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
        }

        .linkedin-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 4px;
        }

        .linkedin-card-source {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--color-text-low-emphasis);
        }

        .linkedin-favicon {
            width: 16px;
            height: 16px;
            border-radius: 3px;
            flex-shrink: 0;
        }

        .linkedin-card-date {
            font-size: 12px;
            color: var(--color-text-low-emphasis);
            white-space: nowrap;
        }

        .linkedin-card-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--color-text);
            line-height: 1.4;
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .linkedin-card-author {
            font-size: 14px;
            color: var(--color-text-low-emphasis);
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .linkedin-card-author-link {
            text-decoration: none;
            color: inherit;
            display: block;
            transition: opacity 0.2s ease;
        }

        .linkedin-card-author-link:hover {
            opacity: 0.7;
        }

        .linkedin-card-author-link:hover .linkedin-card-author {
            color: #0A66C2;
            text-decoration: underline;
        }

        .linkedin-card-actions-row {
            display: flex;
            gap: 10px;
            margin-top: auto;
            padding-top: 8px;
        }

        .linkedin-card-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            border: none;
            white-space: nowrap;
        }

        .linkedin-card-btn.primary {
            background: #0A66C2;
            color: white;
            flex: 1;
        }

        .linkedin-card-btn.primary:hover {
            background: #004182;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
        }

        .linkedin-card-btn.secondary {
            background: var(--color-background-canvas);
            color: var(--color-text);
            border: 1px solid var(--color-border-low-emphasis);
            padding: 10px 14px;
        }

        .linkedin-card-btn.secondary:hover {
            background: var(--color-background-overlay);
            border-color: var(--color-border);
        }

        .linkedin-card-badge {
            position: absolute;
            top: 16px;
            left: 16px;
            background: rgba(251, 191, 36, 0.95);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            color: #78350f;
            font-size: 11px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
            pointer-events: none;
        }

        .linkedin-card-badge svg {
            width: 12px;
            height: 12px;
            stroke: #78350f;
        }

        /* Responsive adjustments */
        @media (max-width: 640px) {
            .linkedin-modern-card {
                max-width: 100%;
            }

            .linkedin-card-content {
                padding: 16px;
            }

            .linkedin-card-title {
                font-size: 16px;
            }

            .linkedin-card-actions-row {
                flex-direction: column;
                gap: 8px;
            }

            .linkedin-card-btn.primary {
                width: 100%;
            }

            .linkedin-card-btn.secondary {
                width: 100%;
            }
        }

        /* Dark mode specific adjustments */
        [data-theme="dark"] .linkedin-card-btn.primary {
            background: #0A66C2;
        }

        [data-theme="dark"] .linkedin-card-btn.primary:hover {
            background: #0077B5;
        }

        [data-theme="dark"] .linkedin-card-badge {
            background: rgba(251, 191, 36, 0.9);
        }
