* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, hsl(220, 13%, 9%), hsl(220, 13%, 12%));
  color: hsl(220, 9%, 95%);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  background: hsl(220, 13%, 12%);
  border-bottom: 1px solid hsl(220, 13%, 18%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, hsl(195, 100%, 60%), hsl(220, 100%, 70%));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(220, 13%, 9%);
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(220, 9%, 95%);
}

.logo-subtitle {
  font-size: 0.875rem;
  color: hsl(220, 9%, 65%);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-btn {
  background: none;
  border: none;
  color: hsl(220, 9%, 95%);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
  color: hsl(195, 100%, 60%);
  background: hsl(220, 13%, 15%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, hsl(195, 100%, 60%), hsl(220, 100%, 70%));
  color: hsl(220, 13%, 9%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  box-shadow: 0 0 20px hsl(195, 100%, 60%, 0.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: hsl(220, 9%, 95%);
  border: 1px solid hsl(220, 13%, 18%);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  background: hsl(220, 13%, 15%);
}

.btn-secondary {
  background: transparent;
  color: hsl(220, 9%, 95%);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  background: hsl(220, 13%, 15%);
}

.btn-icon {
  background: transparent;
  color: hsl(220, 9%, 95%);
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  background: hsl(220, 13%, 15%);
}

/* Main content */
.main {
  min-height: calc(100vh - 80px);
}

/* Hero section */
.hero {
  padding: 5rem 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: hsl(220, 9%, 95%);
}

.gradient-text {
  background: linear-gradient(135deg, hsl(195, 100%, 60%), hsl(220, 100%, 70%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.hero-description {
  font-size: 1.25rem;
  color: hsl(220, 9%, 65%);
  max-width: 32rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image {
  position: relative;
}

.image-glow {
  position: absolute;
  inset: -1rem;
  background: linear-gradient(135deg, hsl(195, 100%, 60%), hsl(220, 100%, 70%));
  opacity: 0.2;
  blur: 2rem;
  border-radius: 1.5rem;
}

.hero-img {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 32px hsl(195, 100%, 60%, 0.15);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stats-card {
  background: linear-gradient(145deg, hsl(220, 13%, 12%), hsl(220, 13%, 14%));
  border: 1px solid hsl(220, 13%, 18%);
  padding: 1.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card:hover {
  box-shadow: 0 8px 32px hsl(195, 100%, 60%, 0.15);
  transform: translateY(-2px);
}

.stats-title {
  font-size: 0.875rem;
  color: hsl(220, 9%, 65%);
  margin-bottom: 0.25rem;
}

.stats-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(220, 9%, 95%);
}

.stats-change {
  font-size: 0.875rem;
}

.stats-change.positive {
  color: #10b981;
}

.stats-change.negative {
  color: #ef4444;
}

.stats-change.neutral {
  color: hsl(220, 9%, 65%);
}

.stats-icon {
  padding: 0.75rem;
  background: hsl(195, 100%, 60%, 0.1);
  border-radius: 0.5rem;
  color: hsl(195, 100%, 60%);
}

/* Dashboard section */
.dashboard {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.centered {
  text-align: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(220, 9%, 95%);
  margin-bottom: 1rem;
}

.section-description {
  color: hsl(220, 9%, 65%);
}

.rooms-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.room-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(220, 9%, 95%);
  margin-bottom: 1.5rem;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Device Card */
.device-card {
  background: linear-gradient(145deg, hsl(220, 13%, 12%), hsl(220, 13%, 14%));
  border: 1px solid hsl(220, 13%, 18%);
  padding: 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.device-card:hover {
  box-shadow: 0 8px 32px hsl(195, 100%, 60%, 0.15);
  transform: translateY(-2px);
}

.device-card.active {
  border-color: hsl(195, 100%, 60%);
  box-shadow: 0 0 20px hsl(195, 100%, 60%, 0.3);
}

.device-card.offline {
  opacity: 0.6;
}

.device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.device-icon {
  width: 40px;
  height: 40px;
  background: hsl(195, 100%, 60%, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(195, 100%, 60%);
}

.device-card.active .device-icon {
  background: hsl(195, 100%, 60%);
  color: hsl(220, 13%, 9%);
}

.device-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.device-status.online {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.device-status.offline {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.device-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(220, 9%, 95%);
  margin-bottom: 0.5rem;
}

.device-value {
  color: hsl(220, 9%, 65%);
  font-size: 0.875rem;
}

/* System Status */
.system-status {
  padding: 4rem 0;
  background: hsl(220, 13%, 12%, 0.5);
  backdrop-filter: blur(10px);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: hsl(220, 13%, 12%);
  border: 1px solid hsl(220, 13%, 18%);
  color: hsl(220, 9%, 95%);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px hsl(220, 13%, 5%, 0.4);
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-description {
  font-size: 0.875rem;
  color: hsl(220, 9%, 65%);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .devices-grid {
    grid-template-columns: 1fr;
  }
  
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
}