        :root {
            --primary-color: #4f46e5;
            --secondary-color: #7c3aed;
            --cross-platform-color: #f97316;
        }

        .news-checkbox {
            display: none !important;
        }

        html {
            scrollbar-gutter: stable;
        }

        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 24px 0 56px;
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
            overflow-y: scroll;
        }

        body.tr-rss-reading {
            background:
                linear-gradient(rgba(250, 248, 243, 0.92), rgba(250, 248, 243, 0.92)),
                url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
        }

        .main-container {
            width: 96vw;
            max-width: 1600px;
            margin: 0 auto;
            padding: 0 15px;
            box-sizing: border-box;
            min-height: calc(100vh - 80px);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .header-card {
            background: white;
            border-radius: 12px;
            padding: 12px 15px;
            margin-bottom: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .header-title {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-size: 1.25rem;
            font-weight: 800;
            letter-spacing: 0.2px;
            color: #111827;
            margin-bottom: 0;
        }

        .header-top {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .header-subtitle {
            display: inline-flex;
            align-items: center;
            height: 24px;
            line-height: 1;
            font-size: 0.75rem;
            color: #6b7280;
        }

        .stats-row {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 8px;
        }

        .stat-card {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 7px 11px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.14) !important;
            border: 1px solid rgba(59, 130, 246, 0.18);
            color: rgba(37, 99, 235, 0.78);
            box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
            line-height: 1;
        }

        .stat-label {
            font-size: 0.74rem;
            font-weight: 700;
            opacity: 0.85;
        }

        .stat-value {
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.15px;
            opacity: 0.9;
        }

        #searchInput {
            flex: 0 0 140px !important;
            width: 140px !important;
            min-width: 140px !important;
            max-width: 140px !important;
            transition: width 160ms ease, max-width 160ms ease, flex-basis 160ms ease;
            border: none !important;
            box-shadow: none !important;
            background: rgba(0, 0, 0, 0.04) !important;
        }

        #searchInput:hover {
            background: rgba(0, 0, 0, 0.06) !important;
        }

        #searchInput:focus {
            flex-basis: 320px !important;
            width: 320px !important;
            max-width: 320px !important;
            border: none !important;
            outline: none !important;
            box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.22) !important;
            background: rgba(255, 255, 255, 0.92) !important;
        }

        .category-settings-btn {
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
        }

        /* Tab 导航 - 默认隐藏，防止刷新时闪烁 */
        .category-tabs {
            background: white;
            border-radius: 10px;
            padding: 6px;
            margin-bottom: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            display: none;
            /* 默认隐藏，由 JS 添加 .categories-ready 后显示 */
            gap: 4px;
            overflow-x: hidden;
            flex-wrap: nowrap;
            justify-content: flex-start;
        }

        /* 栏目准备就绪后显示（使用 body.categories-ready 提高优先级） */
        body.categories-ready .category-tabs {
            display: flex;
        }

        body.categories-ready .tab-content-area {
            display: block;
        }

        .tr-footer-top-toggle {
            margin-left: 10px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 12px;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
        }

        .tr-footer-top-toggle:hover,
        .tr-footer-top-toggle:focus-visible {
            color: #ffffff;
            text-decoration: underline;
            outline: none;
        }
        
        /* Desktop-only tip - hide on mobile */
        .tr-footer-tip-desktop {
            cursor: default;
        }
        
        .tr-footer-tip-desktop:hover {
            text-decoration: none;
        }
        
        @media (max-width: 640px) {
            .tr-footer-tip-desktop {
                display: none;
            }
        }

        .category-tab {
            flex: 1 1 0;
            min-width: 0;
            padding: 6px 8px;
            background: #f3f4f6;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid transparent;
            position: relative;
            overflow: hidden;
        }
        
        .category-tab-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .category-drag-handle {
            position: absolute;
            top: 4px;
            left: 6px;
            color: #9ca3af;
            cursor: grab;
            user-select: none;
            padding: 2px 6px;
            border-radius: 6px;
            display: none;
        }

        body.categories-ready .category-tab:hover .category-drag-handle {
            display: inline-block;
        }

        body.categories-ready.category-tabs-drag-mode .category-drag-handle {
            display: inline-block;
        }

        .category-drag-handle:hover {
            background: rgba(0, 0, 0, 0.04);
        }

        .category-tab.dragging {
            opacity: 0.7;
        }

        .category-tabs.compact {
            gap: 4px;
            padding: 4px;
            overflow-x: hidden;
            flex-wrap: nowrap;
        }

        .category-tabs.compact .category-tab {
            flex: 1 1 0;
            min-width: 0;
            padding: 4px 6px;
        }

        .category-tabs.compact .category-tab-icon {
            font-size: 0.9rem;
        }

        .category-tabs.compact .category-tab-name {
            font-size: 0.72rem;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .category-tabs.compact .category-tab-count {
            font-size: 0.6rem;
        }

        .category-tab:hover {
            background: #e5e7eb;
        }

        .category-tab.active {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
        }

        .category-tab-icon {
            font-size: 1rem;
        }

        .category-tab-name {
            font-size: 0.8rem;
            font-weight: 600;
        }

        .category-tab-count {
            font-size: 0.65rem;
            opacity: 0.8;
        }

        /* Update indicator red dot */
        .update-dot {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            display: none;
            box-shadow: 0 0 0 2px white;
        }

        .update-dot.show {
            display: block;
            animation: pulse-dot 2s infinite;
        }

        @keyframes pulse-dot {

            0%,
            100% {
                transform: scale(1);
                box-shadow: 0 0 0 2px white;
            }

            50% {
                transform: scale(1.2);
                box-shadow: 0 0 0 2px white, 0 0 8px rgba(239, 68, 68, 0.5);
            }
        }

        .tab-content-area {
            background: white;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            min-height: 520px;
            --tr-platform-card-height: clamp(860px, calc(100vh - 280px), 1240px);
            flex: 1;
            display: none;
            /* 默认隐藏，由 JS 添加 .categories-ready 后显示 */
        }

        body.tr-rss-reading .tab-content-area {
            background: transparent;
            box-shadow: none;
        }

        body.tr-mobile-top-collapsed .header-card {
            display: none !important;
        }

        @media (max-width: 640px) {
            html, body {
                overflow-x: hidden;
            }
            
            .main-container {
                width: 100%;
                max-width: 100%;
                padding: 0 4px;
                gap: 8px;
                overflow-x: hidden;
            }

            .header-card {
                padding: 10px;
                margin-bottom: 0;
                border-radius: 12px;
            }

            .category-tabs {
                padding: 4px;
                gap: 6px;
                margin-bottom: 0;
                overflow-x: auto;
                flex-wrap: nowrap;
                border-radius: 12px;
            }

            .category-tab {
                flex: 0 0 auto;
                min-width: 72px;
                padding: 6px 8px;
            }

            .tab-content-area {
                background: transparent;
                box-shadow: none;
                border-radius: 0;
                padding: 0;
                min-height: 420px;
            }

            #tab-explore {
                padding: 0;
            }

            .platform-grid {
                gap: 8px;
                padding-bottom: 4px;
            }

            .platform-card {
                padding: 8px;
            }
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.active {
            display: block;
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.active {
            display: block;
        }

        .platform-grid {
            display: flex;
            flex-wrap: nowrap;
            gap: 10px;
            overflow-x: auto;
            overflow-anchor: auto;
            padding-bottom: 8px;
            scroll-snap-type: x mandatory;
            scroll-behavior: smooth;
            /* Performance optimizations for smoother scrolling */
            will-change: scroll-position;
            transform: translateZ(0);
            /* GPU acceleration */
            contain: layout style;
            /* Reduce repaints */
            -webkit-overflow-scrolling: touch;
            /* iOS momentum scrolling */
        }

        /* Disable smooth scroll during drag for instant response */
        body.tr-platform-title-dragging .platform-grid {
            scroll-behavior: auto;
            scroll-snap-type: none;
            /* Disable snap during drag */
        }

        /* Disable scroll-snap when page is hidden to prevent jump on return */
        body.tr-page-hidden .platform-grid,
        body.tr-snap-paused .platform-grid {
            scroll-snap-type: none;
            scroll-behavior: auto;
        }

        .platform-grid {
            scrollbar-width: thin;
            /* Firefox */
            scrollbar-color: rgba(156, 163, 175, 0.4) transparent;
        }


        .platform-grid::-webkit-scrollbar {
            height: 8px;
        }

        .platform-grid::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.03);
            border-radius: 4px;
        }

        .platform-grid::-webkit-scrollbar-thumb {
            background: rgba(156, 163, 175, 0.4);
            border-radius: 4px;
        }

        .platform-grid::-webkit-scrollbar-thumb:hover {
            background: rgba(156, 163, 175, 0.6);
        }
        
        /* Mobile: hide scrollbar but keep scrolling functional */
        @media (max-width: 640px) {
            .platform-grid {
                scrollbar-width: none;
                /* Disable smooth scroll on mobile for better touch performance */
                scroll-behavior: auto;
            }
            
            .platform-grid::-webkit-scrollbar {
                height: 0;
            }
            
            /* Disable transition during scroll for better performance */
            .platform-card {
                transition: none;
            }
        }

        .platform-card {
            background: #f9fafb;
            border-radius: 12px;
            padding: 10px;
            flex: 0 0 calc((100% - 30px) / 4);
            width: calc((100% - 30px) / 4);
            border: 1px solid #e5e7eb;
            transition: all 0.2s ease;
        }

        .tab-content-area .platform-grid>.platform-card {
            flex: 0 0 calc((100% - 20px) / 3);
            width: calc((100% - 20px) / 3);
            height: var(--tr-platform-card-height);
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        @media (max-width: 1024px) {
            .tab-content-area {
                --tr-platform-card-height: clamp(820px, calc(100vh - 260px), 1160px);
            }

            .platform-card {
                flex: 0 0 calc((100% - 10px) / 2);
                width: calc((100% - 10px) / 2);
            }

            .tab-content-area .platform-grid>.platform-card {
                flex: 0 0 calc((100% - 10px) / 2);
                width: calc((100% - 10px) / 2);
            }
        }

        @media (max-width: 640px) {
            .tab-content-area {
                --tr-platform-card-height: clamp(780px, calc(100vh - 240px), 1020px);
            }

            .platform-card {
                flex: 0 0 100%;
                width: 100%;
                scroll-snap-align: start;
                scroll-margin-left: 0;
            }

            .tab-content-area .platform-grid {
                padding-left: 0;
                padding-right: 0;
                gap: 0;
            }

            .tab-content-area .platform-grid>.platform-card {
                flex: 0 0 100%;
                width: 100%;
                border-radius: 12px 12px 0 0;
                border: none;
                border-bottom: 1px solid #f3f4f6;

                /* Reset 3D transforms for mobile to prevent flickering */
                transform: none !important;
                transform-style: flat !important;
                backface-visibility: visible !important;
                perspective: none !important;
            }

            .platform-grid {
                perspective: none !important;
            }
        }

        @media (max-width: 640px) {
            .news-title {
                font-size: 0.95rem;
            }
        }

        @media (hover: hover) {
            .platform-card:hover {
                border-color: var(--primary-color);
                box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
            }
        }

        .platform-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: 1px solid #e5e7eb;
        }

        .platform-header,
        .platform-name {
            touch-action: pan-y;
            cursor: grab;
            /* Indicate draggable */
        }

        .platform-header:active,
        .platform-name:active {
            cursor: grabbing;
        }

        body.tr-platform-title-dragging .platform-header,
        body.tr-platform-title-dragging .platform-name {
            cursor: grabbing;
        }

        body.tr-platform-title-dragging,
        body.tr-platform-title-dragging * {
            user-select: none;
        }

        /* Shift+scroll mode: disable vertical scrolling on page and cards */
        body.tr-shift-scroll-mode {
            overflow: hidden;
        }
        
        body.tr-shift-scroll-mode .news-list {
            overflow: hidden;
        }
        
        body.tr-shift-scroll-mode .platform-grid {
            scroll-snap-type: none;
            scroll-behavior: auto;
        }


        .news-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .tab-content-area .platform-card .news-list {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding-right: 2px;
            scrollbar-width: none;
            /* Firefox */
            -ms-overflow-style: none;
            /* IE/Edge Legacy */
        }

        .tab-content-area .platform-card .news-list::-webkit-scrollbar {
            width: 0;
            height: 0;
        }

        .news-placeholder {
            padding: 10px 8px;
            color: #9ca3af;
            font-size: 0.78rem;
            line-height: 1.4;
        }

        .category-empty-state {
            padding: 16px 12px;
            color: #6b7280;
            font-size: 0.85rem;
            text-align: center;
        }

        .news-item {
            padding: 4px 0;
            border-bottom: 1px solid #f3f4f6;
            font-size: 0.8rem;
            box-sizing: border-box;
            min-height: calc(1.4em + 8px);
        }

        .tab-content-area .news-item {
            padding: 8px 0;
            font-size: 0.8rem;
            min-height: calc(1.55em + 12px);
        }

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

        .news-title {
            font-size: 0.85rem;
            color: #1f2937;
            line-height: 1.4;
            margin-bottom: 0;
            white-space: normal;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            flex: 1;
            min-width: 0;
        }

        .tab-content-area .news-title {
            font-size: 0.9rem;
            line-height: 1.45;
        }

        .news-title.nba-title {
            font-size: 0.78rem;
        }

        .news-subtitle {
            font-size: 0.72rem;
            line-height: 1.2;
            color: #6b7280;
            margin-top: 2px;
            margin-left: 24px;
            text-align: right;
        }

        .news-item.preview .news-meta,
        .news-item:hover .news-meta,
        .news-item:focus-within .news-meta {
            display: none;
        }

        .news-item.preview .news-title,
        .news-item:hover .news-title,
        .news-item:focus-within .news-title {
            white-space: normal;
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .news-item.filtered {
            display: none !important;
        }

        .news-item.search-hidden {
            display: none !important;
        }

        .news-item.paged-hidden {
            display: none !important;
        }

        .news-item.nba-hidden {
            display: none !important;
        }

        .news-item.read {
            opacity: 0.62;
        }

        .news-item.read .news-title {
            color: #6b7280;
        }

        .news-item.read:hover {
            opacity: 0.85;
        }

        .platform-refresh-btn {
            display: inline-flex;
            align-items: center;
            gap: 0;
            padding: 6px 10px;
            background: #eef2ff;
            color: #4338ca;
            border: 1px solid #c7d2fe;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            user-select: none;
            transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
        }

        .platform-refresh-btn:hover {
            background: #e0e7ff;
            border-color: #a5b4fc;
        }

        .platform-refresh-btn:active {
            transform: translateY(1px);
        }

        /* NBA 赛程双按钮 */
        .nba-mode-btns {
            display: flex;
            gap: 4px;
        }

        .nba-mode-btn {
            padding: 4px 8px;
            font-size: 0.7rem;
        }

        .nba-mode-btn.active {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            border-color: #4f46e5;
        }

        .news-checkbox {
            display: none !important;
            width: 14px;
            height: 14px;
            margin-right: 6px;
            align-self: flex-start;
            margin-top: 2px;
            flex-shrink: 0;
        }

        .news-index {
            width: 18px;
            flex-shrink: 0;
            text-align: right;
            color: #9ca3af;
            font-size: 0.75rem;
            line-height: 1.4;
            margin-top: 1px;
            margin-right: 6px;
        }

        .news-item-content {
            display: flex;
            align-items: flex-start;
        }

        /* New content indicator red dot */
        .news-item .tr-new-dot {
            width: 6px;
            height: 6px;
            background: #ef4444;
            border-radius: 50%;
            flex-shrink: 0;
            margin-right: 4px;
            margin-top: 6px;
            display: inline-block;
        }

        .news-item.read .tr-new-dot {
            display: none;
        }

        #tab-rsscol-rss {
            background:
                linear-gradient(rgba(250, 248, 243, 0.92), rgba(250, 248, 243, 0.92)),
                url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
            border-radius: 18px;
            padding: 16px 14px 18px;
            min-height: 100%;
        }

        #tab-rsscol-rss .platform-grid {
            max-width: 1100px;
            margin: 0 auto;
        }

        .tr-rss-src-empty {
            padding: 18px 12px;
            color: #6b7280;
            font-size: 0.92rem;
        }

        .platform-grid {
            perspective: 1400px;
        }

        .platform-card {
            transform-style: preserve-3d;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        .platform-card.tr-explore-flip-out {
            animation: trExploreFlipOut 360ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
            transform-origin: 50% 50%;
        }

        .platform-card.tr-explore-flip-in {
            animation: trExploreFlipIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
            transform-origin: 50% 50%;
        }

        .tr-platform-card-close {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(200, 195, 185, 0.40);
            background: rgba(255, 255, 255, 0.80);
            color: #6b7280;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            line-height: 1;
            padding: 0;
        }

        .tr-platform-card-delete {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(248, 113, 113, 0.35);
            background: rgba(255, 255, 255, 0.86);
            color: #ef4444;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            line-height: 1;
            padding: 0;
        }

        .tr-platform-card-hide {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(200, 195, 185, 0.40);
            background: rgba(255, 255, 255, 0.80);
            color: #6b7280;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            line-height: 1;
            padding: 0;
        }

        .platform-header-actions {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .tr-confirm-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.35);
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }

        .tr-confirm-overlay.show {
            display: flex;
        }

        .tr-confirm-modal {
            width: min(420px, calc(100vw - 32px));
            background: rgba(255, 255, 255, 0.98);
            border: 1px solid rgba(200, 195, 185, 0.45);
            border-radius: 14px;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
            padding: 16px 16px 14px;
        }

        .tr-confirm-message {
            color: #111827;
            font-size: 14px;
            line-height: 1.55;
            margin-bottom: 14px;
            white-space: pre-wrap;
        }

        .tr-confirm-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .tr-confirm-btn {
            height: 34px;
            padding: 0 12px;
            border-radius: 10px;
            border: 1px solid rgba(200, 195, 185, 0.45);
            background: rgba(255, 255, 255, 0.92);
            color: #374151;
            cursor: pointer;
            font-size: 13px;
            line-height: 1;
        }

        .tr-confirm-btn.tr-confirm-ok {
            border-color: rgba(239, 68, 68, 0.35);
            color: #ef4444;
            background: rgba(255, 255, 255, 0.98);
        }

        #tab-explore {
            position: relative;
            padding: 0;
            min-height: 100%;
        }

        @media (max-width: 640px) {
            #tab-explore {
                padding: 0 !important;
            }
        }

        #tab-explore #trExploreGrid {
            flex-direction: row;
            flex-wrap: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
            padding-bottom: 8px;
            perspective: 1400px;
        }

        #tab-explore #trExploreGrid .platform-card {
            transform-style: preserve-3d;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        #tab-explore #trExploreGrid .platform-card.tr-explore-flip-out {
            animation: trExploreFlipOut 360ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
            transform-origin: 50% 50%;
        }

        #tab-explore #trExploreGrid .platform-card.tr-explore-flip-in {
            animation: trExploreFlipIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
            transform-origin: 50% 50%;
        }

        @keyframes trExploreFlipOut {
            0% {
                opacity: 1;
                transform: translateZ(0px) rotateY(0deg) scale(1);
                filter: none;
                box-shadow: 0 10px 28px rgba(100, 100, 120, 0.12);
            }

            45% {
                opacity: 0.95;
                transform: translateZ(8px) rotateY(48deg) scale(0.995);
                filter: brightness(1.02) contrast(1.02);
                box-shadow: 0 16px 44px rgba(40, 40, 60, 0.20);
            }

            100% {
                opacity: 0;
                transform: translateZ(0px) rotateY(92deg) scale(0.985);
                filter: brightness(0.98) contrast(1.02);
                box-shadow: 0 8px 18px rgba(40, 40, 60, 0.10);
            }
        }

        @keyframes trExploreFlipIn {
            0% {
                opacity: 0;
                transform: translateZ(0px) rotateY(-92deg) scale(0.985);
                filter: brightness(0.98) contrast(1.02);
                box-shadow: 0 8px 18px rgba(40, 40, 60, 0.10);
            }

            55% {
                opacity: 1;
                transform: translateZ(10px) rotateY(-18deg) scale(1);
                filter: brightness(1.03) contrast(1.02);
                box-shadow: 0 18px 52px rgba(40, 40, 60, 0.22);
            }

            100% {
                opacity: 1;
                transform: translateZ(0px) rotateY(0deg) scale(1);
                filter: none;
                box-shadow: 0 10px 28px rgba(100, 100, 120, 0.12);
            }
        }

        #tab-explore .tr-explore-card-close {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 1px solid rgba(200, 195, 185, 0.40);
            background: rgba(255, 255, 255, 0.80);
            color: #6b7280;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            line-height: 1;
            padding: 0;
            margin-right: 6px;
        }

        #tab-explore .tr-explore-card-close:hover {
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.45);
        }

        #rssCatalogPreviewModal .settings-modal {
            background:
                linear-gradient(rgba(250, 248, 243, 0.94), rgba(250, 248, 243, 0.94)),
                url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
            border: 1px solid rgba(255, 255, 255, 0.40);
        }

        #rssCategoryCarouselGrid .platform-card,
        #rssCatalogPreviewGrid .platform-card {
            background: rgba(255, 255, 255, 0.78);
            border-color: rgba(255, 255, 255, 0.55);
            box-shadow: 0 10px 32px rgba(100, 100, 120, 0.12);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        #rssCategoryCarouselGrid .platform-card:hover,
        #rssCatalogPreviewGrid .platform-card:hover {
            border-color: rgba(99, 102, 241, 0.30);
            box-shadow: 0 12px 36px rgba(100, 100, 120, 0.16);
        }

        #rssCategoryCarouselGrid .news-item-content,
        #rssCatalogPreviewGrid .news-item-content {
            align-items: baseline;
        }

        #rssCategoryCarouselGrid .news-index,
        #rssCatalogPreviewGrid .news-index {
            margin-top: 0;
        }

        #rssCategoryCarouselGrid .news-title,
        #rssCatalogPreviewGrid .news-title {
            line-height: 1.45;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            line-clamp: unset;
            -webkit-line-clamp: unset;
            -webkit-box-orient: initial;
        }

        #rssCategoryCarouselGrid .news-item:not(.rss-entry-placeholder):hover,
        #rssCatalogPreviewGrid .news-item:not(.rss-entry-placeholder):hover {
            background-color: rgba(250, 248, 243, 0.60);
            border-radius: 10px;
            box-shadow: inset 0 0 0 1px rgba(200, 195, 185, 0.22);
        }

        #rssCategoryCarouselGrid .news-item.preview .news-title,
        #rssCatalogPreviewGrid .news-item.preview .news-title,
        #rssCategoryCarouselGrid .news-item:hover .news-title,
        #rssCatalogPreviewGrid .news-item:hover .news-title,
        #rssCategoryCarouselGrid .news-item:focus-within .news-title,
        #rssCatalogPreviewGrid .news-item:focus-within .news-title {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            line-clamp: unset;
            -webkit-line-clamp: unset;
            -webkit-box-orient: initial;
        }

        #rssCategoryCarouselGrid .news-item,
        #rssCatalogPreviewGrid .news-item {
            padding: 6px 0;
            min-height: calc(1.45em + 16px);
        }

        #rssCategoryCarouselGrid .news-title.tr-title-overflow-shrink,
        #rssCatalogPreviewGrid .news-title.tr-title-overflow-shrink {
            font-size: 0.84rem !important;
        }

        #rssCategoryCarouselGrid .rss-entry-placeholder,
        #rssCatalogPreviewGrid .rss-entry-placeholder {
            visibility: hidden;
            pointer-events: none;
            user-select: none;
        }

        @media (max-width: 640px) {

            #rssCategoryCarouselGrid .rss-carousel-nav-hints,
            #rssCatalogPreviewGrid .rss-carousel-nav-hints {
                display: none !important;
            }

            #rssCategoryCarouselGrid .rss-carousel-frame,
            #rssCatalogPreviewGrid .rss-carousel-frame {
                padding: 16px 14px !important;
            }

            #rssCategoryCarouselGrid .news-title,
            #rssCatalogPreviewGrid .news-title {
                white-space: normal !important;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box !important;
                line-clamp: 2;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }

            #rssCategoryCarouselGrid .news-item,
            #rssCatalogPreviewGrid .news-item {
                padding: 4px 0;
            }
        }

        .platform-header {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 8px;
            margin-bottom: 6px;
            padding-bottom: 4px;
            border-bottom: 1px solid #e5e7eb;
        }

        .platform-header-actions {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .platform-drag-handle {
            color: #9ca3af;
            cursor: grab;
            user-select: none;
            padding: 2px 6px;
            border-radius: 6px;
        }

        .platform-drag-handle:hover {
            background: rgba(0, 0, 0, 0.04);
        }

        .platform-card.dragging {
            opacity: 0.6;
        }

        .news-title {
            color: inherit;
            text-decoration: none;
            cursor: pointer;
        }

        .news-title:visited {
            color: inherit;
        }

        /* 跨平台高亮 */
        .news-title.cross-platform {
            color: var(--cross-platform-color);
            font-weight: 600;
            border-left: 3px solid var(--cross-platform-color);
            padding-left: 8px;
        }

        .news-title.cross-platform:visited {
            color: var(--cross-platform-color);
        }

        .news-title.cross-platform:hover {
            color: #ea580c;
        }

        .cross-platform-badge {
            display: inline-flex;
            background: linear-gradient(135deg, #f97316, #ea580c);
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
            margin-left: 8px;
            cursor: help;
        }

        .news-meta {
            display: flex;
            gap: 10px;
            font-size: 0.75rem;
            line-height: 1.2;
            color: #6b7280;
            white-space: nowrap;
        }

        .rank-text {
            display: inline-flex;
            align-items: center;
            font-size: 0.7rem;
            font-weight: 700;
            color: #9ca3af;
            letter-spacing: 0.2px;
        }

        /* 过滤面板 */
        .filter-input-row {
            display: flex;
            gap: 6px;
            margin-bottom: 6px;
        }

        .filter-input {
            flex: 1;
            padding: 4px 8px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.8rem;
        }

        .filter-add-btn {
            padding: 4px 10px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
        }

        .filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }

        .filter-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            background: #fee2e2;
            color: #dc2626;
            border-radius: 12px;
            font-size: 0.7rem;
        }

        .filter-tag-remove,
        .filter-remove {
            cursor: pointer;
            font-weight: bold;
            opacity: 0.7;
        }

        .filter-tag-remove:hover,
        .filter-remove:hover {
            opacity: 1;
        }

        .filter-toggle-btn {
            padding: 4px 10px;
            background: #fee2e2;
            color: #dc2626;
            border: none;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
        }

        .new-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 6px;
            border-radius: 9999px;
            font-size: 0.65rem;
            line-height: 1.2;
            font-weight: 800;
            letter-spacing: 0.3px;
            background: #f97316;
            color: #fff;
            vertical-align: middle;
        }

        .filter-mode-toggle {
            display: inline-flex;
            align-items: center;
            cursor: pointer;
            user-select: none;
            flex-shrink: 0;
        }

        .filter-mode-toggle input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
            width: 1px;
            height: 1px;
        }

        .filter-mode-pill {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0;
            padding: 0;
            border-radius: 6px;
            border: 1px solid #e5e7eb;
            background: #f3f4f6;
            font-size: 0.8rem;
            line-height: 1;
            overflow: hidden;
        }

        .filter-mode-off,
        .filter-mode-on {
            position: relative;
            z-index: 1;
            padding: 6px 12px;
            text-align: center;
            font-weight: 600;
            transition: all 0.15s ease;
            color: #6b7280;
        }

        .filter-mode-off {
            background: #dc2626;
            color: #fff;
            border-radius: 5px 0 0 5px;
        }

        .filter-mode-toggle input:checked+.filter-mode-pill .filter-mode-off {
            background: transparent;
            color: #6b7280;
        }

        .filter-mode-toggle input:checked+.filter-mode-pill .filter-mode-on {
            background: #2563eb;
            color: #fff;
            border-radius: 0 5px 5px 0;
        }

        .filter-mode-thumb {
            display: none;
        }


        .platform-card.platform-empty-hidden {
            display: none !important;
        }

        /* === 栏目设置弹窗样式 === */
        .category-settings-btn {
            padding: 4px 10px;
            background: #f3e8ff;
            color: #7c3aed;
            border: none;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
        }

        .category-settings-btn:hover {
            background: #ede9fe;
        }

        .settings-modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

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

        .settings-modal {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        #rssCatalogPreviewModal .settings-modal {
            width: 100vw;
            height: 100vh;
            max-width: none;
            max-height: none;
            border-radius: 0;
            box-shadow: none;
        }

        #rssCatalogPreviewModal .settings-modal-header {
            border-bottom: 1px solid rgba(200, 195, 185, 0.30);
            background: transparent;
            color: #2a2a2a;
        }

        #rssCatalogPreviewModal .settings-modal-close {
            background: rgba(0, 0, 0, 0.06);
            color: #111827;
        }

        #rssCatalogPreviewModal .settings-modal-close:hover {
            background: rgba(0, 0, 0, 0.10);
        }

        #rssCatalogPreviewModal .settings-modal-body {
            padding: 16px 16px 20px;
        }

        #rssCatalogPreviewModal .rss-preview-title-row {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
        }

        #rssCatalogPreviewModal .rss-preview-title-text {
            flex: 1;
            min-width: 0;
            white-space: normal;
            overflow: visible;
            word-break: break-word;
        }

        #rssCatalogPreviewModal .rss-preview-title-date {
            flex: 0 0 auto;
            color: #6b7280;
            font-size: 0.78rem;
            white-space: nowrap;
        }

        .settings-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid #e5e7eb;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        #rssCatalogPreviewModal #rssCatalogPreviewGrid {
            align-items: start;
        }

        #rssCatalogPreviewModal #rssCatalogPreviewGrid .platform-card {
            width: 100% !important;
            flex: 0 0 auto !important;
            box-sizing: border-box;
        }

        .settings-modal-title {
            font-size: 0.95rem;
            font-weight: 700;
        }

        .settings-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            font-size: 1.05rem;
            cursor: pointer;
            padding: 2px 8px;
            border-radius: 6px;
        }

        .settings-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .settings-modal-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 12px 14px;
        }

        .settings-modal-footer {
            display: flex;
            justify-content: space-between;
            padding: 10px 14px;
            border-top: 1px solid #e5e7eb;
            background: #f9fafb;
        }

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

        .settings-section-title {
            font-size: 0.85rem;
            font-weight: 700;
            color: #374151;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .category-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .category-list-wrapper.collapsed {
            display: none;
        }

        .category-list-controls {
            position: sticky;
            bottom: 0;
            background: #f9fafb;
            padding: 10px 0;
            border-top: 1px solid #e5e7eb;
            z-index: 2;
        }

        .category-list.hide-default .category-item:not(.custom) {
            display: none;
        }

        .category-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            cursor: grab;
            transition: all 0.2s;
        }

        .category-item:hover {
            border-color: #7c3aed;
            background: #faf5ff;
        }

        .category-item.dragging {
            opacity: 0.5;
            border-style: dashed;
        }

        .category-item.custom {
            border-left: 3px solid #7c3aed;
        }

        .category-item-drag {
            color: #9ca3af;
            cursor: grab;
        }

        .category-item-icon {
            font-size: 1.2rem;
        }

        .category-item-name {
            flex: 1;
            font-size: 0.85rem;
            font-weight: 600;
        }

        .category-item-platforms {
            font-size: 0.7rem;
            color: #6b7280;
        }

        .category-item-toggle {
            position: relative;
            width: 40px;
            height: 22px;
        }

        .category-item-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .category-item-toggle .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #d1d5db;
            transition: 0.3s;
            border-radius: 22px;
        }

        .category-item-toggle .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
        }

        .category-item-toggle input:checked+.slider {
            background-color: #7c3aed;
        }

        .category-item-toggle input:checked+.slider:before {
            transform: translateX(18px);
        }

        .category-item-actions {
            display: flex;
            gap: 4px;
        }

        .category-item-btn {
            padding: 4px 8px;
            font-size: 0.7rem;
            border: 1px solid #e5e7eb;
            border-radius: 4px;
            background: white;
            cursor: pointer;
        }

        .category-item-btn:hover {
            background: #f3f4f6;
        }

        .category-item-btn.delete {
            color: #dc2626;
            border-color: #fecaca;
        }

        .category-item-btn.delete:hover {
            background: #fee2e2;
        }

        .add-category-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px;
            background: #f3e8ff;
            color: #7c3aed;
            border: 2px dashed #c4b5fd;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .add-category-btn:hover {
            background: #ede9fe;
            border-color: #7c3aed;
        }

        .settings-btn-primary {
            padding: 8px 16px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
        }

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

        .settings-btn-primary:disabled,
        .settings-btn-primary[disabled] {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .settings-btn-primary:disabled:hover,
        .settings-btn-primary[disabled]:hover {
            opacity: 0.55;
        }

        .settings-btn-secondary {
            padding: 8px 16px;
            background: white;
            color: #6b7280;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
        }

        .settings-btn-secondary:hover {
            background: #f3f4f6;
        }

        .settings-btn-secondary:disabled,
        .settings-btn-secondary[disabled] {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .settings-btn-secondary:disabled:hover,
        .settings-btn-secondary[disabled]:hover {
            background: white;
        }

        /* 栏目编辑面板 */
        .category-edit-panel {
            display: none;
            padding: 16px;
            background: #faf5ff;
            border: 1px solid #e9d5ff;
            border-radius: 8px;
            margin-top: 12px;
        }

        .category-edit-panel.show {
            display: block;
        }

        .edit-field {
            margin-bottom: 12px;
        }

        .edit-field label {
            display: block;
            font-size: 0.8rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 4px;
        }

        .edit-field input[type="text"],
        .edit-field input[type="number"] {
            width: 100%;
            padding: 8px 10px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.85rem;
        }

        .platform-select-toolbar {
            display: flex;
            gap: 8px;
            align-items: center;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }

        .platform-select-search {
            flex: 1;
            min-width: 180px;
            padding: 8px 10px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.85rem;
            background: white;
        }

        .platform-select-actions {
            display: inline-flex;
            gap: 6px;
            align-items: center;
        }

        .platform-select-action-btn {
            padding: 6px 10px;
            background: white;
            color: #6b7280;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
        }

        .platform-select-action-btn.primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
        }

        .platform-select-action-btn:hover {
            background: #f3f4f6;
        }

        .platform-select-action-btn.primary:hover {
            opacity: 0.9;
        }

        .platform-select-action-btn:disabled,
        .platform-select-action-btn[disabled] {
            opacity: 0.55;
            cursor: not-allowed;
            background: #f9fafb;
            color: #9ca3af;
            border-color: #e5e7eb;
        }

        .platform-select-action-btn:disabled:hover,
        .platform-select-action-btn[disabled]:hover {
            background: #f9fafb;
        }

        .platform-select-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 6px;
            max-height: 45vh;
            overflow-y: auto;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 8px;
            background: white;
        }

        .platform-select-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 8px;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            cursor: default;
            font-size: 0.75rem;
            user-select: none;
        }

        .platform-select-item.no-drag,
        .platform-select-item.no-drag .drag-handle {
            cursor: default;
        }

        .platform-select-item:not(.no-drag) {
            cursor: pointer;
        }

        .platform-select-item:not(.no-drag) .drag-handle {
            cursor: grab;
        }

        .platform-select-item:hover {
            border-color: #4338ca;
        }

        .platform-select-item.selected {
            background: #f3e8ff;
            border-color: #c4b5fd;
        }

        .platform-select-item.dragging {
            opacity: 0.5;
        }

        .platform-select-item input {
            margin: 0;
        }

        .platform-select-item .drag-handle {
            color: #9ca3af;
            cursor: grab;
        }

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

        /* 获取数据按钮 */
        .fetch-btn {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            border: none;
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .fetch-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        }

        .fetch-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .fetch-btn .spinner {
            display: none;
            width: 14px;
            height: 14px;
            border: 2px solid #fff;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .fetch-btn.loading .spinner {
            display: inline-block;
        }

        .fetch-btn.loading .btn-text {
            display: none;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* 进度条 */
        .progress-container {
            display: none;
            margin-top: 10px;
            background: #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
            height: 6px;
        }

        .progress-container.show {
            display: block;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #10b981, #3b82f6);
            width: 0%;
            transition: width 0.3s ease;
            border-radius: 8px;
        }

        .progress-bar.indeterminate {
            width: 30%;
            animation: indeterminate 1.5s ease-in-out infinite;
        }

        @keyframes indeterminate {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(400%);
            }
        }

        .fetch-status {
            font-size: 0.75rem;
            color: #6b7280;
            margin-top: 5px;
        }

        .fetch-status.success {
            color: #10b981;
        }

        .fetch-status.error {
            color: #ef4444;
        }

        @media (max-width: 768px) {
            .platform-card {
                width: 240px;
            }

            .stats-row {
                flex-wrap: wrap;
            }
        }

        /* 护眼模式（暗黑模式） */
        body.eye-protection-mode {
            background: #1a1b1e;
            color: #e5e7eb;
        }

        body.eye-protection-mode .header-card,
        body.eye-protection-mode .category-tabs,
        body.eye-protection-mode .category-tab,
        body.eye-protection-mode .platform-card,
        body.eye-protection-mode .tab-content-area,
        body.eye-protection-mode .tr-confirm-modal {
            background: #25262b;
            color: #e5e7eb;
            border-color: #373a40;
        }

        body.eye-protection-mode .header-title,
        body.eye-protection-mode .news-title {
            color: #e5e7eb;
        }

        body.eye-protection-mode .header-subtitle,
        body.eye-protection-mode .news-subtitle,
        body.eye-protection-mode .news-placeholder,
        body.eye-protection-mode .category-empty-state,
        body.eye-protection-mode .tr-platform-card-close,
        body.eye-protection-mode .tr-platform-card-hide {
            color: #9ca3af;
            border-color: #373a40;
            background: #2c2e33;
        }

        body.eye-protection-mode .news-item {
            border-bottom-color: #373a40;
        }

        body.eye-protection-mode .category-tab.active {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
        }

        body.eye-protection-mode .platform-header {
            border-bottom-color: #373a40;
        }

        body.eye-protection-mode .platform-card {
            box-shadow: none;
            border-color: #373a40;
            border-radius: 12px;
            /* Ensure consistent rounded corners */
        }

        body.eye-protection-mode .platform-card:hover {
            border-color: #4f46e5;
        }

        /* Mobile: Ensure rounded corners on top in eye protection mode */
        @media (max-width: 640px) {
            body.eye-protection-mode .tab-content-area .platform-grid>.platform-card {
                border-radius: 12px 12px 0 0;
                border: 1px solid #373a40;
                border-bottom: 1px solid #373a40;
            }
        }

        body.eye-protection-mode #searchInput {
            background: #2c2e33 !important;
            color: #e5e7eb;
        }

        body.eye-protection-mode #searchInput:focus {
            background: #373a40 !important;
            box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4) !important;
        }

        body.eye-protection-mode .stat-card,
        body.eye-protection-mode .theme-toggle-btn {
            background: rgba(59, 130, 246, 0.1) !important;
            border-color: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }

        body.eye-protection-mode .theme-toggle-btn:hover {
            background: rgba(59, 130, 246, 0.15) !important;
        }

        body.eye-protection-mode .news-item.read .news-title {
            color: #6b7280;
        }

        body.eye-protection-mode a {
            color: #60a5fa;
        }

        body.eye-protection-mode .category-settings-btn {
            box-shadow: none;
        }

        /* === 统一的图标按钮样式 === */
        .icon-btn {
            width: 32px;
            height: 32px;
            padding: 0 !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 1.1rem;
            line-height: 1;
            cursor: pointer;
            border: 1px solid rgba(59, 130, 246, 0.18);
            background: rgba(59, 130, 246, 0.14) !important;
            color: rgba(37, 99, 235, 0.78);
            transition: all 0.2s ease;
            position: relative;
        }

        .icon-btn:hover {
            background: rgba(59, 130, 246, 0.2) !important;
            border-color: rgba(59, 130, 246, 0.3);
            transform: translateY(-1px);
        }

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

        /* 搜索按钮 */
        .search-btn {
            /* 继承 icon-btn 样式 */
        }

        /* 护眼模式按钮 */
        .theme-toggle-btn {
            /* 继承 icon-btn 样式 */
        }

        /* 栏目设置按钮 */
        .category-settings-btn {
            /* 继承 icon-btn 样式 */
        }

        /* 登录/用户按钮 */
        .auth-btn {
            /* 继承 icon-btn 样式 */
        }

        /* 已登录状态 */
        .auth-btn.logged-in {
            background: rgba(34, 197, 94, 0.14) !important;
            border-color: rgba(34, 197, 94, 0.18);
            color: rgba(22, 163, 74, 0.78);
        }

        .auth-btn.logged-in:hover {
            background: rgba(34, 197, 94, 0.2) !important;
            border-color: rgba(34, 197, 94, 0.3);
        }

        /* 护眼模式下的按钮样式 */
        body.eye-protection-mode .icon-btn {
            background: rgba(59, 130, 246, 0.1) !important;
            border-color: rgba(59, 130, 246, 0.2);
        }

        body.eye-protection-mode .icon-btn:hover {
            background: rgba(59, 130, 246, 0.15) !important;
        }

        body.eye-protection-mode .auth-btn.logged-in {
            background: rgba(34, 197, 94, 0.1) !important;
            border-color: rgba(34, 197, 94, 0.2);
        }

        body.eye-protection-mode .auth-btn.logged-in:hover {
            background: rgba(34, 197, 94, 0.15) !important;
        }

        /* Update icon buttons to be smaller and square-ish */
        .stat-card.theme-toggle-btn,
        .category-settings-btn {
            width: 32px;
            height: 32px;
            padding: 0 !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 1.1rem;
            line-height: 1;
        }

        /* Remove old padding/gap from category settings button */
        .category-settings-btn {
            gap: 0;
        }

        /* Red dot for new badge on icon button - hidden by default, shown via JS for updates */
        .new-dot {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 8px;
            height: 8px;
            background-color: #ef4444;
            border-radius: 50%;
            display: none;
            /* Hidden by default, JS shows when there are updates */
            border: 1px solid white;
            z-index: 10;
        }

        /* NEW text badge for settings button */
        .new-badge-text {
            position: absolute;
            top: -6px;
            right: -12px;
            padding: 1px 4px;
            background: linear-gradient(135deg, #8b5cf6, #a855f7);
            color: white;
            font-size: 9px;
            font-weight: 700;
            border-radius: 3px;
            display: none;
            z-index: 10;
            animation: badge-pulse 2s ease-in-out infinite;
        }

        /* Adjust stats-row to align better */
        .stats-row {
            align-items: center;
        }

        .stats-row .stat-card,
        .stats-row .category-settings-btn {
            position: relative;
            margin-right: 4px;
            /* Small spacing */
        }

        /* CLS Optimization: Skeleton Loader Styles */
        .tr-news-skeleton {
            padding: 8px 0;
            border-bottom: 1px solid #f3f4f6;
            min-height: calc(1.4em + 8px);
            /* Match .news-item height */
            box-sizing: border-box;
            display: flex;
            align-items: center;
            contain: content;
            /* Isolate rendering */
        }

        .tr-news-skeleton-line {
            height: 14px;
            width: 80%;
            background: #e5e7eb;
            border-radius: 4px;
            animation: tr-skeleton-pulse 1.5s infinite ease-in-out;
        }

        @keyframes tr-skeleton-pulse {
            0% {
                opacity: 0.6;
            }

            50% {
                opacity: 0.3;
            }

            100% {
                opacity: 0.6;
            }
        }

        /* CLS Optimization: Card Containment */
        .platform-card {
            contain: content;
            min-height: 100px;
            /* Ensure non-zero height before content loads */
        }

        /* Dark Mode support for skeletons */
        body.eye-protection-mode .tr-news-skeleton {
            border-bottom-color: #373a40;
        }

        body.eye-protection-mode .tr-news-skeleton-line {
            background: #373a40;
        }
/* Source Subscription Tab Styles */
.source-sub-container {
    padding: 15px;
}

.source-sub-search {
    margin-bottom: 15px;
}

.source-sub-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 15px;
}

