/* Hearth 桌面样式:侧边栏 + 5 页框架 + 柔光玻璃容器 */ /* Hearth launcher styles: sidebar + 5-page frame + soft-glass containers */ * { margin: 0; padding: 0; box-sizing: border-box; } html, body { height: 100%; } /* 壁纸透明:html/body 不设背景,露出原生壁纸 */ /* Wallpaper transparency: html/body keep transparent to reveal native wallpaper */ html, body { background: transparent; } /* 背景遮罩层:夜间主题下盖在壁纸上、UI 之下,透明度由 mask.js 控制 */ /* Wallpaper dim overlay: sits above the wallpaper and below the UI; opacity is controlled by mask.js */ #wallpaper-dim { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 0; transition: opacity .3s; } body { color: var(--text); font-family: -apple-system, "MiSans", "PingFang SC", sans-serif; overflow: hidden; } .app { position: relative; z-index: 1; display: flex; height: 100vh; } /* 侧边栏:柔光玻璃容器,非纯色背景 */ /* Sidebar: soft-glass container, not a solid color */ .rail { width: 80px; background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); -webkit-backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; transition: width .2s; } .rail.expanded { width: 240px; align-items: stretch; padding: 12px 8px; } .rail-clock { font-size: 14px; color: var(--text-dim); height: 18px; line-height: 18px; /* 始终占位固定高度,首页隐藏文字但保留高度,避免撑动下方图标 */ /* Always occupy a fixed height; hide text on home but keep the height to avoid shifting the icons below */ visibility: hidden; } .rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: var(--text-dim); padding: 8px; border-radius: 16px; cursor: pointer; } .rail-item .ico { width: 24px; height: 24px; } .rail-item .ico svg { width: 100%; height: 100%; display: block; } .rail-item .lbl { font-size: 11px; } .rail-item.active { background: var(--accent); color: #fff; } .content { flex: 1; overflow: hidden; } .page { display: none; height: 100%; } .page.active { display: flex; flex-direction: column; /* 页面切换淡入 + 轻微上移动画 */ /* Fade-in + slight rise transition on page switch */ animation: page-fade .22s ease; } @keyframes page-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } } /* 首页三栏布局:三等分纵向列,卡片向下堆叠 */ /* Home three-column layout: three equal vertical columns, cards stack downward */ .tri-col { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 16px; } .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; } /* 卡片:柔光玻璃拟态(复用 Task 4 token,非纯色背景) */ /* Card: soft-glass morphism (reuse Task 4 tokens, not a solid color) */ .card { background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); -webkit-backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); border: 1px solid var(--glass-border); border-radius: 14px; padding: 20px; color: var(--text); } /* 大字时间卡:主时间大字 + 日期副行 */ /* Big time card: large clock + date subtitle */ .time-card .big { font-size: 56px; font-weight: 300; line-height: 1; } /* 秒显:小号、弱化,紧跟时:分之后 */ /* Seconds: small and dim, trailing the HH:MM */ .time-card .sec { font-size: 24px; font-weight: 300; color: var(--text-dim); margin-left: 2px; } .time-card .sub { margin-top: 8px; font-size: 14px; color: var(--text-dim); } /* 媒体卡:正在播放标签 + 标题/艺术家 + 进度条 */ /* Media card: playing caption + title/artist + progress bar */ .media-card .cap { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; } .media-card .tt { margin-top: 6px; font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .media-card .ar { margin-top: 2px; font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .media-card .prog { margin-top: 12px; height: 4px; border-radius: 999px; background: var(--glass-border); overflow: hidden; } .media-card .bar { height: 100%; border-radius: 999px; background: var(--accent); } /* 安卓 APP 列表页:搜索框 + 网格 */ /* Android app list page: search box + grid */ .search { padding: 16px; } .search input { width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text); font-size: 14px; outline: none; } .grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; padding: 0 16px 16px; /* 行靠顶部对齐,避免结果只有一行时被拉伸到接近容器高度 */ /* Align rows to the top so a single result row doesn't stretch to container height */ align-content: start; } .cell { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 12px 8px; cursor: pointer; color: var(--text); } .cell .ic { width: 48px; height: 48px; border-radius: 12px; } .cell .lbl { font-size: 12px; color: var(--text-dim); text-align: center; } /* H5 应用列表页:富卡片 + 在线/离线标签 */ /* H5 web app list page: rich cards + online/offline badge */ .wcell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 12px 8px; cursor: pointer; color: var(--text); } .wcell .ic { width: 48px; height: 48px; border-radius: 12px; } .wcell .lbl { font-size: 12px; color: var(--text-dim); text-align: center; } .wcell .tag { position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 2px 6px; border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-dim); } /* webAPP 顶栏:浮层玻璃条 + 标签面板 */ /* webapp topbar: floating glass bar + tab panel */ #web-topbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); border: 1px solid var(--glass-border); z-index: 100; } #web-topbar button { width: 30px; height: 30px; border: none; border-radius: 999px; background: none; color: var(--text); font-size: 16px; cursor: pointer; } #web-topbar button:active { background: var(--glass-border); } #web-topbar #tb-tabs { width: auto; padding: 0 12px; font-size: 13px; color: var(--text-dim); } #web-topbar .tb-title { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text); } #tab-panel { position: fixed; top: 56px; right: 16px; display: none; min-width: 180px; max-width: 260px; padding: 8px; border-radius: 16px; background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); border: 1px solid var(--glass-border); z-index: 100; } #tab-panel .tab-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; } #tab-panel .tab-row.active { background: var(--accent); color: #fff; } #tab-panel .tab-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } #tab-panel .tab-close { border: none; background: none; color: inherit; font-size: 16px; cursor: pointer; opacity: 0.7; } #tab-panel .tab-close:hover { opacity: 1; } /* 设置页:Miuix Preference 分组 + 柔光玻璃条目 */ /* Settings page: Miuix Preference groups + soft-glass items */ .st-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; } /* 分组标题:小号弱化文本 */ /* Group header: small dim text */ .st-group { margin: 8px 4px 6px; font-size: 13px; color: var(--text-dim); } /* 设置项:玻璃拟态圆角行(复用 Task 4 token,非纯色背景) */ /* Setting item: soft-glass rounded row (reuse Task 4 tokens, not solid color) */ .st-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 8px; border-radius: 14px; background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); -webkit-backdrop-filter: blur(20px) saturate(1.2) brightness(1.05) contrast(1.1); border: 1px solid var(--glass-border); color: var(--text); } .st-item .lbl { font-size: 15px; } /* 服务器地址输入框:点击设置项后展开 */ /* Server URL input: expanded inside the item on tap */ .url-input { flex: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text); font-size: 13px; outline: none; } /* 右侧箭头:弱化色 */ /* Trailing arrow: dim color */ .st-item .arrow { color: var(--text-dim); font-size: 18px; line-height: 1; } /* 开关:Miuix Switch(静态展示,交互留后续) */ /* Switch: Miuix style (static; interaction later) */ .sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(127, 127, 127, 0.35); transition: background .2s; } .sw.on { background: var(--accent); } .sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: left .2s; } .sw.on i { left: 21px; } /* 滑块:Miuix Slider(静态展示:轨道 + 高亮填充 + 圆点) */ /* Slider: Miuix style (static: track + filled portion + thumb) */ .slider { position: relative; flex: none; width: 140px; height: 4px; border-radius: 999px; background: var(--glass-border); } .slider::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill, 60%); border-radius: 999px; background: var(--accent); } .slider i { position: absolute; top: 50%; left: 60%; transform: translate(-50%, -50%); width: 18px; height: 18px; border-radius: 999px; background: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }