* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #222;
}

.navbar {
  width: 100%;
  background: #eeeeee;
  padding: 15px;
  display: flex;
  justify-content: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-button {
  background: #777777;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-button:hover,
.nav-button.active {
  background: #555555;
  transform: translateY(-1px);
}

.page-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.hero-section h1 {
  margin-bottom: 10px;
}

.hero-section p {
  margin-top: 0;
  color: #555555;
}

.status-panel {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.status-panel h2 {
  margin: 0 0 8px;
}

.status-panel p {
  margin: 0;
  color: #555555;
}

.device-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.device {
  background: #ffffff;
  border: 3px solid #999999;
  border-radius: 12px;
  padding: 18px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease;
}

.device:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.device-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.device-name {
  font-weight: bold;
  color: #222222;
}

.device-status {
  font-size: 0.9rem;
  color: #666666;
}

.device.online {
  border-color: #1f8f3a;
  background: #e9f8ee;
}

.device.online .device-status {
  color: #1f8f3a;
  font-weight: bold;
}

.device.offline {
  border-color: #c62828;
  background: #fdecec;
}

.device.offline .device-status {
  color: #c62828;
  font-weight: bold;
}

.content {
  max-width: 800px;
  margin: 60px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
}

.content h1,
.content h2 {
  margin-top: 0;
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .nav-button {
    width: 90%;
    text-align: center;
  }

  .page-wrapper {
    padding: 25px 15px;
  }
}
