// ==UserScript== // @name 3A社区美化_v2.0.2 // @namespace http://tampermonkey.net/ // @version 2.0.2 // @description 3A社区美化主题,支持切换简洁白主题和网站原始样式 // @author You // @match *://3a.lol/* // @grant GM_addStyle // ==/UserScript== (function() { 'use strict'; // 简洁白主题样式 const lightTheme = ` /* 全局颜色变量 - 柔和米色主题 */ body.light-theme { /* 主题颜色变量 */ --light-bg-primary: #F5F2EA !important; --light-bg-secondary: #F9F7F3 !important; --light-bg-hover: #F0ECE5 !important; --light-border: #F0ECE5 !important; --light-text-primary: #333333 !important; --light-text-secondary: #666666 !important; --light-accent: #3B82F6 !important; --light-success: #10B981 !important; --light-danger: #EF4444 !important; --light-warning: #F59E0B !important; --light-info: #3B82F6 !important; --light-text-dark: #1E293B !important; --light-border-light: #F5F2EA !important; --light-bg-white: #FFFFFF !important; --light-bg-accent-hover: #EFF6FF !important; --light-bg-danger-hover: #FEF2F2 !important; --light-bg-alert: #C8C0B3 !important; --light-success-alt: #34D399 !important; --light-text-muted: #64748B !important; --light-bg-light: #F0F0F0 !important; --light-border-lightest: #F9F7F3 !important; --light-text-tertiary: #94A3B8 !important; --light-accent-hover: #2563EB !important; --light-text-black: #000000 !important; --light-bg-lightest: #E5E7EB !important; --light-button-bg: #838383 !important; --light-button-bg-hover: #6B6B6B !important; --light-bg-quote: #EAF5F3 !important; --light-bg-highlight: rgb(113 237 215) !important; --love: #EF4444 !important; --tertiary-50: var(--light-bg-primary) !important; --light-bg-tertiary: #E8E5DF !important; /* 应用基础颜色 */ background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 顶部导航栏 */ body.light-theme .d-header { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important; } /* 主内容区 */ body.light-theme .main-outlet { background-color: var(--light-bg-primary) !important; } /* 话题列表 */ body.light-theme .topic-list-item { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; box-shadow: none !important; } body.light-theme .topic-list-item:hover { background-color: var(--light-bg-hover) !important; } /* 话题内容 */ body.light-theme .topic-body { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; } /* 按钮样式 */ body.light-theme .btn, body.light-theme .btn-default, body.light-theme .btn-primary, body.light-theme .btn-secondary, body.light-theme .btn-success, body.light-theme .btn-danger, body.light-theme .btn-warning, body.light-theme .btn-info, body.light-theme .btn-light, body.light-theme .btn-dark, body.light-theme .btn-icon, body.light-theme .btn-flat, body.light-theme .btn-transparent { background-color: transparent !important; border-color: transparent !important; color: var(--light-text-dark) !important; } body.light-theme .btn:hover, body.light-theme .btn-default:hover, body.light-theme .btn-primary:hover, body.light-theme .btn-secondary:hover, body.light-theme .btn-success:hover, body.light-theme .btn-danger:hover, body.light-theme .btn-warning:hover, body.light-theme .btn-info:hover, body.light-theme .btn-light:hover, body.light-theme .btn-dark:hover, body.light-theme .btn-icon:hover, body.light-theme .btn-flat:hover, body.light-theme .btn-transparent:hover { background-color: transparent !important; border-color: transparent !important; } /* 搜索框 */ body.light-theme .floating-search-input { background-color: transparent !important; border-bottom: 1px solid var(--light-border-light) !important; } body.light-theme .search-input-wrapper { background-color: transparent !important; } body.light-theme #header-search-input { background-color: transparent !important; border-color: transparent !important; color: var(--light-text-dark) !important; } /* 搜索输入框容器 */ body.light-theme .search-menu .search-input, body.light-theme .search-menu-container .search-input { background-color: transparent !important; border-color: var(--light-accent) !important; } /* 搜索图标按钮 */ body.light-theme .search-icon { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; color: var(--light-text-dark) !important; height: 100% !important; align-items: center !important; display: flex !important; } body.light-theme .search-icon:hover { color: var(--light-accent) !important; background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; } /* 输入框 */ body.light-theme .d-input { background-color: var(--light-bg-secondary) !important; border-color: var(--light-border) !important; color: var(--light-text-primary) !important; } /* 侧边栏 */ body.light-theme .sidebar-sections { background-color: var(--light-bg-primary) !important; border-right: 1px solid var(--light-border) !important; } body.light-theme .sidebar-section { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .sidebar-section-header-wrapper { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .sidebar-section-header { color: var(--light-text-primary) !important; } body.light-theme .sidebar-section-header:hover { color: var(--light-accent) !important; } body.light-theme .sidebar-section-link { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .sidebar-section-link:hover { background-color: var(--light-bg-hover) !important; } body.light-theme .sidebar-section-link.active { background-color: var(--light-bg-accent-hover) !important; color: var(--light-accent) !important; } body.light-theme .sidebar-section-link-prefix { color: var(--light-accent) !important; } body.light-theme .sidebar-section-link-content-text { color: var(--light-text-primary) !important; } body.light-theme .sidebar-section-link-suffix { color: var(--light-success) !important; } body.light-theme .sidebar-section-header-button { color: var(--light-accent) !important; } body.light-theme .sidebar-section-header-button:hover { color: var(--light-danger) !important; } body.light-theme .sidebar-more-section-trigger { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .sidebar-more-section-trigger:hover { background-color: var(--light-bg-hover) !important; } /* 分类图标颜色 */ body.light-theme .sidebar-section-link-prefix[style*="color: #25AAE2"] { color: var(--light-accent) !important; } body.light-theme .sidebar-section-link-prefix[style*="color: #0088CC"] { color: var(--light-accent) !important; } body.light-theme .sidebar-section-link-prefix[style*="color: #808281"] { color: var(--light-text-muted) !important; } /* 浅色主题下的阴影样式 */ body.light-theme .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important; } body.light-theme .shadow { box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03) !important; } body.light-theme .shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.05) !important; } body.light-theme .shadow-lg { box-shadow: 0 6px 10px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.05) !important; } body.light-theme .shadow-xl { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; } body.light-theme .shadow-2xl { box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.05) !important; } body.light-theme .shadow-inner { box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; } body.light-theme .shadow-none { box-shadow: none !important; } /* 浅色主题下的分类标签样式 */ body.light-theme .badge-category__wrapper { background-color: transparent !important; border: none !important; } body.light-theme .badge-category { background-color: transparent !important; color: var(--category-badge-color) !important; border: none !important; box-shadow: none !important; } body.light-theme .badge-category__name { color: var(--category-badge-color) !important; } body.light-theme .badge-category:hover { background-color: var(--category-badge-color) !important; color: var(--light-bg-white) !important; } body.light-theme .badge-category:hover .badge-category__name { color: var(--light-bg-white) !important; } /* 浅色主题下方阴影修复 */ body.light-theme .topic-list-item { box-shadow: none !important; } body.light-theme .topic-list-item:after { box-shadow: none !important; } body.light-theme .topic-list-item:before { box-shadow: none !important; } /* 浅色主题帖子列表下方阴影 */ body.light-theme .post-list-item { box-shadow: none !important; } body.light-theme .post-list-item:after { box-shadow: none !important; } body.light-theme .post-list-item:before { box-shadow: none !important; } /* 浅色主题侧边栏原版样式 */ body.light-theme .sidebar-footer-wrapper { background-color: var(--d-sidebar-footer-fade) !important; box-shadow: none !important; } body.light-theme .sidebar-wrapper { background-color: var(--light-bg-white) !important; box-shadow: none !important; border-right: 1px solid var(--light-border-light) !important; } /* 浅色主题侧边栏阴影修复 */ body.light-theme .sidebar-wrapper:before { box-shadow: none !important; } body.light-theme .sidebar-wrapper:after { box-shadow: none !important; } /* 浅色主题侧边栏容器阴影修复 */ body.light-theme .sidebar-container { box-shadow: none !important; } body.light-theme .sidebar-container:before { box-shadow: none !important; } body.light-theme .sidebar-container:after { box-shadow: none !important; } /* 浅色主题侧边栏选项框框修复 */ body.light-theme .sidebar-section-link { background-color: transparent !important; border: none !important; box-shadow: none !important; } body.light-theme .sidebar-section-link:hover { background-color: var(--light-bg-accent-hover) !important; } /* 侧边栏底部渐变 */ body.light-theme { --d-sidebar-footer-fade: var(--light-bg-primary) !important; } /* 浅色主题下的Steam游戏分享按钮样式 */ body.light-theme .steam-info__btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 6px 10px !important; border-radius: 999px !important; text-decoration: none !important; font-size: .95em !important; line-height: 1 !important; color: var(--light-text-primary) !important; background: rgb(245 242 234) !important; border: 1px solid var(--primary-low-mid) !important; transition: background-color .15s ease, border-color .15s ease, transform .05s ease !important; } /* 浅色主题下的上次访问标签样式 */ body.light-theme .topic-list .topic-list-item-separator .topic-list-data span { background-color: var(--light-accent) !important; color: var(--light-bg-white) !important; } body.light-theme .topic-list .topic-list-item-separator .topic-list-data { border-top: 1px solid var(--light-accent) !important; } /* 导航控制 */ body.light-theme .navigation-controls { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } /* 新建话题按钮 */ body.light-theme #create-topic { background-color: var(--light-button-bg) !important; border-color: var(--light-button-bg) !important; color: var(--light-bg-white) !important; } body.light-theme #create-topic:hover { background-color: var(--light-button-bg-hover) !important; border-color: var(--light-button-bg-hover) !important; } /* 下拉选择器 */ body.light-theme .select-kit { background-color: transparent !important; border-color: var(--light-border) !important; } /* 标签选择器 */ body.light-theme .select-kit.combo-box.tag-drop .tag-drop-header, body.light-theme .select-kit.combo-box.tag-drop .selected-name { color: var(--light-text-primary) !important; } /* 聊天抽屉 */ body.light-theme .chat-drawer .chat-drawer-container { background: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; border-bottom: 0 !important; border-top-left-radius: 8px !important; border-top-right-radius: 8px !important; box-shadow: 0 0 4px rgba(0, 0, 0, .05) !important; } /* 聊天抽屉标题 */ body.light-theme .chat-drawer .c-navbar-container { background: var(--light-bg-secondary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .chat-drawer .c-navbar__title-text { color: var(--light-text-primary) !important; font-weight: 600 !important; } /* 聊天抽屉操作按钮 */ body.light-theme .chat-drawer .c-navbar__actions .btn { background-color: transparent !important; border-color: transparent !important; color: var(--light-text-secondary) !important; } body.light-theme .chat-drawer .c-navbar__actions .btn:hover { background-color: var(--light-bg-hover) !important; color: var(--light-accent) !important; } /* 聊天频道列表 */ body.light-theme .chat-drawer .chat-channel-divider { background: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .chat-drawer .channel-title { color: var(--light-text-secondary) !important; font-weight: 500 !important; } body.light-theme .chat-drawer .chat-channel-row { background: var(--light-bg-secondary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .chat-drawer .chat-channel-row:hover { background: var(--light-bg-hover) !important; } body.light-theme .chat-drawer .chat-channel-name__label { color: var(--light-text-primary) !important; } body.light-theme .chat-drawer .chat-channel__metadata-date { color: var(--light-text-tertiary) !important; } /* 聊天抽屉底部导航 */ body.light-theme .chat-drawer .c-footer { background: var(--light-bg-secondary) !important; border-top: 1px solid var(--light-border) !important; } body.light-theme .chat-drawer .c-footer__item { background-color: transparent !important; border-color: transparent !important; color: var(--light-text-secondary) !important; } body.light-theme .chat-drawer .c-footer__item.--active { color: var(--light-accent) !important; border-bottom: 2px solid var(--light-accent) !important; } body.light-theme .chat-drawer .c-footer__item:hover { background-color: var(--light-bg-hover) !important; color: var(--light-accent) !important; } /* 聊天频道卡片 */ body.light-theme .chat-channel-card { --chat-channel-card-border: transparent !important; background-color: var(--light-bg-primary) !important; border-radius: 8px !important; border-left: 5px solid rgba(0, 0, 0, 0) !important; border-color: var(--chat-channel-card-border) !important; } body.light-theme .chat-channel-card__name { color: var(--light-text-primary) !important; font-weight: 500 !important; } body.light-theme .chat-channel-card__leave-btn { background-color: transparent !important; border-color: transparent !important; color: var(--light-danger) !important; } body.light-theme .chat-channel-card__leave-btn:hover { background-color: var(--light-bg-danger-hover) !important; color: var(--light-danger) !important; } body.light-theme .chat-channel-card__members { color: var(--light-text-secondary) !important; font-size: 0.875rem !important; } /* 提示框样式 */ body.light-theme .alert { background-color: var(--light-bg-alert) !important; color: var(--light-bg-white) !important; } /* 下拉选择器 */ body.light-theme .select-kit-header { background-color: var(--light-bg-secondary) !important; color: var(--light-text-primary) !important; border-color: var(--light-border) !important; } body.light-theme .select-kit-header:hover { background-color: var(--light-bg-hover) !important; } /* 分类面包屑 */ body.light-theme .category-breadcrumb { background-color: var(--light-bg-secondary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .category-breadcrumb li { color: var(--light-text-primary) !important; } /* 未读标记 */ body.light-theme .unread .d-icon { color: var(--light-success-alt) !important; } /* 通知徽章 */ body.light-theme .badge { color: var(--light-text-primary) !important; } body.light-theme .badge-notification { background-color: var(--light-success-alt) !important; color: var(--light-text-primary) !important; } body.light-theme .badge-notification.unread-posts { background-color: var(--light-success-alt) !important; color: var(--light-text-primary) !important; } body.light-theme .badge-notification.new-topic { background-color: transparent !important; color: var(--light-text-primary) !important; } /* 搜索框下拉 */ body.light-theme .search-result { background-color: var(--light-bg-secondary) !important; border-color: var(--light-border) !important; } body.light-theme .search-result:hover { background-color: var(--light-bg-hover) !important; } body.light-theme .search-result-title { color: var(--light-text-primary) !important; } body.light-theme .search-result-meta { color: var(--light-text-secondary) !important; } body.light-theme .search-result-highlight { background-color: var(--light-bg-highlight) !important; color: var(--light-text-primary) !important; } /* 高亮样式 */ body.light-theme .highlighted { background-color: var(--light-bg-highlight) !important; color: var(--light-text-primary) !important; } /* 话题列表中的高亮项 - 保持与普通项相同的背景 */ body.light-theme .topic-list-item.highlighted { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .topic-list-item.highlighted:hover { background-color: var(--light-bg-hover) !important; } /* 个人信息中活动-所有页面的帖子 */ body.light-theme .post-list-item.user-stream { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .post-list-item.user-stream:hover { background-color: var(--light-bg-hover) !important; } /* 活动页面列表容器 */ body.light-theme .user-stream { background-color: var(--light-bg-primary) !important; } /* 活动页面导航栏 */ body.light-theme .nav-pills { background-color: var(--light-bg-primary) !important; } body.light-theme .nav-pills li a { color: var(--light-text-primary) !important; } body.light-theme .nav-pills li.active a { background-color: var(--light-bg-accent-hover) !important; color: var(--light-accent) !important; } /* 活动页面卡片 */ body.light-theme .card { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; } body.light-theme .search-highlight { background-color: var(--light-bg-highlight) !important; color: var(--light-text-primary) !important; } body.light-theme mark { background-color: var(--light-bg-highlight) !important; color: var(--light-text-primary) !important; } /* 搜索框 */ body.light-theme #search-container { background-color: var(--light-bg-secondary) !important; border-color: var(--light-border) !important; } body.light-theme #header-search-input { background-color: transparent !important; color: var(--light-text-primary) !important; } body.light-theme .search-icon { background-color: transparent !important; color: var(--light-text-secondary) !important; } /* 搜索菜单 */ body.light-theme .search-menu { background-color: var(--light-bg-secondary) !important; border-color: var(--light-border) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important; } body.light-theme .search-menu-initial-options { background-color: var(--light-bg-secondary) !important; } body.light-theme .search-random-quick-tip { background-color: var(--light-bg-secondary) !important; } body.light-theme .tip-label { background-color: var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme #tip-description { color: var(--light-text-secondary) !important; } body.light-theme .search-menu-recent { background-color: var(--light-bg-light) !important; } body.light-theme .search-menu-recent .heading { background-color: var(--light-bg-light) !important; border-bottom: 1px solid var(--light-border-lightest) !important; } body.light-theme .search-menu-recent h4 { color: var(--light-text-primary) !important; } body.light-theme .clear-recent-searches { background-color: transparent !important; color: var(--light-text-secondary) !important; } body.light-theme .search-menu-assistant-item { background-color: var(--light-bg-light) !important; border-bottom: 1px solid var(--light-border-lightest) !important; } body.light-theme .search-menu-assistant-item:hover { background-color: var(--light-bg-lightest) !important; } body.light-theme .search-link { color: var(--light-text-primary) !important; } body.light-theme .search-icon-wrapper { color: var(--light-text-secondary) !important; } body.light-theme .search-item-slug { color: var(--light-text-primary) !important; } /* 聊天消息容器 */ body.light-theme .chat-message-container { background-color: var(--light-bg-white) !important; width: 100% !important; } body.light-theme .chat-transcript { background-color: var(--light-bg-white) !important; width: 100% !important; } /* 按钮主样式 */ body.light-theme .btn-primary { background-color: var(--light-accent) !important; border-color: var(--light-accent) !important; color: var(--light-bg-white) !important; } body.light-theme .btn-primary:hover { background-color: var(--light-accent-hover) !important; border-color: var(--light-accent-hover) !important; } /* 链接样式 */ body.light-theme a { color: var(--light-text-primary) !important; } body.light-theme a:hover { color: var(--light-accent) !important; } /* 标题样式 */ body.light-theme h1, body.light-theme h2, body.light-theme h3, body.light-theme h4, body.light-theme h5, body.light-theme h6 { color: var(--light-text-primary) !important; } /* 引用块 */ body.light-theme .quote { background-color: var(--light-bg-quote) !important; border-left: 4px solid var(--light-border) !important; color: var(--light-text-primary) !important; } /* 被引用内容样式 */ body.light-theme .topic-avatar { background-color: var(--light-bg-primary) !important; border-top: 1px solid var(--light-border) !important; } body.light-theme .topic-body { border-top: 1px solid var(--light-border) !important; } body.light-theme .cooked .quote { background-color: var(--light-bg-quote) !important; border-left: 4px solid var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme aside.quote .title { display: flex !important; align-items: start !important; gap: var(--space-2) !important; color: var(--light-text-secondary) !important; padding: .8em .8em 0 .8em !important; background: var(--light-bg-quote) !important; border-left: 4px solid var(--light-border) !important; cursor: default !important; -webkit-user-select: none !important; user-select: none !important; } body.light-theme blockquote { background: var(--light-bg-quote) !important; border-left: 4px solid var(--light-border) !important; } body.light-theme .cooked .quote .attribution { background-color: var(--light-bg-quote) !important; color: var(--light-text-secondary) !important; border-bottom: 1px solid var(--light-border) !important; padding: 0.5em !important; } body.light-theme .cooked .quote .quote-content { background-color: var(--light-bg-quote) !important; color: var(--light-text-primary) !important; padding: 0.5em !important; } /* 代码块 */ body.light-theme pre { background-color: var(--light-bg-white) !important; border: 1px solid var(--light-border-light) !important; color: var(--light-text-primary) !important; } /* 帖子列表 */ body.light-theme .post-list { background-color: var(--light-bg-white) !important; border: 1px solid var(--light-border-light) !important; } body.light-theme .post-list-item { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .post-list-item:hover { background-color: var(--light-bg-hover) !important; } body.light-theme .post-list-item__header { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .post-list-item__details { background-color: var(--light-bg-primary) !important; } body.light-theme .stream-topic-title { background-color: var(--light-bg-primary) !important; } body.light-theme .stream-topic-title .title a { color: var(--light-accent) !important; } body.light-theme .stream-topic-title .title a:hover { color: var(--light-accent-hover) !important; } body.light-theme .post-list-item__metadata { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 链接颜色 */ body.light-theme .post-list-item a { color: var(--light-accent) !important; } body.light-theme .post-list-item a:hover { color: var(--light-accent-hover) !important; text-decoration: underline !important; } /* 内容区域 */ body.light-theme .cooked { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 帖子通知 */ body.light-theme .post-notice { background-color: var(--light-bg-secondary) !important; border-top-color: var(--light-border) !important; } /* 输入框样式 */ body.light-theme input[type=text], body.light-theme input[type=password], body.light-theme input[type=datetime], body.light-theme input[type=datetime-local], body.light-theme input[type=date], body.light-theme input[type=month], body.light-theme input[type=time], body.light-theme input[type=week], body.light-theme input[type=number], body.light-theme input[type=email], body.light-theme input[type=url], body.light-theme input[type=search], body.light-theme input[type=tel], body.light-theme input[type=color] { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border: 1px solid var(--light-border) !important; } /* 输入框边框增强 */ body.light-theme input[type=text], body.light-theme input[type=password], body.light-theme input[type=datetime], body.light-theme input[type=datetime-local], body.light-theme input[type=date], body.light-theme input[type=month], body.light-theme input[type=time], body.light-theme input[type=week], body.light-theme input[type=number], body.light-theme input[type=email], body.light-theme input[type=url], body.light-theme input[type=search], body.light-theme input[type=tel], body.light-theme input[type=color] { border: 1px solid var(--light-border-dark) !important; } body.light-theme input[type=text]:focus, body.light-theme input[type=password]:focus, body.light-theme input[type=datetime]:focus, body.light-theme input[type=datetime-local]:focus, body.light-theme input[type=date]:focus, body.light-theme input[type=month]:focus, body.light-theme input[type=time]:focus, body.light-theme input[type=week]:focus, body.light-theme input[type=number]:focus, body.light-theme input[type=email]:focus, body.light-theme input[type=url]:focus, body.light-theme input[type=search]:focus, body.light-theme input[type=tel]:focus, body.light-theme input[type=color]:focus { border-color: var(--light-accent) !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important; outline: none !important; } /* 新建话题回复框 */ body.light-theme #reply-control.open { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } /* 新建话题回复框内部 */ body.light-theme #reply-control .reply-area { background-color: var(--light-bg-primary) !important; } /* 新建话题回复框输入区域 */ body.light-theme #reply-control .d-editor-wrapper { background-color: var(--light-bg-primary) !important; } /* 新建话题回复框工具栏 */ body.light-theme #reply-control .d-editor-toolbar { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } /* 新话题内容输入框 */ body.light-theme .d-editor-textarea-wrapper { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } /* 切换按钮 */ body.light-theme .composer-toggle-switch__slider { background-color: var(--light-bg-tertiary) !important; border-color: var(--light-border) !important; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important; } /* 切换按钮滑块 */ body.light-theme .composer-toggle-switch__slider::before { background-color: var(--light-bg-white) !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important; } /* 切换按钮选中状态 */ body.light-theme .composer-toggle-switch__slider.active { background-color: var(--light-accent) !important; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important; } body.light-theme .composer-toggle-switch__slider.active::before { background-color: var(--light-bg-white) !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important; } /* 创建新话题界面 */ body.light-theme .composer { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } body.light-theme .composer-content { background-color: var(--light-bg-primary) !important; } body.light-theme .composer-header { background-color: var(--light-bg-primary) !important; border-bottom-color: var(--light-border) !important; } body.light-theme .composer-body { background-color: var(--light-bg-primary) !important; } body.light-theme .composer-footer { background-color: var(--light-bg-primary) !important; border-top-color: var(--light-border) !important; } /* 编辑器工具栏 */ body.light-theme .d-editor-toolbar { background-color: var(--light-bg-primary) !important; border-bottom-color: var(--light-border) !important; } /* 编辑器工具栏按钮 */ body.light-theme .d-editor-button { color: var(--light-text-primary) !important; } body.light-theme .d-editor-button:hover { background-color: var(--light-bg-secondary) !important; } /* 编辑器工具栏按钮激活状态 */ body.light-theme .d-editor-button.active { background-color: var(--light-bg-secondary) !important; color: var(--light-accent) !important; } /* 编辑器工具栏按钮禁用状态 */ body.light-theme .d-editor-button:disabled { color: var(--light-text-muted) !important; } /* 编辑器输入区域 */ body.light-theme .d-editor-input { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 下拉菜单 */ body.light-theme .select-kit-header { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; color: var(--light-text-primary) !important; } /* 可选标签输入框 */ body.light-theme .tag-input { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme .time { color: var(--light-text-muted) !important; } body.light-theme .relative-date { color: var(--light-text-muted) !important; } body.light-theme .expand-item { background-color: transparent !important; border-color: transparent !important; color: var(--light-accent) !important; } body.light-theme .expand-item:hover { background-color: var(--light-bg-accent-hover) !important; color: var(--light-danger) !important; } body.light-theme .excerpt { background-color: var(--light-bg-white) !important; border-bottom: 1px solid var(--light-border-light) !important; } body.light-theme .cooked { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 帖子内容 */ body.light-theme .post__body { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; } body.light-theme .post__regular { background-color: var(--light-bg-primary) !important; } /* 帖子元数据 */ body.light-theme .topic-meta-data { background-color: var(--light-bg-primary) !important; } /* 帖子菜单区域 */ body.light-theme .post__menu-area { background-color: var(--light-bg-primary) !important; } /* 帖子操作区域 */ body.light-theme .post__actions { background-color: var(--light-bg-primary) !important; } /* 帖子内容区域 */ body.light-theme .post__contents { background-color: var(--light-bg-primary) !important; } body.light-theme .lightbox { color: var(--light-text-primary) !important; } body.light-theme .lightbox:hover { color: var(--light-accent) !important; } /* 外部链接 */ body.light-theme a[rel="noopener nofollow ugc"] { color: var(--light-text-primary) !important; } body.light-theme a[rel="noopener nofollow ugc"]:hover { color: var(--light-accent) !important; } /* 分类选择器 */ body.light-theme .select-kit-collection { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } body.light-theme .category-row.select-kit-row { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .category-row.select-kit-row:hover, body.light-theme .category-row.select-kit-row.is-highlighted { background-color: var(--light-bg-hover) !important; } /* 标签选择器 */ body.light-theme .tag-row.select-kit-row { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .tag-row.select-kit-row:hover, body.light-theme .tag-row.select-kit-row.is-highlighted { background-color: var(--light-bg-hover) !important; } /* 标签搜索框 */ body.light-theme .select-kit-filter { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .filter-input { background-color: transparent !important; color: var(--light-text-primary) !important; border: none !important; } body.light-theme .filter-icon { color: var(--light-text-secondary) !important; } /* 选中状态字体 */ body.light-theme .select-kit-row.is-highlighted { color: var(--light-text-primary) !important; font-weight: 500 !important; } /* 未搜索到的部分 */ body.light-theme .select-kit-no-results { background-color: var(--light-bg-primary) !important; color: var(--light-text-secondary) !important; border-bottom: 1px solid var(--light-border) !important; } /* 个人信息菜单 */ body.light-theme .user-menu { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important; } body.light-theme .user-menu .user-menu-item { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .user-menu .user-menu-item:hover { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .user-menu .user-menu-item.active, body.light-theme .user-menu .user-menu-item.selected { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; font-weight: 500 !important; } /* 选中状态样式 */ body.light-theme .selected { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .active { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } /* 用户状态菜单选中样式 */ body.light-theme .set-user-status button.active { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; border-color: var(--light-accent) !important; } /* 导航菜单选中样式 */ body.light-theme .nav-item.active { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } /* 下拉菜单选中样式 */ body.light-theme .dropdown-menu li.active { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .user-menu .user-menu-header { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .user-menu .user-menu-footer { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-top: 1px solid var(--light-border) !important; } /* 通知菜单 */ body.light-theme .notifications-dropdown { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important; } body.light-theme .notifications-dropdown .notification-item { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .notifications-dropdown .notification-item:hover, body.light-theme .notifications-dropdown .notification-item.selected { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .notifications-dropdown .notification-header { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .notifications-dropdown .notification-footer { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-top: 1px solid var(--light-border) !important; } /* 通知项特定状态 */ body.light-theme .user-menu .quick-access-panel .read, body.light-theme .user-menu .quick-access-panel .bookmark, body.light-theme .user-notifications-list .read, body.light-theme .user-notifications-list .bookmark, body.light-theme .notifications-dropdown .read, body.light-theme .notifications-dropdown .bookmark { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .user-menu .quick-access-panel .read:hover, body.light-theme .user-menu .quick-access-panel .bookmark:hover, body.light-theme .user-notifications-list .read:hover, body.light-theme .user-notifications-list .bookmark:hover, body.light-theme .notifications-dropdown .read:hover, body.light-theme .notifications-dropdown .bookmark:hover { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } /* 未读通知 */ body.light-theme .user-menu .quick-access-panel .unread, body.light-theme .user-notifications-list .unread, body.light-theme .notifications-dropdown .unread { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .user-menu .quick-access-panel .unread:hover, body.light-theme .user-notifications-list .unread:hover, body.light-theme .notifications-dropdown .unread:hover { background-color: var(--light-border) !important; color: var(--light-text-primary) !important; } /* 通知菜单头部 */ body.light-theme .notifications-dropdown .header { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .notifications-dropdown .header .title { color: var(--light-text-primary) !important; } body.light-theme .notifications-dropdown .header .mark-read { color: var(--light-accent) !important; } body.light-theme .notifications-dropdown .header .mark-read:hover { color: var(--light-accent-hover) !important; text-decoration: underline !important; } /* 用户菜单标签列表图标 */ body.light-theme .user-menu.revamped .tabs-list .btn .d-icon, body.light-theme .user-menu.revamped .tabs-list button .d-icon { border-radius: var(--d-border-radius) !important; color: var(--light-text-secondary) !important; padding: .5em !important; background-color: var(--light-bg-primary) !important; } body.light-theme .user-menu.revamped .tabs-list .btn:hover .d-icon, body.light-theme .user-menu.revamped .tabs-list button:hover .d-icon { color: var(--light-text-primary) !important; background-color: var(--light-bg-hover) !important; } body.light-theme .user-menu.revamped .tabs-list .btn.active .d-icon, body.light-theme .user-menu.revamped .tabs-list button.active .d-icon { color: var(--light-bg-primary) !important; background-color: var(--light-accent) !important; } /* 通知标题和内容颜色 */ body.light-theme .user-menu .quick-access-panel .item-label, body.light-theme .user-notifications-list .item-label, body.light-theme .notifications-dropdown .item-label { color: var(--light-text-primary) !important; } body.light-theme .user-menu .quick-access-panel li a .item-description, body.light-theme .user-notifications-list li a .item-description, body.light-theme .notifications-dropdown li a .item-description { color: var(--light-text-secondary) !important; } /* 用户状态设置模态框 */ body.light-theme .modal.d-modal, body.light-theme .d-modal__container { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .d-modal__header { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .d-modal__title-text { color: var(--light-text-primary) !important; } body.light-theme .modal-close { color: var(--light-text-secondary) !important; } body.light-theme .modal-close:hover { color: var(--light-text-primary) !important; background-color: var(--light-bg-hover) !important; } body.light-theme .d-modal__body { background-color: var(--light-bg-primary) !important; } body.light-theme .user-status-description { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; border: 1px solid var(--light-border) !important; } body.light-theme .user-status-description:focus { border-color: var(--light-accent) !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important; } body.light-theme .tap-tile { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme .tap-tile:hover, body.light-theme .tap-tile[aria-pressed="true"] { background-color: var(--light-bg-hover) !important; border-color: var(--light-accent) !important; } body.light-theme .tap-tile-title { color: var(--light-text-primary) !important; } body.light-theme .tap-tile-date { color: var(--light-text-secondary) !important; } body.light-theme .d-modal__footer { background-color: var(--light-bg-primary) !important; border-top: 1px solid var(--light-border) !important; } body.light-theme .d-modal__footer .btn-primary { background-color: var(--light-accent) !important; color: var(--light-bg-white) !important; border: 1px solid var(--light-accent) !important; } body.light-theme .d-modal__footer .btn-primary:hover { background-color: var(--light-accent-hover) !important; border-color: var(--light-accent-hover) !important; } body.light-theme .d-modal__footer .btn-flat { background-color: transparent !important; color: var(--light-text-secondary) !important; border: 1px solid var(--light-border) !important; } body.light-theme .d-modal__footer .btn-flat:hover { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .delete-status { color: var(--light-danger) !important; } body.light-theme .delete-status:hover { background-color: rgba(239, 68, 68, 0.1) !important; } /* 标签选择模态框 */ body.light-theme .tag-chooser { background-color: var(--light-bg-primary) !important; } body.light-theme .tag-chooser .category { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .tag-chooser .category-header { background-color: var(--light-bg-primary) !important; border-bottom: 1px solid var(--light-border) !important; } body.light-theme .tag-chooser .tag-item { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme .tag-chooser .tag-item:hover { background-color: var(--light-bg-secondary) !important; border-color: var(--light-accent) !important; } body.light-theme .tag-chooser .tag-item.selected { background-color: var(--light-accent) !important; color: var(--light-bg-white) !important; } /* 草稿下拉菜单 */ body.light-theme .fk-d-menu__inner-content { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; } /* 对话框内容 */ body.light-theme .dialog-content { background-color: var(--light-bg-primary) !important; box-shadow: var(--shadow-card) !important; } /* 通知样式 */ body.light-theme .fk-d-toasts .fk-d-toast { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; box-shadow: var(--shadow-dropdown) !important; } /* 在线聊天日期分隔符 */ body.light-theme .chat-message-separator-date .chat-message-separator__text-container.is-pinned .chat-message-separator__text, body.light-theme .chat-message-separator-date .chat-message-separator__text-container.is-force-pinned .chat-message-separator__text { background-color: var(--light-bg-primary) !important; border-color: var(--light-border) !important; color: var(--light-text-primary) !important; } body.light-theme .chat-message-separator-new .chat-message-separator__text-container .chat-message-separator__text { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 聊天消息操作按钮 */ @media (min-width: 40rem) { body.light-theme .chat-message-actions { background-color: var(--light-bg-primary) !important; } } /* 聊天消息操作按钮图标 */ body.light-theme .chat-message-actions .react-btn .d-icon, body.light-theme .chat-message-actions .reply-btn .d-icon, body.light-theme .chat-message-actions .chat-message-thread-btn .d-icon, body.light-theme .chat-message-actions .bookmark-btn .d-icon { color: var(--light-text-secondary) !important; } /* 聊天消息操作按钮边框 */ body.light-theme .chat-message-actions .react-btn:first-child:not(:hover), body.light-theme .chat-message-actions .reply-btn:first-child:not(:hover), body.light-theme .chat-message-actions .chat-message-thread-btn:first-child:not(:hover), body.light-theme .chat-message-actions .bookmark-btn:first-child:not(:hover) { border-color: var(--light-text-secondary) !important; border-right-color: transparent !important; } @media (min-width: 40rem) { body.light-theme .chat-message-actions .react-btn:first-child, body.light-theme .chat-message-actions .reply-btn:first-child, body.light-theme .chat-message-actions .chat-message-thread-btn:first-child, body.light-theme .chat-message-actions .bookmark-btn:first-child { border-left-color: var(--light-text-secondary) !important; } } @media (min-width: 40rem) { body.light-theme .chat-message-actions .react-btn, body.light-theme .chat-message-actions .reply-btn, body.light-theme .chat-message-actions .chat-message-thread-btn, body.light-theme .chat-message-actions .bookmark-btn { border: 1px solid transparent !important; border-bottom-color: var(--light-text-secondary) !important; border-top-color: var(--light-text-secondary) !important; } } /* 聊天消息操作按钮右半部分(更多按钮) */ body.light-theme .chat-message-actions .more-buttons.dropdown-select-box .select-kit-header { border-color: var(--light-text-secondary) !important; border-left-color: transparent !important; } /* 复选框样式 */ body.light-theme .checkbox-label { color: var(--light-text-primary) !important; } body.light-theme .ember-checkbox { accent-color: var(--light-accent) !important; } body.light-theme .ember-checkbox:checked { background-color: var(--light-accent) !important; border-color: var(--light-accent) !important; } body.light-theme .ember-checkbox:focus { outline: 2px solid rgba(59, 130, 246, 0.2) !important; outline-offset: 2px !important; } /* 聊天消息 */ body.light-theme .chat-message-container { background-color: var(--light-bg-primary) !important; } /* 网盘链接显示样式 */ body.light-theme aside.onebox { border: 1px solid var(--light-border) !important; margin-inline: 4px !important; box-shadow: none !important; border-radius: 4px !important; margin-bottom: 1em !important; padding: 1em !important; font-size: var(--font-0) !important; background: var(--light-bg-white) !important; } body.light-theme aside.onebox .source { background: transparent !important; padding: 0 !important; border-radius: 0 !important; margin-bottom: 0.5em !important; } body.light-theme aside.onebox .onebox-body { background: transparent !important; } body.light-theme aside.onebox .onebox-metadata { background: transparent !important; padding: 0 !important; border-radius: 0 !important; margin-top: 0.5em !important; } body.light-theme aside.onebox a { color: var(--light-accent) !important; font-weight: 500 !important; } body.light-theme aside.onebox a:hover { color: var(--light-accent-hover) !important; text-decoration: underline !important; } body.light-theme aside.onebox .source a { font-size: 0.9em !important; color: var(--light-text-secondary) !important; } body.light-theme aside.onebox .source a:hover { color: var(--light-text-primary) !important; } body.light-theme .chat-message-container:hover { background-color: var(--light-bg-hover) !important; } /* 点赞按钮样式 - 红心 */ body.light-theme nav.post-controls .actions .double-button button.my-likes .d-icon, body.light-theme nav.post-controls .actions .double-button button.read-indicator .d-icon, body.light-theme nav.post-controls .actions .double-button button.regular-likes .d-icon { color: var(--light-danger) !important; padding-left: .45em !important; } /* 点赞按钮悬停样式 */ body.light-theme nav.post-controls .actions .double-button button.my-likes:hover .d-icon, body.light-theme nav.post-controls .actions .double-button button.read-indicator:hover .d-icon, body.light-theme nav.post-controls .actions .double-button button.regular-likes:hover .d-icon { color: var(--light-danger) !important; } body.light-theme .chat-message-container.-selected { background-color: var(--light-border) !important; } /* 回复按钮 */ body.light-theme .btn-primary.create.topic-footer-button { background-color: var(--light-button-bg) !important; color: var(--light-bg-white) !important; border: 1px solid var(--light-button-bg) !important; } body.light-theme .btn-primary.create.topic-footer-button:hover { background-color: var(--light-button-bg-hover) !important; border-color: var(--light-button-bg-hover) !important; } /* 用户资料区域 */ body.light-theme .user-main { background-color: var(--light-bg-primary) !important; } body.light-theme .user-main .about.collapsed-info { background-color: var(--light-bg-primary) !important; } body.light-theme .user-main .about.collapsed-info .details { margin-top: 0 !important; background: rgb(255 255 255) !important; } body.light-theme .new-user-wrapper { background-color: var(--light-bg-primary) !important; } body.light-theme .new-user-content-wrapper { background-color: var(--light-bg-primary) !important; } body.light-theme .user-content { background-color: var(--light-bg-primary) !important; } body.light-theme .top-section.stats-section { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; border-radius: 8px !important; padding: 16px !important; } body.light-theme .stats-title { color: var(--light-text-primary) !important; } body.light-theme .user-stat { color: var(--light-text-primary) !important; } body.light-theme .user-stat .value { color: var(--light-text-primary) !important; } body.light-theme .user-stat .label { color: var(--light-text-secondary) !important; } /* 用户导航 */ body.light-theme .user-navigation { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .user-nav { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .user-nav li { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } body.light-theme .user-nav li a { color: var(--light-text-primary) !important; } body.light-theme .user-nav li a:hover { background-color: var(--light-bg-hover) !important; color: var(--light-text-primary) !important; } body.light-theme .user-nav li.active a { background-color: var(--light-bg-accent-hover) !important; color: var(--light-accent) !important; } /* 容器 */ body.light-theme .container { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 主要内容 */ body.light-theme #main-container { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 主要出口 */ body.light-theme #main-outlet { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 总结页面特定样式 */ body.light-theme .summary-page { background-color: var(--light-bg-primary) !important; color: var(--light-text-primary) !important; } /* 徽章卡片 */ body.light-theme .badge-card { background-color: var(--light-bg-primary) !important; border: 1px solid var(--light-border) !important; } /* 点赞小红心 */ body.light-theme nav.post-controls .actions .double-button button.has-like .d-icon { color: var(--love) !important; fill: var(--love) !important; } body.light-theme .svg-icon, body.light-theme .svg-icon-title { height: 1em !important; width: 1em !important; line-height: 1 !important; display: inline-flex !important; position: relative !important; vertical-align: -0.125em !important; fill: currentcolor !important; flex-shrink: 0 !important; overflow: visible !important; } /* 点击次数徽章 */ body.light-theme a[data-clicks]::after { content: attr(data-clicks); font-weight: normal; background-color: #40D399 !important; color: #333377 !important; position: relative; top: -1px; padding: 2.95225px 5.85043px !important; min-width: .5em; line-height: 1.2 !important; font-size: 13.9296px !important; font-family: Inter, Arial, sans-serif !important; text-align: center; border-radius: 10px; white-space: nowrap; display: inline-block; margin: .15em; } /* 确保所有子元素都继承正确的颜色 */ body.light-theme * { color: inherit !important; } body.light-theme *[style*="color:"] { color: inherit !important; } `; // 初始化主题 const savedTheme = localStorage.getItem('theme'); if (savedTheme === 'light') { document.body.classList.add('light-theme'); } // 添加浅色主题样式 GM_addStyle(lightTheme); // 创建主题切换按钮 function createThemeSwitcher() { // 等待页面完全加载 setTimeout(function() { // 尝试多种可能的图标容器选择器 const iconListSelectors = [ '.icons.d-header-icons', '.d-header-icons', '.header-icons', '.icons' ]; let iconList = null; for (const selector of iconListSelectors) { iconList = document.querySelector(selector); if (iconList) break; } if (!iconList) { // 如果找不到图标列表,使用悬浮按钮 createFloatingSwitcher(); return; } // 创建主题切换按钮 const switcher = document.createElement('button'); switcher.className = 'btn no-text fk-d-menu__trigger theme-switcher-trigger btn-flat'; switcher.title = '切换主题'; // 从本地存储获取上次使用的主题 const savedTheme = localStorage.getItem('theme'); let isLightTheme = savedTheme === 'light'; // 初始化主题 if (isLightTheme) { // 使用简洁白主题(太阳图标) switcher.innerHTML = ` `; } else { // 不使用简洁白主题,恢复网站原始样式(月亮图标) switcher.innerHTML = ` `; } switcher.addEventListener('click', function() { isLightTheme = !isLightTheme; if (isLightTheme) { // 使用简洁白主题(太阳图标) document.body.classList.add('light-theme'); switcher.innerHTML = ` `; localStorage.setItem('theme', 'light'); } else { // 不使用简洁白主题,恢复网站原始样式(月亮图标) document.body.classList.remove('light-theme'); switcher.innerHTML = ` `; localStorage.setItem('theme', 'dark'); // 移除light-theme类后,自定义样式会自动失效,无需刷新页面 } }); // 尝试插入到不同位置 const insertions = [ // 尝试插入到语言切换按钮后面 () => { const languageSwitcher = document.querySelector('.language-switcher-trigger'); if (languageSwitcher) { languageSwitcher.parentNode.insertBefore(switcher, languageSwitcher.nextSibling); return true; } return false; }, // 尝试插入到搜索按钮后面 () => { const searchButton = document.querySelector('.search-button'); if (searchButton) { searchButton.parentNode.insertBefore(switcher, searchButton.nextSibling); return true; } return false; }, // 尝试插入到通知按钮后面 () => { const notificationButton = document.querySelector('.notifications-button'); if (notificationButton) { notificationButton.parentNode.insertBefore(switcher, notificationButton.nextSibling); return true; } return false; }, // 最后添加到图标列表末尾 () => { iconList.appendChild(switcher); return true; } ]; for (const insertion of insertions) { if (insertion()) break; } }, 2000); // 增加等待时间,确保页面完全加载 } // 创建悬浮切换按钮(备用) function createFloatingSwitcher() { const switcher = document.createElement('button'); // 从本地存储获取上次使用的主题 const savedTheme = localStorage.getItem('theme'); let isDarkTheme = savedTheme !== 'light'; // 初始化主题 if (isDarkTheme) { // 不使用简洁白主题,恢复网站原始样式(月亮图标) switcher.innerHTML = ` `; } else { // 使用简洁白主题(太阳图标) switcher.innerHTML = ` `; } switcher.style.cssText = ` position: fixed; top: 10px; right: 10px; z-index: 9999; background: #3b82f6; color: #fff; border: 1px solid #3b82f6; padding: 8px 12px; border-radius: 5px; cursor: pointer; font-size: 14px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); `; switcher.addEventListener('click', function() { isDarkTheme = !isDarkTheme; if (isDarkTheme) { // 不使用简洁白主题,恢复网站原始样式(月亮图标) document.body.classList.remove('light-theme'); switcher.innerHTML = ` `; localStorage.setItem('theme', 'dark'); // 移除light-theme类后,自定义样式会自动失效,无需刷新页面 } else { // 使用简洁白主题(太阳图标) document.body.classList.add('light-theme'); switcher.innerHTML = ` `; localStorage.setItem('theme', 'light'); } }); document.body.appendChild(switcher); } // 页面加载完成后执行 window.addEventListener('load', function() { createThemeSwitcher(); console.log('3A社区美化主题_v2已加载'); }); })();