.source-sub-search-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.source-sub-search-input::placeholder {
    color: #94a3b8;
}

.source-sub-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.source-view-btn {
    padding: 8px 16px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.source-view-btn:hover {
    border-color: #3b82f6;
    color: #f1f5f9;
}

.source-view-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    color: white;
}

.source-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.source-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.source-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.source-info {
    flex: 1;
    min-width: 0;
}

.source-name {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-domain {
    font-size: 13px;
    color: #94a3b8;
}

.source-sub-btn {
    padding: 8px 16px;
    border: 1px solid #3b82f6;
    background: transparent;
    color: #3b82f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    white-space: nowrap;
}

.source-sub-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.source-sub-btn.subscribed {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
    color: white;
}

.source-sub-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    width: 100%;
}

.source-sub-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.source-sub-empty .empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.source-sub-empty .empty-desc {
    font-size: 14px;
}

.source-sub-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.source-sub-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

/* ========================================
   AI Summary - Hover to show button
   Default: show date
   Hover: date becomes AI button
   ======================================== */

/* Hide AI indicator dot */
.news-ai-indicator {
    display: none !important;
}

/* Actions container - show it but position for overlay */
.news-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    background: transparent;
    padding-left: 8px;
}

/* News item needs relative positioning */
.news-item {
    position: relative;
}

/* Date - always visible */
.tr-news-date {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 12px;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

/* AI Summary Button - positioned over date */
.news-summary-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.news-summary-btn::before {
    content: "AI ✨";
}

/* Desktop: hover to show AI button, hide date */
@media (hover: hover) {
    .news-item:hover .tr-news-date {
        opacity: 0;
    }
    
    .news-item:hover .news-summary-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile: tap to expand */
.news-item.expanded .tr-news-date {
    opacity: 0;
}

.news-item.expanded .news-summary-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Has summary - green style */
.news-summary-btn.has-summary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.news-summary-btn.has-summary::before {
    content: "AI ✓";
}

/* Summarized item - green index */
.news-item.has-summary .news-index {
    color: #22c55e;
    font-weight: 600;
}


/* ========================================
   Summary Modal Styles - Apple Design Language
   ======================================== */

.summary-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
}

.summary-modal.open {
    opacity: 1;
    visibility: visible;
}

.summary-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.summary-modal-content {
    position: relative;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 25px 80px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-modal.open .summary-modal-content {
    transform: scale(1) translateY(0);
}

.summary-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.summary-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

.summary-modal-header {
    padding: 16px 32px 12px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.summary-modal-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.022em;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.summary-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 32px 32px;
    min-height: 300px;
    /* Prevent layout shift from scrollbar */
    scrollbar-gutter: stable;
}

.summary-modal-footer {
    padding: 16px 32px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 20px 20px;
}

.summary-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.summary-token-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #059669;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 100px;
}

.summary-token-tag.low-balance {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.summary-recharge-link {
    margin-left: 6px;
    padding: 2px 8px;
    background: rgba(217, 119, 6, 0.15);
    border-radius: 10px;
    font-size: 11px;
    color: #d97706;
    text-decoration: none;
    transition: all 0.2s;
}

.summary-recharge-link:hover {
    background: rgba(217, 119, 6, 0.25);
    color: #b45309;
}

/* Summary Feedback Buttons (Thumbs up/down) */
.summary-feedback {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    padding: 2px;
    margin-left: 4px;
}

.summary-feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-feedback-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
}

.summary-feedback-btn.active[data-vote="up"] {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.summary-feedback-btn.active[data-vote="down"] {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.summary-feedback-divider {
    width: 1px;
    height: 16px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 2px;
}

.summary-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.summary-link-btn:hover {
    background: rgba(59, 130, 246, 0.18);
}

.summary-regenerate-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: none;
    color: #10b981;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-regenerate-btn:hover {
    background: rgba(16, 185, 129, 0.18);
}

/* Summary Content Typography */
.summary-content {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1d1d1f;
}

.summary-content h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 1.2em 0 0.5em 0;
    padding-bottom: 0.3em;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.summary-content h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 1.2em 0 0.4em 0;
    padding-bottom: 0.3em;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.summary-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 1em 0 0.4em 0;
}

.summary-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0.8em 0 0.3em 0;
}

