Files
smart-home-tablet/app/globals.css
Cosmo 088cd35ea6
All checks were successful
Deploy to Coolify / deploy (push) Successful in 5s
feat: new layout, rooms row, fix weather+HA, fix BottomNav overflow
- Remove TasksCard and SavingsCard from home tab
- New grid layout: lights+thermostat row 1, purifier+weather row 2
- Add RoomsRow component with room navigation
- Fix HA entity mapping: fan.zhimi_rmb1_9528_air_purifier → fan.air_purifier
- Add real entity aliases for HA route
- Fix weather route: add timeout, better error handling
- Fix BottomNav: use 100dvh + flex-shrink-0
- TopBar: accept isDemo prop, show Demo badge in header
- WeatherCard: compact prop, better loading/error states
- globals.css: add no-scrollbar utility
2026-04-22 10:33:20 +00:00

238 lines
4.9 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--bg: #090912;
--card-bg: rgba(255, 255, 255, 0.04);
--card-border: rgba(255, 255, 255, 0.08);
--text-primary: rgba(255, 255, 255, 0.95);
--text-secondary: rgba(255, 255, 255, 0.45);
--accent: #6366f1;
--accent-2: #8b5cf6;
}
.light {
--bg: #f0f0f8;
--card-bg: rgba(255, 255, 255, 0.75);
--card-border: rgba(0, 0, 0, 0.07);
--text-primary: rgba(15, 15, 30, 0.95);
--text-secondary: rgba(15, 15, 30, 0.45);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
}
body {
background-color: var(--bg);
color: var(--text-primary);
font-family: 'Inter', system-ui, sans-serif;
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Glassmorphism card */
.glass-card {
background: var(--card-bg);
border: 1px solid var(--card-border);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 24px;
transition: background 0.3s ease, border-color 0.3s ease;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 4px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(99, 102, 241, 0.35);
border-radius: 2px;
}
/* Big toggle switch (60×32) */
.toggle-track {
position: relative;
width: 60px;
height: 32px;
border-radius: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
flex-shrink: 0;
}
.toggle-thumb {
position: absolute;
top: 3px;
left: 3px;
width: 26px;
height: 26px;
border-radius: 50%;
background: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toggle-on .toggle-thumb {
transform: translateX(28px);
}
/* Custom range slider */
input[type='range'] {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 6px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.1);
outline: none;
cursor: pointer;
}
.light input[type='range'] {
background: rgba(0, 0, 0, 0.1);
}
input[type='range']::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #f59e0b;
cursor: pointer;
box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
transition: transform 0.15s ease;
}
input[type='range']::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
input[type='range']::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 50%;
background: #f59e0b;
cursor: pointer;
border: none;
box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}
/* Ambient orbs */
.orb {
position: fixed;
border-radius: 50%;
filter: blur(80px);
pointer-events: none;
z-index: 0;
}
/* No select on interactive elements in tablet mode */
.no-select {
-webkit-user-select: none;
user-select: none;
}
/* Progress bar */
.progress-bar {
height: 10px;
border-radius: 5px;
background: rgba(255, 255, 255, 0.07);
overflow: hidden;
}
.light .progress-bar {
background: rgba(0, 0, 0, 0.07);
}
.progress-fill {
height: 100%;
border-radius: 5px;
background: linear-gradient(90deg, #6366f1, #8b5cf6);
transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Glow effects */
.glow-amber {
box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
}
.glow-blue {
box-shadow: 0 0 24px rgba(59, 130, 246, 0.4);
}
.glow-green {
box-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
}
.glow-purple {
box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}
/* Modal backdrop */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.65);
backdrop-filter: blur(10px);
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
}
/* Spin animation for air purifier */
@keyframes spin-slow {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.spin-slow {
animation: spin-slow 4s linear infinite;
}
/* Orb animations */
@keyframes orbMove1 {
0%, 100% { transform: translate(0, 0) scale(1); }
33% { transform: translate(40px, -30px) scale(1.05); }
66% { transform: translate(-20px, 20px) scale(0.97); }
}
@keyframes orbMove2 {
0%, 100% { transform: translate(0, 0) scale(1); }
33% { transform: translate(-50px, 30px) scale(1.08); }
66% { transform: translate(30px, -20px) scale(0.95); }
}
@keyframes orbMove3 {
0%, 100% { transform: translate(0, 0) scale(1); }
50% { transform: translate(20px, 40px) scale(1.04); }
}
@keyframes orbMove4 {
0%, 100% { transform: translate(0, 0) scale(1); }
50% { transform: translate(-30px, -20px) scale(1.06); }
}
/* Hide scrollbar but allow scrolling */
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}