:root {
  --bg-dark: #0f172a;
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --accent-blue: #3b82f6;
  --accent-yellow: #eab308;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Dynamic Background Orbs */
.background-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.4);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(34, 197, 94, 0.3);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(234, 179, 8, 0.3);
  top: 40%;
  left: 40%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 100px) scale(1.2); }
  100% { transform: translate(-50px, -50px) scale(0.9); }
}

/* Dashboard Container */
.dashboard-container {
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.logo-area h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo-area .accent {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ef4444; /* Default red */
  box-shadow: 0 0 10px #ef4444;
  transition: all 0.3s ease;
}

.dot.connected {
  background-color: var(--accent-green);
  box-shadow: 0 0 15px var(--accent-green);
}

.status-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Battery Visual in Header */
.battery-visual {
  display: flex;
  align-items: center;
  gap: 10px;
}

.battery-body {
  width: 80px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  padding: 3px;
  position: relative;
}

.battery-cap {
  width: 6px;
  height: 14px;
  background-color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}

.battery-level {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.battery-text {
  font-size: 1.5rem;
  font-weight: 800;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* Metric Card */
.metric-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-icon {
  padding: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.text-yellow { color: var(--accent-yellow); }
.text-blue { color: var(--accent-blue); }
.text-orange { color: var(--accent-orange); }
.text-green { color: var(--accent-green); }

.card-value-container {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.card-value-container .value {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.card-value-container .unit {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Progress Bars */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-top: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.voltage-bar { background: linear-gradient(90deg, #eab308, #f59e0b); }
.current-bar { background: linear-gradient(90deg, #3b82f6, #2563eb); }

.capacity-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Footer */
.dashboard-footer {
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .logo-area h1 {
    font-size: 2rem;
  }
  .card-value-container .value {
    font-size: 2.8rem;
  }
}