.summary-content p {
    margin: 0.8em 0;
    line-height: 1.65;
}

.summary-content ul, .summary-content ol {
    margin: 0.8em 0;
    padding: 0;
    list-style: none;
}

.summary-content li {
    position: relative;
    padding: 0.5em 0 0.5em 1.5em;
}

.summary-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1em;
    width: 5px;
    height: 5px;
    background: #007aff;
    border-radius: 50%;
}

.summary-content a {
    color: #007aff;
    text-decoration: none;
}

.summary-content strong {
    font-weight: 600;
}

.summary-content code {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.summary-content pre {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 1em 0;
}

.summary-content pre code {
    background: none;
    padding: 0;
}

.summary-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 14px;
}

.summary-content table th,
.summary-content table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
}

.summary-content table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.summary-content table tr:nth-child(even) td {
    background: #fafafa;
}

.summary-content blockquote {
    margin: 1em 0;
    padding: 12px 16px;
    border-left: 4px solid #007aff;
    background: rgba(0, 122, 255, 0.05);
    color: #4b5563;
    border-radius: 0 8px 8px 0;
}

.summary-content hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 1.5em 0;
}

/* Loading state */
.summary-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 20px;
    min-height: 280px;
}

.summary-loading-spinner {
    width: 36px;
    height: 36px;
    border: 2.5px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007aff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.summary-loading-text {
    text-align: center;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
}

.summary-loading-hint {
    font-size: 13px;
    color: #86868b;
    margin-top: 4px;
}

/* Slow loading hint */
.summary-slow-hint {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 149, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #86868b;
    animation: fadeIn 0.3s ease;
}

.summary-slow-link {
    color: #ff9500;
    text-decoration: none;
    font-weight: 500;
    margin-left: 8px;
}

.summary-slow-link:hover {
    text-decoration: underline;
}

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

/* Error state */
.summary-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 16px;
}

