mirror of
https://github.com/dream-pep/koring-launcher.git
synced 2026-09-12 05:45:18 +08:00
303 lines
9.4 KiB
CSS
303 lines
9.4 KiB
CSS
@import "tailwindcss";
|
||
@import "tw-animate-css";
|
||
@import "shadcn/tailwind.css";
|
||
@import "@fontsource-variable/geist";
|
||
@import "@fontsource-variable/inter";
|
||
|
||
@custom-variant dark (&:is(.dark *));
|
||
|
||
@font-face {
|
||
font-family: 'Alimama';
|
||
src: url('/alimama.ttf') format('truetype');
|
||
font-weight: 600;
|
||
font-stretch: condensed;
|
||
font-display: swap;
|
||
}
|
||
|
||
@theme inline {
|
||
--font-heading: var(--font-sans);
|
||
--font-sans: 'Alimama', 'Inter Variable', sans-serif;
|
||
--color-sidebar-ring: var(--sidebar-ring);
|
||
--color-sidebar-border: var(--sidebar-border);
|
||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||
--color-sidebar-accent: var(--sidebar-accent);
|
||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||
--color-sidebar-primary: var(--sidebar-primary);
|
||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||
--color-sidebar: var(--sidebar);
|
||
--color-chart-5: var(--chart-5);
|
||
--color-chart-4: var(--chart-4);
|
||
--color-chart-3: var(--chart-3);
|
||
--color-chart-2: var(--chart-2);
|
||
--color-chart-1: var(--chart-1);
|
||
--color-ring: var(--ring);
|
||
--color-input: var(--input);
|
||
--color-border: var(--border);
|
||
--color-destructive: var(--destructive);
|
||
--color-accent-foreground: var(--accent-foreground);
|
||
--color-accent: var(--accent);
|
||
--color-muted-foreground: var(--muted-foreground);
|
||
--color-muted: var(--muted);
|
||
--color-secondary-foreground: var(--secondary-foreground);
|
||
--color-secondary: var(--secondary);
|
||
--color-primary-foreground: var(--primary-foreground);
|
||
--color-primary: var(--primary);
|
||
--color-popover-foreground: var(--popover-foreground);
|
||
--color-popover: var(--popover);
|
||
--color-card-foreground: var(--card-foreground);
|
||
--color-card: var(--card);
|
||
--color-foreground: var(--foreground);
|
||
--color-background: var(--background);
|
||
--radius-sm: calc(var(--radius) * 0.6);
|
||
--radius-md: calc(var(--radius) * 0.8);
|
||
--radius-lg: var(--radius);
|
||
--radius-xl: calc(var(--radius) * 1.4);
|
||
--radius-2xl: calc(var(--radius) * 1.8);
|
||
--radius-3xl: calc(var(--radius) * 2.2);
|
||
--radius-4xl: calc(var(--radius) * 2.6);
|
||
}
|
||
|
||
:root {
|
||
--background: oklch(1 0 0);
|
||
--foreground: oklch(0.145 0 0);
|
||
--card: oklch(1 0 0);
|
||
--card-foreground: oklch(0.145 0 0);
|
||
--popover: oklch(1 0 0);
|
||
--popover-foreground: oklch(0.145 0 0);
|
||
--primary: oklch(0.205 0 0);
|
||
--primary-foreground: oklch(0.985 0 0);
|
||
--secondary: oklch(0.97 0 0);
|
||
--secondary-foreground: oklch(0.205 0 0);
|
||
--muted: oklch(0.97 0 0);
|
||
--muted-foreground: oklch(0.556 0 0);
|
||
--accent: oklch(0.97 0 0);
|
||
--accent-foreground: oklch(0.205 0 0);
|
||
--destructive: oklch(0.577 0.245 27.325);
|
||
--border: oklch(0.922 0 0);
|
||
--input: oklch(0.922 0 0);
|
||
--ring: oklch(0.708 0 0);
|
||
--chart-1: oklch(0.87 0 0);
|
||
--chart-2: oklch(0.556 0 0);
|
||
--chart-3: oklch(0.439 0 0);
|
||
--chart-4: oklch(0.371 0 0);
|
||
--chart-5: oklch(0.269 0 0);
|
||
--radius: 0.625rem;
|
||
--sidebar: oklch(0.985 0 0);
|
||
--sidebar-foreground: oklch(0.145 0 0);
|
||
--sidebar-primary: oklch(0.205 0 0);
|
||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||
--sidebar-accent: oklch(0.97 0 0);
|
||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||
--sidebar-border: oklch(0.922 0 0);
|
||
--sidebar-ring: oklch(0.708 0 0);
|
||
|
||
/* 标题栏 & 导航 - 亮色 */
|
||
--titlebar-bg: rgba(255, 255, 255, 0.3);
|
||
--titlebar-border: rgba(0, 0, 0, 0.08);
|
||
--indicator-bg: rgba(0, 0, 0, 0.1);
|
||
--indicator-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||
}
|
||
|
||
.dark {
|
||
--background: oklch(0.145 0 0);
|
||
--foreground: oklch(0.985 0 0);
|
||
--card: oklch(0.205 0 0);
|
||
--card-foreground: oklch(0.985 0 0);
|
||
--popover: oklch(0.205 0 0);
|
||
--popover-foreground: oklch(0.985 0 0);
|
||
--primary: oklch(0.922 0 0);
|
||
--primary-foreground: oklch(0.205 0 0);
|
||
--secondary: oklch(0.269 0 0);
|
||
--secondary-foreground: oklch(0.985 0 0);
|
||
--muted: oklch(0.269 0 0);
|
||
--muted-foreground: oklch(0.708 0 0);
|
||
--accent: oklch(0.269 0 0);
|
||
--accent-foreground: oklch(0.985 0 0);
|
||
--destructive: oklch(0.704 0.191 22.216);
|
||
--border: oklch(1 0 0 / 10%);
|
||
--input: oklch(1 0 0 / 15%);
|
||
--ring: oklch(0.556 0 0);
|
||
--chart-1: oklch(0.87 0 0);
|
||
--chart-2: oklch(0.556 0 0);
|
||
--chart-3: oklch(0.439 0 0);
|
||
--chart-4: oklch(0.371 0 0);
|
||
--chart-5: oklch(0.269 0 0);
|
||
--sidebar: oklch(0.205 0 0);
|
||
--sidebar-foreground: oklch(0.985 0 0);
|
||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||
--sidebar-accent: oklch(0.269 0 0);
|
||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||
--sidebar-border: oklch(1 0 0 / 10%);
|
||
--sidebar-ring: oklch(0.556 0 0);
|
||
|
||
/* 标题栏 & 导航 - 暗色 */
|
||
--titlebar-bg: rgba(0, 0, 0, 0.1);
|
||
--titlebar-border: rgba(255, 255, 255, 0.08);
|
||
--indicator-bg: rgba(255, 255, 255, 0.15);
|
||
--indicator-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||
}
|
||
|
||
@layer base {
|
||
* {
|
||
@apply border-border outline-ring/50;
|
||
}
|
||
body {
|
||
@apply bg-background text-foreground;
|
||
}
|
||
html {
|
||
@apply font-sans;
|
||
}
|
||
}
|
||
|
||
/* ============================================
|
||
自定义滚动条 — 默认隐藏,滚动时显示
|
||
============================================ */
|
||
::-webkit-scrollbar {
|
||
width: 5px;
|
||
height: 5px;
|
||
}
|
||
::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
::-webkit-scrollbar-thumb {
|
||
background: transparent;
|
||
border-radius: 999px;
|
||
transition: background 0.2s;
|
||
}
|
||
::-webkit-scrollbar-thumb:hover {
|
||
background: rgba(128, 128, 128, 0.4);
|
||
}
|
||
.dark ::-webkit-scrollbar-thumb:hover {
|
||
background: rgba(255, 255, 255, 0.25);
|
||
}
|
||
|
||
/* 悬停/滚动时显示滑块 */
|
||
.scroll-area:hover::-webkit-scrollbar-thumb,
|
||
.scroll-area::-webkit-scrollbar-thumb:active {
|
||
background: rgba(128, 128, 128, 0.25);
|
||
}
|
||
.dark .scroll-area:hover::-webkit-scrollbar-thumb,
|
||
.dark .scroll-area::-webkit-scrollbar-thumb:active {
|
||
background: rgba(255, 255, 255, 0.15);
|
||
}
|
||
|
||
/* ============================================
|
||
View Transitions — 页面切换动效
|
||
============================================ */
|
||
|
||
/* root 转场:禁用,只让内容区参与动画 */
|
||
::view-transition-old(root),
|
||
::view-transition-new(root) {
|
||
animation: none;
|
||
}
|
||
|
||
/* 内容区转场:前进方向 */
|
||
::view-transition-old(content) {
|
||
animation: 0.3s cubic-bezier(0.4, 0, 0.2, 1) both page-out-forward;
|
||
}
|
||
::view-transition-new(content) {
|
||
animation: 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both page-in-forward;
|
||
}
|
||
|
||
/* 设置子页面转场(已弃用 View Transitions,改用 keyframe) */
|
||
|
||
/* 内容区转场:后退方向 */
|
||
:root[data-transition-dir="backward"] ::view-transition-old(content) {
|
||
animation-name: page-out-backward;
|
||
}
|
||
:root[data-transition-dir="backward"] ::view-transition-new(content) {
|
||
animation-name: page-in-backward;
|
||
animation-delay: 0.05s;
|
||
}
|
||
|
||
@keyframes page-out-forward {
|
||
from { opacity: 1; transform: scale(1); }
|
||
to { opacity: 0; transform: scale(0.97); }
|
||
}
|
||
@keyframes page-in-forward {
|
||
from { opacity: 0; transform: scale(0.97); }
|
||
to { opacity: 1; transform: scale(1); }
|
||
}
|
||
@keyframes page-out-backward {
|
||
from { opacity: 1; transform: scale(1); }
|
||
to { opacity: 0; transform: scale(0.97); }
|
||
}
|
||
@keyframes page-in-backward {
|
||
from { opacity: 0; transform: scale(0.97); }
|
||
to { opacity: 1; transform: scale(1); }
|
||
}
|
||
|
||
/* ============================================
|
||
设置子页面切换 — keyframe 动画(仅内容区)
|
||
============================================ */
|
||
.setting-page-enter {
|
||
animation: setting-page-in 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
|
||
}
|
||
@keyframes setting-page-in {
|
||
from { opacity: 0; transform: translateY(6px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
/* ============================================
|
||
磨砂卡片 — 复用 --titlebar-bg / --titlebar-border
|
||
============================================ */
|
||
.glass-card {
|
||
background: rgba(255, 255, 255, 0.72);
|
||
border: 1px solid var(--titlebar-border);
|
||
backdrop-filter: blur(20px) saturate(180%);
|
||
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
||
border-radius: 8px;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||
}
|
||
:root.dark .glass-card {
|
||
background: rgba(0, 0, 0, 0.48);
|
||
}
|
||
|
||
/* ============================================
|
||
强内容模式 — 设置页面内容区模糊遮罩
|
||
============================================ */
|
||
.content-blur-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
backdrop-filter: blur(80px) saturate(120%);
|
||
-webkit-backdrop-filter: blur(80px) saturate(120%);
|
||
z-index: 0;
|
||
pointer-events: none;
|
||
background: rgba(255, 255, 255, var(--content-blur-opacity, 0.5));
|
||
transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
:root.dark .content-blur-overlay {
|
||
background: rgba(0, 0, 0, var(--content-blur-opacity, 0.5));
|
||
}
|
||
|
||
/* ============================================
|
||
辅助功能
|
||
============================================ */
|
||
.reduce-motion *,
|
||
.reduce-motion *::before,
|
||
.reduce-motion *::after {
|
||
animation-duration: 0.01ms !important;
|
||
animation-iteration-count: 1 !important;
|
||
transition-duration: 0.01ms !important;
|
||
}
|
||
.reduce-motion ::view-transition-old(root),
|
||
.reduce-motion ::view-transition-new(root) {
|
||
animation: none !important;
|
||
}
|
||
|
||
.reduce-transparency {
|
||
--titlebar-bg: var(--background);
|
||
}
|
||
.reduce-transparency .glass-card {
|
||
backdrop-filter: none;
|
||
-webkit-backdrop-filter: none;
|
||
}
|
||
|
||
.high-contrast {
|
||
--foreground: oklch(0 0 0);
|
||
}
|
||
:root.dark .high-contrast {
|
||
--foreground: oklch(1 0 0);
|
||
}
|