@font-face {
  font-family: "Jersey10-Regular";
  src: url('fonts/Jersey10-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body, html {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: "Jersey10-Regular", sans-serif;
  background-color: #06493bc2;
  color: white;
}

/* Layout Container */
.desktop {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  width: 100%;
  padding: 0;
  position: relative;
}

/* NAVBAR */
.navbar {
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  gap: 1rem;
}

.navbar .logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar .div {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: #06493bc2;
  flex-grow: 1;
}

/* MAIN DISPLAY */
.display {
  background-color: #74ad8add;
  border-radius: 15px;
  width: 95%;
  max-width: 1200px;
  padding: 2rem;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* CARDS GRID */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 200px;
}

.card h3 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  color: rgb(0, 0, 0);
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  font-size: medium;
  width: 100%;
  color: rgb(0, 0, 0);
}

.card-content img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.metric-value {
  font-size: 1.5rem;
  color: rgb(0, 0, 0);
}

/* ENVIRONMENT CARD */
.environment .metric-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
  gap: 1rem;
}

.environment .metric-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  min-width: 80px;
  font-size: medium;
  color: rgb(0, 0, 0);
}

.environment img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

/* AIR QUALITY CARD (FULL WIDTH) */
.air-quality-card {
  width: 100%;
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.air-quality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.air-quality-titles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#status-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin: 0;
}

#air-value {
  font-size: 1.2rem;
  color: rgb(0, 0, 0);
  margin: 0;
}

.air-quality-graph {
  width: 100%;
  height: 250px;
  background: white;
  border-radius: 8px;
  padding: 1rem;
}

.air-quality-footer {
  text-align: center;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 900px) {
  .display {
    padding: 1.5rem;
    width: 98%;
  }
  
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  
  .air-quality-graph {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .navbar .div {
    font-size: 1.8rem;
    width: 100%;
    text-align: center;
    order: 1;
  }
  
  .display {
    padding: 1rem;
    margin: 1rem auto;
    border-radius: 10px;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card {
    min-width: 100%;
    padding: 1.25rem 1rem;
  }
  
  .environment .metric-pair {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .air-quality-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .air-quality-graph {
    height: 200px;
  }
  
  #status-value {
    font-size: 1.6rem;
  }
  
  #air-value {
    font-size: 1.1rem;
  }
}

/* MINIMUM WIDTH PROTECTION */
@media (max-width: 320px) {
  html {
    font-size: 14px;
  }
  
  body {
    min-width: 320px;
    width: 320px;
    overflow-x: auto;
  }
  
  .desktop {
    min-width: 320px;
    width: 320px;
  }
  
  .display {
    transform-origin: top center;
    transform: scale(0.95);
    width: 320px;
  }
  
  .card, .air-quality-card {
    min-width: 300px;
  }
}