Sleepyfx's picture
download
raw
12.1 kB
/* ═══════════════════════════════════════════════════════════════════
css/nav.css — SleepyFX Elite
Topbar (glass, fixed top) + Bottom navigation (glass, fixed bottom).
Safe-area insets applied. 44px touch targets enforced.
═══════════════════════════════════════════════════════════════════ */
/* ╔══════════════════════════════════════════════════════════════╗
║ TOPBAR ║
╚══════════════════════════════════════════════════════════════╝ */
.sfx-topbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: var(--sfx-z-sticky);
height: calc(var(--sfx-topbar-height) + var(--sfx-safe-area-top));
padding-top: var(--sfx-safe-area-top);
/* Glass surface */
background: var(--sfx-glass-bg);
backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
-webkit-backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
border-bottom: 1px solid var(--sfx-glass-border);
}
/* Inner row — always var(--sfx-topbar-height) tall */
.sfx-topbar__inner {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--sfx-topbar-height);
padding: 0 var(--sfx-sp-2);
gap: var(--sfx-sp-1);
}
/* Left cluster: wordmark / symbol */
.sfx-topbar__brand {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.sfx-topbar__logo {
font-family: var(--sfx-font-sans);
font-size: var(--sfx-fs-md);
font-weight: 700;
color: var(--sfx-cyan);
letter-spacing: -0.01em;
white-space: nowrap;
}
/* Active symbol chip */
.sfx-topbar__symbol {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
background: oklch(100% 0 0 / 0.07);
border: 1px solid var(--sfx-border-strong);
border-radius: var(--sfx-r-pill);
cursor: pointer;
min-height: var(--sfx-touch-target);
transition: background var(--sfx-dur-fast) var(--sfx-ease),
border-color var(--sfx-dur-fast) var(--sfx-ease);
}
.sfx-topbar__symbol:hover {
background: var(--sfx-bg-card-hover);
border-color: var(--sfx-cyan-border);
}
.sfx-topbar__ticker {
font-family: var(--sfx-font-mono);
font-size: var(--sfx-fs-sm);
font-weight: 600;
color: var(--sfx-text-primary);
font-variant-numeric: tabular-nums;
}
.sfx-topbar__price {
font-family: var(--sfx-font-mono);
font-size: var(--sfx-fs-sm);
font-weight: 500;
color: var(--sfx-text-secondary);
font-variant-numeric: tabular-nums;
}
/* Center cluster: time + session */
.sfx-topbar__center {
display: flex;
align-items: center;
justify-content: center;
gap: var(--sfx-sp-1);
flex: 1;
min-width: 0;
}
.sfx-topbar__time {
font-family: var(--sfx-font-mono);
font-size: var(--sfx-fs-sm);
font-weight: 500;
color: var(--sfx-text-secondary);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
/* Right cluster: status + actions */
.sfx-topbar__actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
/* Icon button in topbar */
.sfx-topbar__icon-btn {
display: flex;
align-items: center;
justify-content: center;
width: var(--sfx-touch-target);
height: var(--sfx-touch-target);
border-radius: var(--sfx-r-md);
color: var(--sfx-text-secondary);
background: transparent;
border: none;
cursor: pointer;
transition: background var(--sfx-dur-fast) var(--sfx-ease),
color var(--sfx-dur-fast) var(--sfx-ease);
-webkit-tap-highlight-color: transparent;
}
.sfx-topbar__icon-btn:hover {
background: oklch(100% 0 0 / 0.07);
color: var(--sfx-text-primary);
}
.sfx-topbar__icon-btn:active {
background: oklch(100% 0 0 / 0.12);
}
/* Backend status pill */
.sfx-topbar__status {
display: flex;
align-items: center;
gap: 5px;
padding: 3px 8px;
border-radius: var(--sfx-r-pill);
font-family: var(--sfx-font-sans);
font-size: var(--sfx-fs-xs);
font-weight: 600;
border: 1px solid transparent;
white-space: nowrap;
pointer-events: none;
}
.sfx-topbar__status--live {
background: var(--sfx-profit-bg);
color: var(--sfx-profit);
border-color: oklch(70% 0.16 145 / 0.25);
}
.sfx-topbar__status--offline {
background: var(--sfx-loss-bg);
color: var(--sfx-loss);
border-color: oklch(60% 0.20 15 / 0.25);
}
.sfx-topbar__status--connecting {
background: var(--sfx-warning-bg);
color: var(--sfx-warning);
border-color: oklch(72% 0.14 80 / 0.25);
}
/* ╔══════════════════════════════════════════════════════════════╗
║ BOTTOM NAVIGATION ║
╚══════════════════════════════════════════════════════════════╝ */
.sfx-navbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: var(--sfx-z-sticky);
height: calc(var(--sfx-nav-height) + var(--sfx-safe-area-bot));
padding-bottom: var(--sfx-safe-area-bot);
/* Glass surface */
background: var(--sfx-glass-bg);
backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
-webkit-backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
border-top: 1px solid var(--sfx-glass-border);
}
/* Nav item row */
.sfx-navbar__inner {
display: flex;
align-items: stretch;
justify-content: space-around;
height: var(--sfx-nav-height);
}
/* Individual nav item */
.sfx-nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 3px;
flex: 1;
min-height: var(--sfx-touch-target);
padding: 4px 0;
color: var(--sfx-text-muted);
text-decoration: none;
cursor: pointer;
border: none;
background: none;
transition: color var(--sfx-dur-fast) var(--sfx-ease);
-webkit-tap-highlight-color: transparent;
position: relative;
}
/* Active indicator — cyan top bar */
.sfx-nav-item::before {
content: '';
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%) scaleX(0);
width: 24px;
height: 2px;
background: var(--sfx-cyan);
border-radius: 0 0 var(--sfx-r-pill) var(--sfx-r-pill);
transition: transform var(--sfx-dur-fast) var(--sfx-ease);
}
.sfx-nav-item--active::before {
transform: translateX(-50%) scaleX(1);
}
.sfx-nav-item--active {
color: var(--sfx-cyan);
}
.sfx-nav-item:hover:not(.sfx-nav-item--active) {
color: var(--sfx-text-secondary);
}
/* Icon wrapper */
.sfx-nav-item__icon {
display: flex;
align-items: center;
width: 22px;
height: 22px;
flex-shrink: 0;
}
/* Label */
.sfx-nav-item__label {
font-family: var(--sfx-font-sans);
font-size: 9px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
line-height: 1;
}
/* Badge on nav item (unread count) */
.sfx-nav-item__badge {
position: absolute;
top: 4px;
right: calc(50% - 18px);
min-width: 16px;
height: 16px;
padding: 0 4px;
background: var(--sfx-loss);
color: var(--sfx-text-primary);
font-family: var(--sfx-font-mono);
font-size: 9px;
font-weight: 700;
border-radius: var(--sfx-r-pill);
display: flex;
align-items: center;
justify-content: center;
font-variant-numeric: tabular-nums;
pointer-events: none;
}
/* Tap feedback animation — applied by JS on touch */
.sfx-nav-item:active .sfx-nav-item__icon {
transform: scale(0.88);
transition: transform var(--sfx-dur-fast) var(--sfx-ease);
}
@media (prefers-reduced-motion: reduce) {
.sfx-nav-item:active .sfx-nav-item__icon {
transform: none;
}
.sfx-nav-item::before {
transition: none;
}
}
/* ╔══════════════════════════════════════════════════════════════╗
║ DESKTOP SIDEBAR NAV (≥1024px) ║
╚══════════════════════════════════════════════════════════════╝ */
@media (min-width: 1024px) {
/* Hide bottom nav on desktop */
.sfx-navbar {
display: none;
}
/* Desktop: sidebar nav appears left of content */
.sfx-sidebar {
position: fixed;
top: calc(var(--sfx-topbar-height) + var(--sfx-safe-area-top));
left: 0;
bottom: 0;
width: 72px;
z-index: var(--sfx-z-sticky);
display: flex;
flex-direction: column;
align-items: center;
padding: var(--sfx-sp-2) 0;
gap: 4px;
background: var(--sfx-glass-bg);
backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
-webkit-backdrop-filter: var(--sfx-glass-blur) var(--sfx-glass-sat);
border-right: 1px solid var(--sfx-glass-border);
}
/* Sidebar item — vertical stack */
.sfx-sidebar .sfx-nav-item {
width: 56px;
border-radius: var(--sfx-r-md);
flex: none;
padding: var(--sfx-sp-1) 0;
}
/* Sidebar active: left accent bar instead of top */
.sfx-sidebar .sfx-nav-item::before {
top: 50%;
left: 0;
transform: translateY(-50%) scaleY(0);
width: 2px;
height: 20px;
border-radius: 0 var(--sfx-r-pill) var(--sfx-r-pill) 0;
}
.sfx-sidebar .sfx-nav-item--active::before {
transform: translateY(-50%) scaleY(1);
}
/* Shift page content right to clear sidebar */
.sfx-page--has-sidebar {
padding-left: 72px;
}
/* Bottom nav off — no padding-bottom conflict */
.sfx-page--has-sidebar {
padding-bottom: var(--sfx-safe-area-bot);
}
}
/* ╔══════════════════════════════════════════════════════════════╗
║ ALERT BANNER (below topbar, above content) ║
╚══════════════════════════════════════════════════════════════╝ */
.sfx-alert-banner {
position: fixed;
top: calc(var(--sfx-topbar-height) + var(--sfx-safe-area-top));
left: 0;
right: 0;
z-index: calc(var(--sfx-z-sticky) - 1);
padding: 6px var(--sfx-sp-2);
display: flex;
align-items: center;
justify-content: center;
gap: var(--sfx-sp-1);
font-family: var(--sfx-font-sans);
font-size: var(--sfx-fs-sm);
font-weight: 600;
text-align: center;
transition: opacity var(--sfx-dur-fast) var(--sfx-ease),
transform var(--sfx-dur-fast) var(--sfx-ease);
}
.sfx-alert-banner--danger {
background: var(--sfx-loss-bg);
color: var(--sfx-loss);
border-bottom: 1px solid oklch(60% 0.20 15 / 0.35);
}
.sfx-alert-banner--warn {
background: var(--sfx-warning-bg);
color: var(--sfx-warning);
border-bottom: 1px solid oklch(72% 0.14 80 / 0.35);
}
.sfx-alert-banner--info {
background: var(--sfx-info-bg);
color: var(--sfx-info);
border-bottom: 1px solid oklch(62% 0.10 220 / 0.25);
}
.sfx-alert-banner[hidden] {
display: none;
}

Xet Storage Details

Size:
12.1 kB
·
Xet hash:
ee2981a6a5304f901a1f67d2d14a2383e2345522f85d385a53ff80ea9dcf999f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.