.summary-error-icon {
    font-size: 44px;
}

.summary-error-text {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

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

.summary-link-btn-secondary {
    padding: 10px 20px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.summary-link-btn-secondary:hover {
    background: #e5e7eb;
}

/* Access error state - friendly version */
.summary-access-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 12px;
    min-height: 280px;
}

.summary-access-error-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.summary-access-error-title {
    color: #374151;
    font-size: 17px;
    font-weight: 600;
}

.summary-access-error-text {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.summary-access-error-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.summary-retry-btn-secondary {
    padding: 10px 20px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-retry-btn-secondary:hover {
    background: #e5e7eb;
}

/* Timeout state - loading too slow */
.summary-timeout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    gap: 16px;
    min-height: 280px;
}

.summary-timeout-icon {
    font-size: 44px;
}

.summary-timeout-text {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.summary-timeout-subtext {
    color: #999;
    font-size: 13px;
    text-align: center;
    margin-top: -8px;
}

.summary-view-original-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.summary-view-original-btn:hover {
    background: #0066d6;
    color: white;
    text-decoration: none;
}

.summary-retry-btn {
    margin-top: 12px;
    padding: 10px 24px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.summary-retry-btn:hover {
    background: #0066d6;
}

/* Short content state - content too short for summary */
.summary-short-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    gap: 12px;
}

.short-content-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.short-content-message {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.short-content-length {
    color: #999;
    font-size: 13px;
}

.short-content-preview {
    max-width: 400px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    margin: 8px 0;
}

.short-content-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.short-content-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.short-content-btn.primary {
    background: #007aff;
    color: white;
}

.short-content-btn.primary:hover {
    background: #0066d6;
    color: white;
    text-decoration: none;
}

.short-content-btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.short-content-btn.secondary:hover {
    background: #e5e7eb;
}

/* Streaming cursor */
.summary-streaming .summary-cursor {
    display: inline;
    color: #007aff;
    animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .summary-modal-content {
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        height: calc(100vh - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 16px;
        margin: 8px;
    }
    
    .summary-modal-header {
        padding: 14px 20px 10px;
    }
    
    .summary-modal-body {
        padding: 24px 20px;
        flex: 1;
        overflow-y: auto;
    }
    
    .summary-modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 14px 20px;
    }
    
    .summary-footer-left,
    .summary-footer-right {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Blocked URL V2 Styles ========== */
.summary-blocked-v2 {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    min-height: 320px;
}

.blocked-header {
    text-align: center;
    margin-bottom: 28px;
}

.blocked-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    margin-bottom: 16px;
}

.blocked-icon-badge .icon-main {
    font-size: 32px;
}

.blocked-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.blocked-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    max-width: 360px;
    margin: 0 auto;
}

/* Extension Promo Card */
.blocked-extension-promo {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.promo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
}

.promo-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.promo-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.promo-feature .feature-icon {
    font-size: 16px;
}

.promo-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.promo-install-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.promo-install-btn .btn-icon {
    font-size: 18px;
}

.promo-install-btn .btn-arrow {
    opacity: 0.8;
    transition: transform 0.2s;
}

.promo-install-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.promo-browsers {
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}

/* Divider */
.blocked-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 13px;
}

.blocked-divider::before,
.blocked-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.blocked-divider span {
    padding: 0 16px;
}

/* Fallback Section */
.blocked-fallback {
    text-align: center;
}

.fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.fallback-link:hover {
    color: #374151;
    background: #f3f4f6;
    text-decoration: none;
}

.fallback-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.fallback-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.fallback-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Extension Ready State (when extension is installed) */
.blocked-extension-ready {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 20px;
    margin-bottom: 16px;
}

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

.ready-text {
    font-size: 13px;
    font-weight: 600;
    color: #059669;
}

.ready-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ready-open-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: white;
    text-decoration: none;
}

.ready-open-btn .btn-icon {
    font-size: 18px;
}

.ready-open-btn .btn-arrow {
    opacity: 0.8;
    transition: transform 0.2s;
}

.ready-open-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.ready-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

/* Blocked V2 Mobile Responsive */
@media (max-width: 640px) {
    .summary-blocked-v2 {
        padding: 24px 16px;
    }
    
    .blocked-icon-badge {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }
    
    .blocked-icon-badge .icon-main {
        font-size: 28px;
    }
    
    .blocked-title {
        font-size: 16px;
    }
    
    .blocked-subtitle {
        font-size: 13px;
    }
    
    .blocked-extension-promo,
    .blocked-extension-ready {
        padding: 20px 16px;
    }
    
    .promo-features {
        gap: 8px;
    }
    
    .promo-feature {
        font-size: 13px;
    }
    
    .promo-install-btn,
    .ready-open-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ========== Login Modal Styles ========== */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.login-modal-overlay[style*="flex"] {
    display: flex;
}

.login-modal-container {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loginModalIn 0.25s ease-out;
}

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

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1;
}

.login-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.login-modal-content {
    padding: 40px 32px 32px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.login-logo-icon {
    font-size: 28px;
}

.login-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
}

.login-step {
    display: none;
}

.login-step.active {
    display: block;
}

.login-input-group {
    margin-bottom: 16px;
}

.login-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.login-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-input-group input::placeholder {
    color: #94a3b8;
}

.login-code-input {
    text-align: center;
    font-size: 20px !important;
    letter-spacing: 6px;
    font-weight: 600;
}

.login-primary-btn {
    width: 100%;
    padding: 14px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-primary-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

.login-primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-hint {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 16px;
    text-align: center;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
}

.login-back-link:hover {
    color: #3b82f6;
}

.login-code-hint {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-code-hint strong {
    color: #1e293b;
}

.login-resend-link {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.login-resend-link:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 20px;
    color: #94a3b8;
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-divider span {
    padding: 0 16px;
}

.login-oauth-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.login-oauth-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.login-oauth-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.login-oauth-btn.login-oauth-wechat {
    background: #07c160;
    border-color: #07c160;
    color: white;
}

.login-oauth-btn.login-oauth-wechat:hover {
    background: #06ae56;
    border-color: #06ae56;
}

.login-oauth-btn.login-oauth-email {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.login-oauth-btn.login-oauth-email:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Apple-style login options grid */
.login-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.login-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-option-btn:hover {
    background: #e8e8ed;
    transform: scale(1.02);
}

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

.login-option-btn svg {
    flex-shrink: 0;
}

.login-option-btn span {
    white-space: nowrap;
}

/* WeChat - subtle green */
.login-option-wechat {
    background: #f0fdf4;
    color: #15803d;
}

.login-option-wechat:hover {
    background: #dcfce7;
}

/* Email - subtle blue */
.login-option-email {
    background: #eff6ff;
    color: #1d4ed8;
}

.login-option-email:hover {
    background: #dbeafe;
}

/* GitHub - subtle gray */
.login-option-github {
    background: #f5f5f7;
    color: #1d1d1f;
}

.login-option-github:hover {
    background: #e8e8ed;
}

/* Google - subtle gray */
.login-option-google {
    background: #f5f5f7;
    color: #1d1d1f;
}

.login-option-google:hover {
    background: #e8e8ed;
}

/* Email form container */
.login-email-form {
    width: 100%;
}

.login-message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.login-message.error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.login-message.success {
    display: block;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Mobile responsive for login modal */
@media (max-width: 480px) {
    .login-modal-container {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .login-modal-content {
        padding: 32px 24px 24px;
    }
}

/* ========== WeChat QR Login Styles ========== */
.login-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.login-qr-container {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    position: relative;
}

.login-qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #86868b;
    font-size: 13px;
}

.login-qr-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #e5e5e5;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: qrSpin 0.8s linear infinite;
}

@keyframes qrSpin {
    to { transform: rotate(360deg); }
}

.login-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.login-qr-expired {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #86868b;
    font-size: 13px;
    text-align: center;
    padding: 16px;
}

.login-qr-expired svg {
    color: #d1d1d6;
}

.login-qr-refresh-btn {
    margin-top: 4px;
    padding: 6px 14px;
    background: #07c160;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.login-qr-refresh-btn:hover {
    background: #06ae56;
}

.login-qr-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #86868b;
    font-size: 13px;
}

.login-qr-countdown {
    margin-top: 8px;
    font-size: 12px;
    color: #86868b;
}

.login-qr-countdown.warning {
    color: #ff9500;
}

/* Other login options - horizontal row */
.login-options-other {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.login-options-other .login-option-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
}

/* Divider style */
.login-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: #86868b;
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.login-divider span {
    padding: 0 12px;
}

/* Mobile responsive for QR login */
@media (max-width: 480px) {
    .login-qr-container {
        width: 160px;
        height: 160px;
    }
    
    .login-options-other {
        flex-wrap: wrap;
    }
    
    .login-options-other .login-option-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
}


/* ========== Favorites Panel Styles ========== */
.favorites-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 500px;
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateX(calc(100% + 24px));
}

.favorites-panel.open {
    transform: translateX(0);
}

.favorites-panel.resizing {
    transition: none;
    user-select: none;
}

/* Resize handle on the left edge */
.favorites-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
}

.favorites-resize-handle:hover,
.favorites-resize-handle.active {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.3), transparent);
}

.favorites-resize-handle::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.favorites-resize-handle:hover::before,
.favorites-resize-handle.active::before {
    opacity: 1;
}

.favorites-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.favorites-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.favorites-panel-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.favorites-panel-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.favorites-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.favorites-loading,
.favorites-empty,
.favorites-login-required {
    text-align: center;
    padding: 60px 24px;
    color: #64748b;
}

.favorites-empty-icon,
.favorites-login-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.favorites-login-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.favorites-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.favorite-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.favorite-item-title {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.favorite-item-title:hover {
    color: #3b82f6;
}

.favorite-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
}

.favorite-item-source {
    display: flex;
    align-items: center;
    gap: 6px;
}

.favorite-item-source span {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
}

.favorite-item-actions {
    display: flex;
    gap: 8px;
}

.favorite-summary-btn {
    background: #f0f9ff;
    border: none;
    color: #0284c7;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.favorite-summary-btn:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.favorite-summary-btn.has-summary {
    background: #ecfdf5;
    color: #059669;
}

.favorite-summary-btn.has-summary:hover {
    background: #d1fae5;
    color: #047857;
}

.favorite-summary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.favorite-remove-btn {
    background: #fef2f2;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.favorite-remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Favorites panel overlay */
.favorites-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.favorites-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* News item favorite button */
.news-favorite-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
}

.news-favorite-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.news-favorite-btn.favorited {
    color: #fbbf24;
    opacity: 1;
}

/* Mobile responsive for favorites panel */
@media (max-width: 480px) {
    .favorites-panel {
        top: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        transform: translateX(100%);
    }
    
    .favorites-panel.open {
        transform: translateX(0);
    }
    
    .favorites-resize-handle {
        display: none;
    }
}

/* Summary content styles in favorites */
.favorite-item-summary {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

.favorite-item-summary .summary-content {
    max-height: 400px;
    overflow-y: auto;
}

.favorite-item-summary .summary-content h2,
.favorite-item-summary .summary-content h3,
.favorite-item-summary .summary-content h4 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #1e293b;
}

.favorite-item-summary .summary-content h2 {
    font-size: 15px;
}

.favorite-item-summary .summary-content h3 {
    font-size: 14px;
}

.favorite-item-summary .summary-content h4 {
    font-size: 13px;
}

.favorite-item-summary .summary-content h2:first-child,
.favorite-item-summary .summary-content h3:first-child,
.favorite-item-summary .summary-content h4:first-child {
    margin-top: 0;
}

.favorite-item-summary .summary-content p {
    margin: 8px 0;
}

.favorite-item-summary .summary-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.favorite-item-summary .summary-content li {
    margin: 4px 0;
}

.favorite-item-summary .summary-content a {
    color: #2563eb;
    text-decoration: none;
}

.favorite-item-summary .summary-content a:hover {
    text-decoration: underline;
}

.favorite-item-summary .summary-content strong {
    font-weight: 600;
    color: #1e293b;
}

.summary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.summary-toggle-btn {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.summary-toggle-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ========== Todo Styles ========== */

/* Todo Button (首页) */
.todo-btn {
    position: relative;
}

.todo-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.todo-badge.show {
    display: flex;
}

/* Todo Sidebar - 参考收藏面板样式 */
.todo-sidebar {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 420px;
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateX(calc(100% + 24px));
}

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

.todo-sidebar.resizing {
    transition: none;
    user-select: none;
}

/* Resize handle on the left edge */
.todo-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
}

.todo-resize-handle:hover,
.todo-resize-handle.active {
    background: linear-gradient(to right, rgba(34, 197, 94, 0.3), transparent);
}

.todo-resize-handle::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.todo-resize-handle:hover::before,
.todo-resize-handle.active::before {
    opacity: 1;
}

.todo-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.todo-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.todo-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.todo-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.todo-filter-btn {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.todo-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.todo-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.todo-close-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.todo-new-group {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.todo-new-group-btn {
    width: 100%;
    padding: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.todo-new-group-btn:hover {
    background: #f1f5f9;
    border-color: #22c55e;
    color: #22c55e;
}

.todo-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.todo-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Todo Group - 可折叠卡片样式 */
.todo-group {
    margin-bottom: 8px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.todo-group:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.todo-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fafbfc;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.todo-group-header:hover {
    background: #f1f5f9;
}

.todo-group-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 10px;
    transition: transform 0.15s ease-out;
}

.todo-group.collapsed .todo-group-toggle {
    transform: rotate(-90deg);
}

.todo-group-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-group-count {
    font-size: 11px;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
    transition: opacity 0.15s;
}

/* 展开时隐藏数量，显示按钮 */
.todo-group:not(.collapsed) .todo-group-count {
    opacity: 0;
    width: 0;
    padding: 0;
    overflow: hidden;
}

.todo-group-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.15s;
}

/* 折叠时隐藏按钮 */
.todo-group.collapsed .todo-group-actions {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.todo-group-add-btn {
    width: 22px;
    height: 22px;
    background: transparent;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.todo-group-summary-btn {
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.todo-group-summary-btn:hover {
    background: #fef3c7;
    color: #d97706;
}

.todo-group-add-btn:hover {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.todo-group-items {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.todo-group-items-inner {
    min-height: 0;
    overflow: hidden;
}

.todo-group.collapsed .todo-group-items {
    grid-template-rows: 0fr;
}

/* Todo Item - 更紧凑的样式 */
.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.todo-item:hover {
    background: #fafbfc;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    cursor: pointer;
    accent-color: #22c55e;
    border-radius: 4px;
}

.todo-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
    word-break: break-word;
}

.todo-item.done .todo-text {
    text-decoration: line-through;
    color: #94a3b8;
}

.todo-delete-btn {
    opacity: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    font-size: 12px;
    transition: all 0.2s;
}

.todo-item:hover .todo-delete-btn {
    opacity: 1;
}

.todo-delete-btn:hover {
    color: #ef4444;
}

/* Todo Group Link Button */
.todo-group-link-btn {
    text-decoration: none;
    font-size: 14px;
    padding: 2px 4px;
    opacity: 0.7;
    transition: all 0.2s;
}

.todo-group-link-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Todo Input */
.todo-new-group-input,
.todo-add-input {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.todo-group-name-input,
.todo-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.todo-group-name-input:focus,
.todo-text-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.todo-group-create-btn,
.todo-add-confirm-btn {
    padding: 8px 14px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.todo-group-cancel-btn {
    padding: 8px 14px;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
}

/* Summary Modal Todo Panel */
.summary-todo-panel {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    max-height: 280px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    z-index: 10;
}

.summary-todo-panel.open {
    display: flex;
}

.summary-todo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.summary-todo-header span {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.summary-todo-close-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}

.summary-todo-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.summary-todo-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.summary-todo-input:focus {
    border-color: #22c55e;
}

.summary-todo-add-btn {
    padding: 8px 14px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.summary-todo-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

/* Summary Footer Todo Button - 与其他按钮风格一致 */
.summary-todo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: none;
    color: #16a34a;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-todo-btn:hover {
    background: rgba(34, 197, 94, 0.18);
}

.summary-todo-btn.active {
    background: rgba(34, 197, 94, 0.25);
    color: #15803d;
}

/* Action List Header with Todo Button */
.action-list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1.2em 0 0.5em 0;
}

.action-list-header h1,
.action-list-header h2,
.action-list-header h3 {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Action List Add Button */
.action-list-add-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s;
}

.action-list-add-btn:hover {
    background: #16a34a;
}

/* Todo Toast */
.todo-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #334155;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10001;
}

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

/* Selection Todo Button */
.selection-todo-btn {
    position: fixed;
    z-index: 10002;
    padding: 6px 12px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.selection-todo-btn:hover {
    background: #16a34a;
    transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .todo-sidebar {
        top: 0;
        right: 0;
        width: 100% !important;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .todo-resize-handle {
        display: none;
    }
    
    .summary-todo-panel {
        max-height: 50vh;
    }
}

/* ========================================
   Payment Modal - WeChat Pay Token Recharge
   Modern, minimalist, human-centered design
   ======================================== */

.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.payment-modal.open {
    opacity: 1;
    visibility: visible;
}

.payment-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.payment-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 
                0 32px 80px -16px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.payment-modal.open .payment-modal-content {
    transform: scale(1) translateY(0);
}

.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.payment-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

.payment-modal-header {
    padding: 28px 28px 20px;
    text-align: center;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.payment-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.payment-balance-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #86868b;
}

.payment-balance-hint span {
    color: #1d1d1f;
    font-weight: 500;
}

.payment-modal-body {
    padding: 24px;
    min-height: 280px;
}

/* Plans Section */
.payment-plans-section {
    animation: fadeIn 0.3s ease;
}

.payment-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payment-plan-card {
    position: relative;
    padding: 20px 12px;
    background: #f5f5f7;
    border: 2px solid transparent;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-plan-card:hover {
    background: #ebebed;
    transform: translateY(-2px);
}

.payment-plan-card.selected,
.payment-plan-card.recommended {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.05);
}

.payment-plan-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.payment-plan-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.payment-plan-price {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
}

.payment-plan-currency {
    font-size: 16px;
    color: #1d1d1f;
    font-weight: 500;
}

.payment-plan-amount {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.payment-plan-tokens {
    font-size: 13px;
    font-weight: 500;
    color: #007aff;
    margin-bottom: 4px;
}

.payment-plan-desc {
    font-size: 11px;
    color: #86868b;
}

.payment-plans-note {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(0, 122, 255, 0.06);
    border-radius: 12px;
    font-size: 12px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* QR Code Section */
.payment-qr-section {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.payment-qr-back {
    text-align: left;
    margin-bottom: 16px;
}

.payment-qr-back span {
    font-size: 13px;
    color: #007aff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.payment-qr-back span:hover {
    opacity: 0.7;
}

.payment-qr-container {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.payment-qr-code {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-qr-code canvas {
    border-radius: 8px;
}

.payment-qr-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #86868b;
}

.payment-qr-error {
    color: #ff3b30;
    font-size: 13px;
}

.payment-order-info {
    margin-top: 20px;
}

.payment-order-amount {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
}

.payment-order-tokens {
    font-size: 14px;
    color: #007aff;
    font-weight: 500;
}

.payment-status {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 20px;
    font-size: 13px;
    color: #007aff;
    display: inline-block;
}

.payment-status.error {
    background: rgba(255, 59, 48, 0.08);
    color: #ff3b30;
}

.payment-refresh-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #8e8e93;
}

.payment-refresh-hint a {
    color: #007aff;
    text-decoration: none;
    margin-left: 4px;
}

.payment-refresh-hint a:hover {
    text-decoration: underline;
}

.payment-countdown {
    margin-top: 8px;
    font-size: 12px;
    color: #8e8e93;
}

.payment-countdown.warning {
    color: #ff9500;
}

.payment-countdown.warning #countdownTime {
    font-weight: 600;
}

.payment-qr-expired {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    background: #f5f5f7;
    border-radius: 12px;
}

.payment-qr-expired-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.payment-qr-expired-text {
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 12px;
}

.payment-qr-refresh-btn {
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.payment-qr-refresh-btn:hover {
    background: #0056b3;
}

/* Success Section */
.payment-success-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    animation: fadeIn 0.3s ease;
}

.payment-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounceIn 0.5s ease;
}

.payment-success-title {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.payment-success-tokens {
    font-size: 18px;
    font-weight: 600;
    color: #34c759;
    margin-bottom: 24px;
}

.payment-success-btn {
    padding: 12px 48px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-success-btn:hover {
    background: #0066d6;
    transform: scale(1.02);
}

/* Loading & Error States */
.payment-loading {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    font-size: 14px;
}

.payment-error {
    text-align: center;
    padding: 40px 20px;
    color: #ff3b30;
}

.payment-error button {
    margin-top: 12px;
    padding: 8px 20px;
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.payment-not-configured {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
}

.payment-not-configured-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .payment-modal-content {
        width: calc(100% - 24px);
        max-width: none;
        margin: 12px;
        border-radius: 20px;
    }
    
    .payment-modal-header {
        padding: 24px 20px 16px;
    }
    
    .payment-modal-body {
        padding: 20px 16px;
    }
    
    .payment-plans-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .payment-plan-card {
        padding: 16px 20px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
    }
    
    .payment-plan-badge {
        position: static;
        transform: none;
        order: 2;
        flex-shrink: 0;
    }
    
    .payment-plan-name {
        margin-bottom: 0;
        flex: 1;
        order: 1;
    }
    
    .payment-plan-price {
        margin-bottom: 0;
        order: 3;
        flex-shrink: 0;
        min-width: 50px;
        text-align: right;
    }
    
    .payment-plan-amount {
        font-size: 24px;
    }
    
    .payment-plan-tokens,
    .payment-plan-desc {
        display: none;
    }
    
    .payment-qr-code {
        width: 180px;
        height: 180px;
    }
}

/* ========================================
   Article Tags - Hover Display Style
   ======================================== */

/* Tag suffix - inline after title */
.article-tag-suffix {
    display: inline;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}

/* Show tags on hover (desktop) */
@media (hover: hover) {
    .news-item:hover .article-tag-suffix {
        opacity: 1;
    }
}

/* Show tags on expand (mobile) */
.news-item.expanded .article-tag-suffix {
    opacity: 1;
}

/* Quality tags - Negative (warning) */
.article-tag-suffix.tag-ad { background: #fef2f2; color: #dc2626; }
.article-tag-suffix.tag-sponsored { background: #fef2f2; color: #dc2626; }
.article-tag-suffix.tag-clickbait { background: #fff7ed; color: #ea580c; }
.article-tag-suffix.tag-pr { background: #fff7ed; color: #ea580c; }
.article-tag-suffix.tag-outdated { background: #f3f4f6; color: #6b7280; }
.article-tag-suffix.tag-low_quality { background: #f3f4f6; color: #6b7280; }

/* Quality tags - Positive (recommend) */
.article-tag-suffix.tag-gem { background: #f0fdf4; color: #16a34a; }
.article-tag-suffix.tag-breaking { background: #eff6ff; color: #2563eb; }
.article-tag-suffix.tag-exclusive { background: #faf5ff; color: #9333ea; }
.article-tag-suffix.tag-practical { background: #ecfeff; color: #0891b2; }

/* Category tags - neutral gray */
.article-tag-suffix.tag-category { background: #f3f4f6; color: #6b7280; }

/* Special category tags - highlighted for important business events */
.article-tag-suffix.tag-earnings { background: #fef3c7; color: #b45309; }  /* 财报 - 金色 */
.article-tag-suffix.tag-ipo { background: #dbeafe; color: #1d4ed8; }       /* IPO - 蓝色 */
.article-tag-suffix.tag-merger { background: #e0e7ff; color: #4338ca; }    /* 并购 - 靛蓝 */
.article-tag-suffix.tag-layoff { background: #fee2e2; color: #b91c1c; }    /* 裁员 - 红色 */

/* Eye protection mode */
body.eye-protection-mode .article-tag-suffix {
    opacity: 0;
}

body.eye-protection-mode .news-item:hover .article-tag-suffix,
body.eye-protection-mode .news-item.expanded .article-tag-suffix {
    opacity: 1;
}

body.eye-protection-mode .article-tag-suffix.tag-ad,
body.eye-protection-mode .article-tag-suffix.tag-sponsored { background: #3d2020; color: #f87171; }
body.eye-protection-mode .article-tag-suffix.tag-clickbait,
body.eye-protection-mode .article-tag-suffix.tag-pr { background: #3d2d1a; color: #fb923c; }
body.eye-protection-mode .article-tag-suffix.tag-outdated,
body.eye-protection-mode .article-tag-suffix.tag-low_quality { background: #2d2d2d; color: #9ca3af; }
body.eye-protection-mode .article-tag-suffix.tag-gem { background: #1a3d2a; color: #4ade80; }
body.eye-protection-mode .article-tag-suffix.tag-breaking { background: #1a2d3d; color: #60a5fa; }
body.eye-protection-mode .article-tag-suffix.tag-exclusive { background: #2d1a3d; color: #c084fc; }
body.eye-protection-mode .article-tag-suffix.tag-practical { background: #1a3d3d; color: #22d3d3; }
body.eye-protection-mode .article-tag-suffix.tag-category { background: #2d2d2d; color: #9ca3af; }

/* Eye protection mode - special category tags */
body.eye-protection-mode .article-tag-suffix.tag-earnings { background: #3d3520; color: #fbbf24; }
body.eye-protection-mode .article-tag-suffix.tag-ipo { background: #1a2d3d; color: #60a5fa; }
body.eye-protection-mode .article-tag-suffix.tag-merger { background: #1a1a3d; color: #818cf8; }
body.eye-protection-mode .article-tag-suffix.tag-layoff { background: #3d2020; color: #f87171; }


/* ========================================
   Subscribe Sidebar - 快速订阅侧边栏
   复用 Todo Sidebar 样式模式
   ======================================== */

.subscribe-sidebar {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 420px;
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateX(calc(100% + 24px));
}

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

.subscribe-sidebar.resizing {
    transition: none;
    user-select: none;
}

/* Resize handle */
.subscribe-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background 0.2s;
}

.subscribe-resize-handle:hover,
.subscribe-resize-handle.active {
    background: linear-gradient(to right, rgba(34, 197, 94, 0.3), transparent);
}

.subscribe-resize-handle::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: #cbd5e1;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.subscribe-resize-handle:hover::before,
.subscribe-resize-handle.active::before {
    opacity: 1;
}

/* Backdrop */
.subscribe-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

/* Header */
.subscribe-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.subscribe-sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscribe-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscribe-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.subscribe-close-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Tabs */
.subscribe-tabs {
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
    overflow-x: auto;
}

.subscribe-tab {
    flex: 0 0 auto;
    min-width: 0;
    padding: 8px 10px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.subscribe-tab:hover {
    background: #e2e8f0;
    color: #334155;
}

.subscribe-tab.active {
    background: #22c55e;
    color: white;
}

/* Body */
.subscribe-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.subscribe-loading,
.subscribe-empty,
.subscribe-error {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.subscribe-error {
    color: #ef4444;
}

/* Search box */
.subscribe-search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.subscribe-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.subscribe-search-input:focus {
    border-color: #22c55e;
}

.subscribe-search-btn {
    padding: 10px 16px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-search-btn:hover {
    background: #16a34a;
}

/* Filters */
.subscribe-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.subscribe-filter-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.subscribe-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.subscribe-filter-btn.active {
    background: #22c55e;
    color: white;
}

/* Add box (for keywords) */
.subscribe-add-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.subscribe-add-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.subscribe-add-input:focus {
    border-color: #22c55e;
}

.subscribe-add-btn {
    padding: 10px 16px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-add-btn:hover {
    background: #16a34a;
}

/* List */
.subscribe-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscribe-sources-list {
    display: block;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 4px 0;
}

/* Item */
.subscribe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s;
}

.subscribe-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.subscribe-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.subscribe-item-info {
    flex: 1;
    min-width: 0;
}

.subscribe-item-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge styles for recommended tags */
.subscribe-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 6px;
}

.subscribe-badge-new {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    animation: badge-pulse 2s ease-in-out infinite;
}

.subscribe-badge-hot {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: white;
}

.subscribe-badge-related {
    background: #e0f2fe;
    color: #0284c7;
}

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

.subscribe-item-date {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 6px;
}

.subscribe-item-desc {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.subscribe-item-btn {
    padding: 6px 14px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.subscribe-item-btn:hover {
    background: #16a34a;
}

.subscribe-item-btn.followed {
    background: #f1f5f9;
    color: #64748b;
}

.subscribe-item-btn.followed:hover {
    background: #e2e8f0;
    color: #ef4444;
}

.subscribe-item-btn.delete {
    background: #fef2f2;
    color: #ef4444;
}

.subscribe-item-btn.delete:hover {
    background: #fee2e2;
}

/* Section title */
.subscribe-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin: 16px 0 8px;
    padding-left: 4px;
}

/* Auth prompt (for WeChat) */
.subscribe-auth-prompt {
    text-align: center;
    padding: 40px 20px;
}

.subscribe-auth-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.subscribe-auth-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.subscribe-auth-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.subscribe-auth-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #22c55e;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.subscribe-auth-btn:hover {
    background: #16a34a;
}

/* Empty state */
.subscribe-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.subscribe-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.subscribe-empty-title {
    font-size: 16px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.subscribe-empty-desc {
    font-size: 13px;
    color: #94a3b8;
}

/* Keyword styles */
.subscribe-keyword-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscribe-keyword-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

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

.subscribe-keyword-info {
    flex: 1;
    min-width: 0;
}

.subscribe-keyword-text {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}

.subscribe-keyword-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.subscribe-keyword-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}

.subscribe-keyword-delete {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-keyword-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* WeChat styles */
.subscribe-wechat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscribe-wechat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.subscribe-wechat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.subscribe-wechat-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.subscribe-wechat-info {
    flex: 1;
    min-width: 0;
}

.subscribe-wechat-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subscribe-wechat-signature {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subscribe-wechat-btn {
    padding: 6px 12px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.subscribe-wechat-btn:hover {
    background: #16a34a;
}

.subscribe-wechat-btn.subscribed {
    background: #e2e8f0;
    color: #64748b;
}

.subscribe-wechat-btn.subscribed:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .subscribe-sidebar {
        top: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .subscribe-resize-handle {
        display: none;
    }
    
    .subscribe-tabs {
        padding: 8px;
    }
    
    .subscribe-tab {
        font-size: 12px;
        padding: 8px 2px;
    }
    
    .subscribe-sidebar-body {
        padding: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* Eye protection mode */
body.eye-protection-mode .subscribe-sidebar {
    background: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.eye-protection-mode .subscribe-sidebar-header {
    background: linear-gradient(to bottom, #252525, #1a1a1a);
    border-color: #333;
}

body.eye-protection-mode .subscribe-sidebar-title {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-tabs {
    background: #252525;
    border-color: #333;
}

body.eye-protection-mode .subscribe-tab {
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-tab:hover {
    background: #333;
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-tab.active {
    background: #22c55e;
    color: white;
}

body.eye-protection-mode .subscribe-search-input,
body.eye-protection-mode .subscribe-add-input {
    background: #252525;
    border-color: #333;
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-filter-btn {
    background: #252525;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-filter-btn:hover {
    background: #333;
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-item {
    background: #252525;
    border-color: #333;
}

body.eye-protection-mode .subscribe-item-name {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-badge-related {
    background: #1e3a5f;
    color: #7dd3fc;
}

body.eye-protection-mode .subscribe-item-desc {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-item-btn.followed {
    background: #333;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-loading,
body.eye-protection-mode .subscribe-empty {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-auth-title {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-auth-desc {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-empty-title {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-empty-desc {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-keyword-item,
body.eye-protection-mode .subscribe-wechat-card {
    background: #252525;
    border-color: #333;
}

body.eye-protection-mode .subscribe-keyword-text,
body.eye-protection-mode .subscribe-wechat-name {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-keyword-meta,
body.eye-protection-mode .subscribe-wechat-signature {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-keyword-badge {
    background: #333;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-keyword-delete {
    background: transparent;
    border-color: #333;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-keyword-delete:hover {
    background: #4a1515;
    border-color: #7f1d1d;
    color: #f87171;
}

body.eye-protection-mode .subscribe-wechat-avatar-placeholder {
    background: #333;
}

body.eye-protection-mode .subscribe-wechat-btn.subscribed {
    background: #333;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-wechat-btn.subscribed:hover {
    background: #4a1515;
    color: #f87171;
}

/* Source card with preview */
.subscribe-source-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.subscribe-source-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 48px;
}

.subscribe-source-header:hover {
    background: #f1f5f9;
}

.subscribe-source-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.subscribe-source-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.subscribe-source-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.subscribe-source-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.subscribe-source-expand {
    transition: transform 0.2s;
}

.subscribe-source-card.expanded .subscribe-source-expand {
    transform: rotate(180deg);
}

.subscribe-source-preview {
    display: none;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.subscribe-source-card.expanded .subscribe-source-preview {
    display: block;
}

.subscribe-source-preview-inner {
    padding: 12px;
}

.subscribe-source-preview-hint {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

.subscribe-source-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subscribe-source-preview-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.subscribe-source-preview-item:last-child {
    border-bottom: none;
}

.subscribe-source-preview-item a {
    display: block;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.subscribe-source-preview-item a:hover {
    color: #22c55e;
}

.subscribe-source-preview-date {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Eye protection mode for source cards */
body.eye-protection-mode .subscribe-source-card {
    background: #252525;
    border-color: #333;
}

body.eye-protection-mode .subscribe-source-header:hover {
    background: #2a2a2a;
}

body.eye-protection-mode .subscribe-source-name {
    color: #e5e5e5;
}

body.eye-protection-mode .subscribe-source-meta {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-source-preview {
    background: #1a1a1a;
    border-color: #333;
}

body.eye-protection-mode .subscribe-source-preview-hint {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-source-preview-item {
    border-color: #333;
}

body.eye-protection-mode .subscribe-source-preview-item a {
    color: #d1d5db;
}

body.eye-protection-mode .subscribe-source-preview-item a:hover {
    color: #22c55e;
}

body.eye-protection-mode .subscribe-source-preview-date {
    color: #6b7280;
}

/* Load more button */
.subscribe-load-more {
    padding: 16px 12px;
    text-align: center;
}

.subscribe-load-more-btn {
    padding: 10px 24px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-load-more-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

body.eye-protection-mode .subscribe-load-more-btn {
    background: #333;
    border-color: #444;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-load-more-btn:hover {
    background: #444;
    color: #e5e5e5;
}

/* WeChat QR Login styles */
.subscribe-wechat-auth {
    text-align: center;
    padding: 20px;
}

.subscribe-qr-area {
    margin-bottom: 16px;
}

.subscribe-qr-loading {
    color: #64748b;
    padding: 40px 0;
}

.subscribe-qr-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.subscribe-qr-image {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    display: block;
    margin: 0 auto 12px;
}

.subscribe-qr-status {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.subscribe-qr-status.scanned {
    color: #f59e0b;
}

.subscribe-qr-status.confirmed {
    color: #22c55e;
}

.subscribe-qr-status.expired,
.subscribe-qr-status.error {
    color: #ef4444;
}

.subscribe-qr-hint {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.subscribe-qr-note {
    font-size: 12px;
    color: #94a3b8;
}

.subscribe-qr-note a {
    color: #22c55e;
}

.subscribe-qr-error {
    color: #ef4444;
    margin-bottom: 16px;
}

.subscribe-qr-success {
    color: #22c55e;
    font-size: 18px;
    margin-bottom: 8px;
}

.subscribe-qr-loading-text {
    color: #64748b;
    font-size: 13px;
}

.subscribe-qr-cancel,
.subscribe-qr-retry {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-qr-cancel:hover,
.subscribe-qr-retry:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Eye protection mode for QR */
body.eye-protection-mode .subscribe-qr-loading,
body.eye-protection-mode .subscribe-qr-hint {
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-qr-note {
    color: #6b7280;
}

body.eye-protection-mode .subscribe-qr-image {
    background: #333;
}

body.eye-protection-mode .subscribe-qr-cancel,
body.eye-protection-mode .subscribe-qr-retry {
    background: #333;
    border-color: #444;
    color: #9ca3af;
}

body.eye-protection-mode .subscribe-qr-cancel:hover,
body.eye-protection-mode .subscribe-qr-retry:hover {
    background: #444;
    color: #e5e5e5;
}

/* ==========================================================================
   Site Footer Styles (ICP & QR Code)
   ========================================================================== */

.tr-footer-info {
    margin-top: 14px;
    padding: 10px 6px 18px 6px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.footer-icp {
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
}

.footer-icp:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.footer-qr-wrapper {
    position: relative;
    display: inline-block;
}

.footer-qr-trigger {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    cursor: pointer;
}

.footer-qr-trigger:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-qr-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    z-index: 100;
}

.footer-qr-wrapper:hover .footer-qr-popup,
.footer-qr-popup.show {
    opacity: 1;
    visibility: visible;
}

.footer-qr-popup img {
    width: 180px;
    height: 180px;
    display: block;
    border-radius: 8px;
}

/* Eye protection mode */
body.eye-protection-mode .footer-icp {
    color: rgba(255, 255, 255, 0.35) !important;
}

body.eye-protection-mode .footer-qr-trigger {
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile */
@media (max-width: 640px) {
    .footer-qr-popup {
        right: -60px;
    }
    
    .footer-qr-popup img {
        width: 150px;
        height: 150px;
    }
}

/* ==========================================================================
   Summary Timeout/Error Action Buttons
   ========================================================================== */

.summary-timeout-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.summary-action-btn {
    padding: 10px 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.summary-action-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.summary-action-btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Discovery Tab Styles
   ========================================================================== */

/* Discovery card styling */
.discovery-card {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.discovery-card:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* NEW badge for discovery tags */
.discovery-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: discovery-pulse 2s ease-in-out infinite;
}

@keyframes discovery-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Discovery date styling */
.discovery-date {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 8px;
    font-weight: 400;
}

/* Discovery count styling */
.discovery-count {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
    font-weight: 400;
}

/* Discovery loading state */
.discovery-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    width: 100%;
}

/* Eye protection mode adjustments */
body.eye-protection-mode .discovery-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

body.eye-protection-mode .discovery-card:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

body.eye-protection-mode .discovery-date,
body.eye-protection-mode .discovery-count {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .discovery-badge {
        padding: 1px 6px;
        font-size: 9px;
    }
    
    .discovery-date {
        font-size: 10px;
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .discovery-count {
        font-size: 10px;
    }
}
