:root {
  --bg-dark: #0f172a;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --error: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Blobs for vibrant background */
.blob-cont {
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  top: 0;
  left: 0;
}
.blob {
  border-radius: 50%;
  filter: blur(80px);
  position: absolute;
  opacity: 0.5;
  animation: float 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.yellow { background: #eab308; width: 400px; height: 400px; top: -100px; left: -100px; }
.red { background: #3b82f6; width: 500px; height: 500px; bottom: -200px; right: -100px; animation-delay: -5s;}
.green { background: #8b5cf6; width: 300px; height: 300px; top: 40%; left: 30%; animation-delay: -2s; }

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-50px) scale(1.1); }
}

/* Glassmorphism Classes */
.glass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-download {
  background: var(--text-main);
  color: var(--bg-dark);
}
.btn-download:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* Landing Page */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(100vh - 80px);
  padding: 0 5%;
  gap: 4rem;
}
.hero-content {
  flex: 1;
  max-width: 600px;
}
.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero h1 span {
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.tilt {
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.3s;
}
.tilt:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Dashboard */
.dashboard-container {
  padding: 3rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.bulb-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.bulb-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
}

.bulb-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--text-muted);
  transition: background 0.3s;
}
.bulb-card.is-on::before {
  background: var(--success);
  box-shadow: 0 0 15px var(--success);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.bulb-name {
  font-size: 1.25rem;
  font-weight: 700;
}
.bulb-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Switch Toggle Component */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--glass-border);
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--success);
  border-color: var(--success);
}
input:checked + .slider:before {
  transform: translateX(26px);
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

.card-details p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}
.card-details span {
  color: var(--text-main);
  font-weight: 500;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 4rem;
  }
  .action-buttons {
    justify-content: center;
  }
}
