feat: TurboSu initial release - racing telemetry dashboard

This commit is contained in:
Yei.J. (AskaEth)
2026-07-25 15:23:40 +08:00
commit d61bb61a83
61 changed files with 5270 additions and 0 deletions
+863
View File
@@ -0,0 +1,863 @@
/* TurboSu Main Layout - HyperOS Design System
* Layout: TopAppBar + NavigationRail (sidebar) + Content
*/
.app-layout {
display: flex;
width: 100%;
height: 100vh;
overflow: hidden;
}
/* ===== NavigationRail: Sidebar (HyperOS NavigationRail style) ===== */
.sidebar {
width: var(--sidebar-width);
height: 100vh;
background: var(--bg-secondary);
border-right: 1px solid var(--divider);
display: flex;
flex-direction: column;
transition: width var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
z-index: 100;
flex-shrink: 0;
overflow: hidden;
}
.sidebar.collapsed {
width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .collapse-arrow {
opacity: 0;
visibility: hidden;
transition: opacity var(--transition-fast), visibility var(--transition-fast);
}
.sidebar-header {
display: flex;
align-items: center;
padding: 16px 12px;
gap: 10px;
min-height: 60px;
}
.sidebar-logo {
flex-shrink: 0;
display: flex;
align-items: center;
}
.sidebar-title {
font-size: 17px;
font-weight: 600;
white-space: nowrap;
color: var(--text-primary);
transition: opacity var(--transition-fast);
}
.sidebar-toggle-btn {
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
width: 32px; height: 32px;
border-radius: var(--radius-sm);
color: var(--text-secondary);
cursor: pointer;
background: transparent;
flex-shrink: 0;
transition: all var(--transition-fast);
}
.sidebar-toggle-btn:hover {
background: rgba(128, 128, 128, 0.12);
color: var(--text-primary);
}
.sidebar-nav {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 4px 8px;
display: flex;
flex-direction: column;
gap: 1px;
}
/* Navigation items (HyperOS NavigationRail item style) */
.nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 11px 12px;
border-radius: var(--radius-md);
color: var(--text-secondary);
text-decoration: none;
transition: all var(--transition-fast);
white-space: nowrap;
cursor: pointer;
border: none;
background: none;
font-size: 14px;
font-weight: 400;
width: 100%;
text-align: left;
position: relative;
}
.nav-item:hover {
background: rgba(128, 128, 128, 0.08);
color: var(--text-primary);
}
.nav-item:active {
background: rgba(128, 128, 128, 0.14);
}
.nav-item.active {
background: var(--accent-container);
color: var(--accent-on-container);
font-weight: 500;
}
.nav-item svg {
flex-shrink: 0;
width: 20px;
height: 20px;
}
.nav-label {
transition: opacity var(--transition-fast);
}
.nav-section {
margin-top: 2px;
}
.collapsible-toggle .collapse-arrow {
margin-left: auto;
transition: transform var(--transition-normal), opacity var(--transition-fast);
}
.collapsible-toggle.collapsed .collapse-arrow {
transform: rotate(-90deg);
}
.nav-submenu {
overflow: hidden;
max-height: 600px;
transition: max-height var(--transition-slow);
padding-left: 6px;
}
.nav-submenu.collapsed {
max-height: 0;
}
.nav-submenu .nav-item {
padding: 9px 12px;
font-size: 13px;
}
.sidebar-bottom {
margin-top: auto;
border-top: 1px solid var(--divider);
padding: 4px 8px;
display: flex;
flex-direction: column;
gap: 1px;
}
/* ===== TopAppBar (HyperOS style) ===== */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--topbar-height);
padding: 0 20px;
background: var(--bg-secondary);
border-bottom: 1px solid var(--divider);
flex-shrink: 0;
transition: background var(--transition-normal);
}
.topbar-left {
display: flex;
align-items: center;
gap: 12px;
}
.topbar-logo-title {
display: flex;
align-items: center;
gap: 10px;
opacity: 1;
transition: opacity var(--transition-fast);
}
.topbar-logo-title.hidden {
opacity: 0;
pointer-events: none;
}
.topbar-title-text {
font-size: 17px;
font-weight: 600;
color: var(--text-primary);
}
.topbar-right {
display: flex;
align-items: center;
gap: 8px;
}
/* Connection status indicator */
.status-indicator {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: var(--radius-md);
background: var(--bg-glass);
backdrop-filter: var(--blur-small);
-webkit-backdrop-filter: var(--blur-small);
border: 1px solid var(--border-subtle);
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
}
.status-dot {
width: 8px; height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.status-indicator.connected .status-dot {
background: var(--success);
box-shadow: 0 0 6px rgba(52, 199, 89, 0.4);
}
.status-indicator.disconnected .status-dot {
background: var(--danger);
box-shadow: 0 0 6px rgba(233, 70, 52, 0.4);
}
.theme-light .icon-sun { display: none; }
.theme-dark .icon-moon { display: none; }
/* ===== Main Content Area ===== */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
background: var(--bg-primary);
}
.page-container {
flex: 1;
overflow: hidden;
position: relative;
}
.page {
display: none;
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
overflow-y: auto;
padding: 20px 24px;
}
.page.active {
display: block;
}
/* ===== Page Header ===== */
.page-header {
margin-bottom: 20px;
}
.page-header h2 {
font-size: 22px;
font-weight: 600;
color: var(--text-primary);
}
.page-header p {
font-size: 13px;
color: var(--text-secondary);
margin-top: 4px;
}
/* ===== Home Page: Status Cards ===== */
.status-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 14px;
margin-bottom: 20px;
}
.status-card {
padding: 18px 20px;
}
.status-card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.status-card-title {
font-size: 12px;
color: var(--text-secondary);
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.4px;
}
.status-card-value {
font-size: 26px;
font-weight: 600;
color: var(--text-primary);
}
.status-card-detail {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 2px;
}
/* ===== Dashboard Page (Browser) ===== */
.dashboard-layout {
display: flex;
height: 100%;
gap: 0;
}
.dashboard-sub-sidebar {
width: 170px;
flex-shrink: 0;
padding: 12px 8px;
border-right: 1px solid var(--divider);
overflow-y: auto;
}
.dashboard-sub-sidebar .category-item {
display: flex;
align-items: center;
padding: 9px 12px;
border-radius: var(--radius-md);
cursor: pointer;
color: var(--text-secondary);
transition: all var(--transition-fast);
font-size: 13px;
margin-bottom: 1px;
}
.dashboard-sub-sidebar .category-item:hover {
background: rgba(128, 128, 128, 0.08);
color: var(--text-primary);
}
.dashboard-sub-sidebar .category-item.active {
background: var(--accent-container);
color: var(--accent-on-container);
font-weight: 500;
}
.dashboard-main {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
}
.theme-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
gap: 14px;
}
.theme-card {
overflow: hidden;
cursor: pointer;
transition: all var(--transition-normal);
}
.theme-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
.theme-card .theme-card-preview {
width: 100%;
height: 130px;
background: var(--bg-tertiary);
display: flex;
align-items: center;
justify-content: center;
font-size: 44px;
color: var(--text-tertiary);
border-bottom: 1px solid var(--border-subtle);
}
.theme-card .theme-card-info {
padding: 12px 14px;
}
.theme-card .theme-card-name {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 4px;
}
.theme-card .theme-card-meta {
font-size: 11px;
color: var(--text-tertiary);
display: flex;
gap: 8px;
}
/* ===== Scene Page ===== */
.scene-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 20px;
}
.scene-header h2 {
font-size: 22px;
font-weight: 600;
}
.scene-actions {
display: flex;
gap: 8px;
}
.scene-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 14px;
}
.scene-card {
padding: 18px;
cursor: pointer;
transition: all var(--transition-normal);
}
.scene-card:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-md);
}
.scene-card .scene-card-name {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 4px;
}
.scene-card .scene-card-game {
font-size: 12px;
color: var(--accent-on-container);
margin-bottom: 6px;
}
.scene-card .scene-card-meta {
font-size: 12px;
color: var(--text-tertiary);
display: flex;
justify-content: space-between;
}
.scene-canvas-list {
display: flex;
gap: 5px;
flex-wrap: wrap;
margin-top: 8px;
}
.scene-canvas-badge {
font-size: 11px;
padding: 3px 8px;
background: var(--bg-tertiary);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
color: var(--text-secondary);
}
/* ===== Modal/Dialog (HyperOS OverlayDialog style) ===== */
.modal-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: var(--window-dimming);
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 0.2s ease both;
}
.modal {
background: var(--bg-secondary);
border: 1px solid var(--border-normal);
border-radius: var(--radius-xl);
padding: 28px;
min-width: 620px;
max-width: 90vw;
max-height: 85vh;
overflow-y: auto;
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
animation: fadeInUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.modal h3 {
font-size: 18px;
font-weight: 600;
margin-bottom: 20px;
color: var(--text-primary);
}
.modal-actions {
display: flex;
gap: 8px;
justify-content: flex-end;
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid var(--divider);
}
/* ===== Scene Editor Canvas ===== */
.scene-editor-canvas {
position: relative;
margin: 16px 0;
border: 2px dashed var(--outline);
border-radius: var(--radius-md);
overflow: hidden;
background: var(--bg-tertiary);
}
.scene-editor-placement {
position: absolute;
border: 2px solid var(--accent);
border-radius: var(--radius-sm);
cursor: move;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: var(--text-primary);
background: var(--accent-container);
min-width: 80px;
min-height: 50px;
}
/* ===== Debug Page ===== */
.debug-container {
display: flex;
flex-direction: column;
height: 100%;
gap: 14px;
}
.debug-toolbar {
display: flex;
align-items: center;
gap: 10px;
}
.debug-data {
flex: 1;
overflow-y: auto;
padding: 14px 16px;
font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-all;
background: var(--bg-tertiary);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-md);
color: var(--text-primary);
}
.debug-field {
margin-bottom: 10px;
padding: 10px 14px;
background: var(--bg-glass);
backdrop-filter: var(--blur-small);
-webkit-backdrop-filter: var(--blur-small);
border-radius: var(--radius-md);
border: 1px solid var(--border-subtle);
}
.debug-field .debug-field-name {
font-size: 11px;
color: var(--accent-on-container);
margin-bottom: 3px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.debug-field .debug-field-value {
font-size: 14px;
color: var(--text-primary);
font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
/* ===== Settings Page ===== */
.settings-section {
margin-bottom: 28px;
}
.settings-section h3 {
font-size: 17px;
font-weight: 600;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid var(--divider);
color: var(--text-primary);
}
.settings-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
gap: 16px;
}
.settings-label {
font-size: 14px;
color: var(--text-primary);
}
.settings-desc {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 2px;
}
.settings-control {
flex-shrink: 0;
}
.settings-control input[type="number"] {
width: 100px;
}
.settings-control select {
min-width: 160px;
}
/* ===== Empty State ===== */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
text-align: center;
color: var(--text-tertiary);
}
.empty-state svg {
margin-bottom: 16px;
opacity: 0.25;
}
.empty-state h4 {
font-size: 16px;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 8px;
}
.empty-state p {
font-size: 13px;
max-width: 400px;
}
/* ===== Toast / Snackbar (HyperOS Snackbar style) ===== */
.toast-container {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
z-index: 999;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
}
.toast {
padding: 12px 20px;
border-radius: var(--radius-md);
background: var(--bg-menu);
backdrop-filter: var(--blur-large);
-webkit-backdrop-filter: var(--blur-large);
border: 1px solid var(--border-normal);
color: var(--text-primary);
font-size: 13px;
font-weight: 500;
animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
box-shadow: var(--shadow-lg);
pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }
/* ===== Form ===== */
.form-group {
margin-bottom: 14px;
}
.form-group label {
display: block;
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
}
.form-group textarea {
min-height: 80px;
resize: vertical;
}
/* ===== Code inline ===== */
code {
font-family: 'JetBrains Mono', 'SF Mono', monospace;
font-size: 12px;
background: var(--bg-tertiary);
padding: 2px 6px;
border-radius: var(--radius-xs);
color: var(--accent-on-container);
}
/* ===== Mobile Bottom Navigation Bar (HyperOS NavigationBar) ===== */
@media (max-width: 767px) {
.app-layout {
flex-direction: column;
}
.sidebar {
display: none;
}
.main-content {
padding-bottom: 64px;
}
.topbar {
height: 48px;
padding: 0 12px;
}
.topbar-logo-title.hidden {
opacity: 1;
pointer-events: auto;
}
.topbar-logo-title svg {
width: 24px;
height: 24px;
}
.topbar-title-text {
font-size: 15px;
}
.page {
padding: 12px 14px;
}
.status-grid {
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.status-card {
padding: 14px 16px;
}
.status-card-value {
font-size: 22px;
}
.theme-grid {
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
.scene-grid {
grid-template-columns: 1fr;
}
.dashboard-layout {
flex-direction: column;
}
.dashboard-sub-sidebar {
width: 100%;
flex-direction: row;
overflow-x: auto;
border-right: none;
border-bottom: 1px solid var(--divider);
padding: 6px;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.dashboard-sub-sidebar .category-item {
display: inline-flex;
flex-shrink: 0;
}
.modal {
min-width: auto;
max-width: 95vw;
margin: 12px;
padding: 20px;
border-radius: var(--radius-lg);
}
/* Mobile bottom nav */
.mobile-nav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 64px;
background: var(--bg-secondary);
border-top: 1px solid var(--divider);
z-index: 150;
backdrop-filter: var(--blur-large);
-webkit-backdrop-filter: var(--blur-large);
padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav .nav-item {
flex: 1;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 4px;
padding: 6px 4px;
font-size: 10px;
border-radius: 0;
min-width: 0;
}
.mobile-nav .nav-item svg {
width: 22px;
height: 22px;
}
.mobile-nav .nav-label {
font-size: 10px;
opacity: 1;
visibility: visible;
}
.debug-container > div:last-child {
grid-template-columns: 1fr 1fr;
}
.settings-row {
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.settings-control {
width: 100%;
}
.settings-control input[type="number"],
.settings-control select {
width: 100%;
}
}
/* ===== Tablet Layout ===== */
@media (min-width: 768px) and (max-width: 1023px) {
.sidebar {
width: var(--sidebar-collapsed-width);
}
.sidebar.expanded {
position: fixed;
width: var(--sidebar-width);
box-shadow: var(--shadow-lg);
z-index: 150;
}
.page {
padding: 16px 20px;
}
.status-grid {
grid-template-columns: repeat(3, 1fr);
}
.theme-grid {
grid-template-columns: repeat(3, 1fr);
}
}
/* ===== Desktop ===== */
@media (min-width: 1024px) {
.mobile-nav {
display: none;
}
.status-grid {
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.theme-grid {
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
}
/* ===== High-DPI / Retina ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.glass, .glass-light, .glass-card {
-webkit-font-smoothing: antialiased;
}
}
/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
+332
View File
@@ -0,0 +1,332 @@
/* Miuix CSS - HyperOS Design System for Web
* Color tokens match Xiaomi HyperOS design spec
* Reference: https://compose-miuix-ui.github.io/miuix/zh_CN/guide/colors
*/
:root {
--accent: #3482FF;
--accent-hover: #277AF7;
--danger: #E94634;
--success: #34C759;
--warning: #FF9F0A;
--radius-xs: 4px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
--radius-xxl: 24px;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
--shadow-md: 0 2px 8px rgba(0,0,0,0.10);
--shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
--transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
--transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
--transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
--sidebar-width: 260px;
--sidebar-collapsed-width: 60px;
--topbar-height: 56px;
--blur-small: blur(6px) saturate(140%);
--blur-medium: blur(12px) saturate(160%);
--blur-large: blur(20px) saturate(180%);
}
/* ===== Light Theme (HyperOS Light) ===== */
.theme-light {
--bg-primary: #FFFFFF;
--bg-secondary: #F7F7F7;
--bg-tertiary: #F0F0F0;
--bg-glass: rgba(255, 255, 255, 0.82);
--bg-glass-hover: rgba(255, 255, 255, 0.90);
--bg-glass-active: rgba(240, 240, 240, 0.88);
--bg-card: rgba(255, 255, 255, 0.78);
--bg-card-hover: rgba(255, 255, 255, 0.90);
--bg-input: rgba(248, 248, 248, 0.9);
--bg-input-focus: rgba(240, 245, 255, 0.95);
--bg-menu: rgba(255, 255, 255, 0.95);
--bg-tooltip: rgba(30, 30, 30, 0.92);
--text-primary: #000000;
--text-secondary: #8C93B0;
--text-tertiary: #959595;
--text-inverse: #FFFFFF;
--text-link: #3482FF;
--text-disabled: #B2B2B2;
--border-subtle: rgba(0, 0, 0, 0.04);
--border-normal: rgba(0, 0, 0, 0.08);
--border-strong: rgba(0, 0, 0, 0.12);
--outline: #D9D9D9;
--divider: #E0E0E0;
--accent-container: #EAF2FF;
--accent-on-container: #3482FF;
--error-container: #FDF6F4;
--error-on-container: #410002;
--scrollbar-bg: rgba(0, 0, 0, 0.04);
--scrollbar-thumb: rgba(0, 0, 0, 0.12);
}
/* ===== Dark Theme (HyperOS Dark) ===== */
.theme-dark {
--bg-primary: #000000;
--bg-secondary: #242424;
--bg-tertiary: #2D2D2D;
--bg-glass: rgba(36, 36, 36, 0.72);
--bg-glass-hover: rgba(45, 45, 45, 0.78);
--bg-glass-active: rgba(50, 50, 50, 0.82);
--bg-card: rgba(36, 36, 36, 0.65);
--bg-card-hover: rgba(45, 45, 45, 0.75);
--bg-input: rgba(30, 30, 30, 0.8);
--bg-input-focus: rgba(40, 40, 55, 0.9);
--bg-menu: rgba(36, 36, 36, 0.95);
--bg-tooltip: rgba(20, 20, 20, 0.92);
--text-primary: rgba(255, 255, 255, 0.90);
--text-secondary: rgba(255, 255, 255, 0.62);
--text-tertiary: rgba(255, 255, 255, 0.42);
--text-inverse: #000000;
--text-link: #277AF7;
--text-disabled: #666666;
--border-subtle: rgba(255, 255, 255, 0.04);
--border-normal: rgba(255, 255, 255, 0.08);
--border-strong: rgba(255, 255, 255, 0.12);
--outline: #404040;
--divider: #393939;
--accent-container: rgba(39, 122, 247, 0.12);
--accent-on-container: #277AF7;
--error-container: #2E0603;
--error-on-container: #FFDAD6;
--scrollbar-bg: rgba(255, 255, 255, 0.03);
--scrollbar-thumb: rgba(255, 255, 255, 0.10);
--window-dimming: rgba(0, 0, 0, 0.60);
}
/* ===== Global Reset ===== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
width: 100%; height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'MiSans', 'Microsoft YaHei', system-ui, sans-serif;
font-size: 14px;
line-height: 1.5;
color: var(--text-primary);
background: var(--bg-primary);
overflow: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transition: background var(--transition-normal), color var(--transition-normal);
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-tertiary);
}
a { color: var(--text-link); text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
/* ===== Inputs ===== */
input, select, textarea {
font-family: inherit;
font-size: 14px;
padding: 10px 14px;
border: 1px solid var(--outline);
border-radius: var(--radius-md);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
border-color: var(--accent);
background: var(--bg-input-focus);
box-shadow: 0 0 0 2px rgba(52, 130, 255, 0.15);
}
input::placeholder, textarea::placeholder {
color: var(--text-tertiary);
}
/* ===== Surface Components (HyperOS style) ===== */
.surface {
background: var(--bg-secondary);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
transition: background var(--transition-normal);
}
.surface-high {
background: var(--bg-tertiary);
border: 1px solid var(--border-normal);
border-radius: var(--radius-lg);
}
.surface-highest {
background: var(--bg-tertiary);
border: 1px solid var(--border-strong);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
}
/* ===== Glass Surface (blur effect) ===== */
.glass {
background: var(--bg-glass);
backdrop-filter: var(--blur-large);
-webkit-backdrop-filter: var(--blur-large);
border: 1px solid var(--border-subtle);
}
.glass-light {
background: var(--bg-glass);
backdrop-filter: var(--blur-medium);
-webkit-backdrop-filter: var(--blur-medium);
border: 1px solid var(--border-subtle);
}
.glass-card {
background: var(--bg-card);
backdrop-filter: var(--blur-medium);
-webkit-backdrop-filter: var(--blur-medium);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-lg);
transition: background var(--transition-normal), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.glass-card:hover {
background: var(--bg-card-hover);
box-shadow: var(--shadow-md);
}
.glass-card:active {
transform: scale(0.985);
transition: transform 0.1s ease;
}
/* ===== Buttons (HyperOS style) ===== */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 10px 20px;
border-radius: var(--radius-md);
font-size: 14px;
font-weight: 500;
letter-spacing: 0.2px;
transition: all var(--transition-fast);
white-space: nowrap;
position: relative;
overflow: hidden;
}
.btn::after {
content: '';
position: absolute;
inset: 0;
background: transparent;
transition: background var(--transition-fast);
border-radius: inherit;
}
.btn:hover::after {
background: rgba(255, 255, 255, 0.08);
}
.btn:active {
transform: scale(0.97);
}
.btn-primary {
background: var(--accent);
color: #FFFFFF;
box-shadow: 0 2px 6px rgba(52, 130, 255, 0.25);
}
.btn-primary:hover {
background: var(--accent-hover);
box-shadow: 0 4px 12px rgba(52, 130, 255, 0.35);
}
.btn-secondary {
background: var(--bg-glass);
color: var(--text-primary);
border: 1px solid var(--border-normal);
}
.btn-secondary:hover {
background: var(--bg-glass-hover);
border-color: var(--border-strong);
}
.btn-danger {
background: var(--danger);
color: #FFFFFF;
}
.btn-danger:hover {
opacity: 0.88;
}
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }
.icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px; height: 36px;
border-radius: var(--radius-md);
background: transparent;
color: var(--text-secondary);
transition: all var(--transition-fast);
}
.icon-btn:hover {
background: var(--bg-glass-hover);
color: var(--text-primary);
}
.icon-btn:active {
background: var(--bg-glass-active);
}
/* ===== Badge ===== */
.badge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
}
.badge-success { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.badge-warning { background: rgba(255, 159, 10, 0.15); color: var(--warning); }
.badge-danger { background: rgba(233, 70, 52, 0.15); color: var(--danger); }
.badge-info { background: var(--accent-container); color: var(--accent-on-container); }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }
/* ===== Divider ===== */
.divider {
height: 1px;
background: var(--divider);
margin: 0;
}
/* ===== Animations ===== */
.animated {
animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes pulse-ring {
0% { transform: scale(0.8); opacity: 1; }
100% { transform: scale(1.4); opacity: 0; }
}