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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(147, 51, 234, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00ff88 0%, #00d4ff 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.2rem;
  color: #9ca3af;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.location-info {
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 400;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}


main {
  flex: 1;
}

.data-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.data-card {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 136, 0.1) inset;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.data-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.data-card:hover {
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 
    0 20px 50px rgba(0, 255, 136, 0.2),
    0 0 0 1px rgba(0, 255, 136, 0.2) inset;
  transform: translateY(-4px);
}

.data-card:hover::before {
  opacity: 1;
}

.temp-card {
  border-color: rgba(0, 255, 136, 0.3);
}

.temp-card:hover {
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 
    0 20px 50px rgba(0, 255, 136, 0.3),
    0 0 0 1px rgba(0, 255, 136, 0.3) inset;
}

.pressure-card {
  border-color: rgba(59, 130, 246, 0.3);
}

.pressure-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 
    0 20px 50px rgba(59, 130, 246, 0.3),
    0 0 0 1px rgba(59, 130, 246, 0.3) inset;
}

.humidity-card {
  border-color: rgba(147, 51, 234, 0.3);
}

.humidity-card:hover {
  border-color: rgba(147, 51, 234, 0.6);
  box-shadow: 
    0 20px 50px rgba(147, 51, 234, 0.3),
    0 0 0 1px rgba(147, 51, 234, 0.3) inset;
}

.data-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #9ca3af;
  margin-bottom: 1rem;
  font-weight: 600;
}

.data-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
  line-height: 1;
}

.temp-card .data-value {
  color: #00ff88;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.pressure-card .data-value {
  color: #3b82f6;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.humidity-card .data-value {
  color: #9333ea;
  text-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
}

.data-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.data-trend {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.charts-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.chart-section {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 136, 0.1) inset;
  transition: all 0.3s ease;
  width: 100%;
}

.chart-section:hover {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 
    0 20px 50px rgba(0, 255, 136, 0.15),
    0 0 0 1px rgba(0, 255, 136, 0.2) inset;
}

.chart-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #00ff88;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.chart-icon {
  font-size: 1.5rem;
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 400px;
  height: 450px;
  padding: 1rem 0;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 350px;
}

.stats-section {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 136, 0.1) inset;
}

.stats-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #00ff88;
  font-weight: 600;
}

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

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 1rem;
  font-weight: 600;
}

.stat-values {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-values span {
  color: #e5e7eb;
  font-size: 0.95rem;
}

.stat-values span span {
  color: #00ff88;
  font-weight: 600;
}

.sensors-section {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 136, 0.1) inset;
}

.sensors-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #00ff88;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.sensors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.sensor-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.sensor-card:hover {
  border-color: rgba(0, 255, 136, 0.4);
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.sensor-card h3 {
  color: #00ff88;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sensor-type {
  color: #9ca3af;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.sensor-specs {
  margin-bottom: 1rem;
}

.spec-item {
  color: #e5e7eb;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(0, 255, 136, 0.3);
}

.spec-item strong {
  color: #00ff88;
  margin-right: 0.5rem;
}

.sensor-note {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.sensors-info {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.sensors-info h3 {
  color: #00ff88;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.sensors-info p {
  color: #e5e7eb;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.sensors-info ul {
  margin-left: 1.5rem;
  color: #e5e7eb;
  line-height: 1.8;
}

.sensors-info li {
  margin-bottom: 0.5rem;
}

.sensors-info strong {
  color: #00ff88;
}

.api-section {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 136, 0.1) inset;
}

.api-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #00ff88;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  justify-content: space-between;
}

.api-toggle {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.api-toggle:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.5);
}

.api-docs {
  margin-top: 1.5rem;
}

.api-intro {
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #00ff88;
  border-radius: 8px;
}

.api-intro p {
  color: #e5e7eb;
  line-height: 1.6;
}

.api-endpoint {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.1);
}

.api-endpoint h3 {
  color: #00ff88;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.api-description {
  color: #9ca3af;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.api-details {
  margin-top: 1rem;
}

.api-field {
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.api-field strong {
  color: #00ff88;
  display: block;
  margin-bottom: 0.5rem;
}

.api-field ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.api-field li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.api-field code {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.api-example {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.api-example strong {
  color: #00ff88;
  display: block;
  margin-bottom: 0.5rem;
}

.api-example pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-top: 0.5rem;
}

.api-example code {
  color: #e5e7eb;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
  padding: 0;
}

.api-notes {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 12px;
}

.api-notes h3 {
  color: #00ff88;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.api-notes ul {
  margin-left: 1.5rem;
  color: #e5e7eb;
  line-height: 1.8;
}

.api-notes li {
  margin-bottom: 0.5rem;
}

.api-notes strong {
  color: #00ff88;
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 255, 136, 0.2);
  color: #6b7280;
  font-size: 0.9rem;
}

.footer-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.footer-powered {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 136, 0.05);
  font-size: 0.75rem;
  color: #4b5563;
  opacity: 0.7;
}

.footer-powered strong {
  color: #6b7280;
  font-weight: 500;
}

.footer-powered a {
  color: #6b7280;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-powered a:hover {
  color: #9ca3af;
  text-decoration: underline;
}

.loading {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
}

.empty {
  text-align: center;
  color: #6b7280;
  padding: 2rem;
}


@media (max-width: 640px) {
  header h1 {
    font-size: 2.5rem;
  }

  .data-value {
    font-size: 2.5rem;
  }

  .data-display {
    grid-template-columns: 1fr;
  }

  .chart-container {
    min-height: 300px;
    height: 350px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sensors-grid {
    grid-template-columns: 1fr;
  }

  .api-section h2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .api-example pre {
    font-size: 0.75rem;
  }
}

/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.data-card,
.chart-section,
.stats-section {
  animation: fadeIn 0.6s ease-out;
}
