|
|
@@ -5,6 +5,75 @@
|
|
|
:root {
|
|
|
--color-brand: #10b981;
|
|
|
--color-surface: #0f172a;
|
|
|
+ --color-text: #f1f5f9; /* 默认浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 主题变量:dark / light */
|
|
|
+[data-theme="dark"] {
|
|
|
+ --color-brand: #10b981;
|
|
|
+ --color-surface: #1e293b; /* 深灰蓝背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] {
|
|
|
+ --color-brand: #059669; /* 略深一点的绿,便于浅色背景对比 */
|
|
|
+ --color-surface: #f8fafc; /* 浅色背景 */
|
|
|
+ --color-text: #1e293b; /* 深色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 扩展主题 */
|
|
|
+[data-theme="black"] {
|
|
|
+ --color-brand: #60a5fa; /* 亮蓝色品牌色,与黑色背景形成对比 */
|
|
|
+ --color-surface: #0a0a0a; /* 接近纯黑但稍微柔和 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="purple"] {
|
|
|
+ --color-brand: #a855f7; /* 亮紫色 */
|
|
|
+ --color-surface: #3b1f5e; /* 中等深度紫色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="orange"] {
|
|
|
+ --color-brand: #fb923c; /* 亮橙色 */
|
|
|
+ --color-surface: #7c2d12; /* 中等深度橙色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="green"] {
|
|
|
+ --color-brand: #22c55e; /* 亮绿色 */
|
|
|
+ --color-surface: #14532d; /* 中等深度绿色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="galaxy"] {
|
|
|
+ --color-brand: #06b6d4; /* 青色/星空色 */
|
|
|
+ --color-surface: #1e1b4b; /* 深蓝紫星空背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="rose"] {
|
|
|
+ --color-brand: #f43f5e; /* 玫瑰粉红 */
|
|
|
+ --color-surface: #831843; /* 中等深度玫瑰色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="blue"] {
|
|
|
+ --color-brand: #3b82f6; /* 亮蓝色 */
|
|
|
+ --color-surface: #1e3a8a; /* 中等深度蓝色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="red"] {
|
|
|
+ --color-brand: #f87171; /* 亮红色 */
|
|
|
+ --color-surface: #7f1d1d; /* 中等深度红色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="yellow"] {
|
|
|
+ --color-brand: #fbbf24; /* 亮黄色 */
|
|
|
+ --color-surface: #78350f; /* 中等深度黄棕色背景 */
|
|
|
+ --color-text: #f1f5f9; /* 浅色文字 */
|
|
|
}
|
|
|
|
|
|
html {
|
|
|
@@ -23,4 +92,127 @@ html {
|
|
|
.bg-surface {
|
|
|
background-color: var(--color-surface);
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的文字颜色覆盖 */
|
|
|
+[data-theme="light"] {
|
|
|
+ /* 覆盖白色文字为深色 */
|
|
|
+ color: var(--color-text);
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .text-white,
|
|
|
+[data-theme="light"] .text-white\/90,
|
|
|
+[data-theme="light"] .text-white\/80,
|
|
|
+[data-theme="light"] .text-white\/70,
|
|
|
+[data-theme="light"] .text-white\/60,
|
|
|
+[data-theme="light"] .text-white\/50 {
|
|
|
+ color: var(--color-text) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的边框和背景透明度调整 */
|
|
|
+[data-theme="light"] .border-white\/5 {
|
|
|
+ border-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .border-white\/10 {
|
|
|
+ border-color: rgba(30, 41, 59, 0.2) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .bg-white\/5 {
|
|
|
+ background-color: rgba(30, 41, 59, 0.05) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .bg-white\/10 {
|
|
|
+ background-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .bg-surface\/70 {
|
|
|
+ background-color: rgba(248, 250, 252, 0.7) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .bg-surface\/90 {
|
|
|
+ background-color: rgba(248, 250, 252, 0.9) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的 placeholder 颜色 */
|
|
|
+[data-theme="light"] .placeholder-white\/50::placeholder {
|
|
|
+ color: rgba(30, 41, 59, 0.5) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的 hover 状态 */
|
|
|
+[data-theme="light"] .hover\:text-white:hover {
|
|
|
+ color: var(--color-text) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .hover\:text-white\/80:hover {
|
|
|
+ color: rgba(30, 41, 59, 0.8) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .hover\:bg-white\/10:hover {
|
|
|
+ background-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的文本选择器颜色 */
|
|
|
+[data-theme="light"] .text-slate-100 {
|
|
|
+ color: var(--color-text) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下的首页标签和排序按钮样式 */
|
|
|
+[data-theme="light"] .chip-small {
|
|
|
+ color: var(--color-text) !important;
|
|
|
+ border-color: rgba(30, 41, 59, 0.2) !important;
|
|
|
+ background-color: rgba(30, 41, 59, 0.05) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .chip-small:hover {
|
|
|
+ background-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+ color: var(--color-text) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .chip-small-active {
|
|
|
+ background-color: rgba(5, 150, 105, 0.15) !important;
|
|
|
+ border-color: rgba(5, 150, 105, 0.3) !important;
|
|
|
+ color: var(--color-brand) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .sort-chip {
|
|
|
+ color: var(--color-text) !important;
|
|
|
+ border-color: rgba(30, 41, 59, 0.2) !important;
|
|
|
+ background-color: rgba(30, 41, 59, 0.05) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .sort-chip:hover {
|
|
|
+ background-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+ color: var(--color-text) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .sort-chip-active {
|
|
|
+ background-color: rgba(5, 150, 105, 0.15) !important;
|
|
|
+ border-color: rgba(5, 150, 105, 0.3) !important;
|
|
|
+ color: var(--color-brand) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下其他边框覆盖 */
|
|
|
+[data-theme="light"] .border-white\/20 {
|
|
|
+ border-color: rgba(30, 41, 59, 0.3) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下视频卡片样式 */
|
|
|
+[data-theme="light"] .group.rounded-2xl {
|
|
|
+ border-color: rgba(30, 41, 59, 0.1) !important;
|
|
|
+ background-color: rgba(255, 255, 255, 0.5) !important;
|
|
|
+}
|
|
|
+
|
|
|
+[data-theme="light"] .group.rounded-2xl:hover {
|
|
|
+ background-color: rgba(255, 255, 255, 0.7) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 浅色主题下视频卡片封面时间标签 - 保持白色文字和深色背景 */
|
|
|
+[data-theme="light"] .bg-black\/70 {
|
|
|
+ background-color: rgba(0, 0, 0, 0.7) !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 确保时间标签的文字在浅色主题下保持白色 */
|
|
|
+[data-theme="light"] .absolute.bottom-2.right-2.text-white {
|
|
|
+ color: white !important;
|
|
|
}
|