* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #eef6ff, #dceeff);
  color: #172033;
}

.container {
  width: min(1000px, 92%);
  margin: 0 auto;
  padding: 35px 0;
}

.hero {
  text-align: center;
  margin-bottom: 25px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero p {
  margin: 0;
  color: #61708a;
  font-size: 1.05rem;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dce3ee;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(35, 55, 80, 0.08);
}

.card h2 {
  margin-top: 0;
  text-align: center;
}

.temperature-card {
  text-align: center;
}

#temperature {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 800;
  margin: 20px 0 10px;
}

#connection {
  color: #8a94a6;
  margin: 0;
}

#connection.connected {
  color: #198754;
}

.indicators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.indicator {
  padding: 20px;
  border-radius: 14px;
  background: #f5f7fa;
  text-align: center;
  border: 2px solid transparent;
  transition: 0.2s ease;
}

.indicator.active {
  transform: translateY(-3px);
  border-color: #26364d;
}

.indicator strong,
.indicator small {
  display: block;
}

.indicator small {
  margin-top: 5px;
  color: #697586;
}

.led {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #b9c0ca;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.cold .led { background: #3aa7ff; }
.normal .led { background: #35b96b; }
.hot .led { background: #ff5b5b; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.stats div {
  padding: 18px;
  background: #f5f7fa;
  border-radius: 12px;
  text-align: center;
}

.stats span,
.stats strong {
  display: block;
}

.stats strong {
  font-size: 1.8rem;
  margin-top: 7px;
}

button {
  display: block;
  margin: auto;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: #26364d;
  color: white;
  cursor: pointer;
  font-size: 1rem;
}

button:hover {
  opacity: 0.88;
}

.chart {
  height: 220px;
  padding: 20px;
  border-radius: 14px;
  background:
    linear-gradient(to bottom, transparent 24%, #e8edf4 25%, transparent 26%),
    linear-gradient(to bottom, transparent 49%, #e8edf4 50%, transparent 51%),
    linear-gradient(to bottom, transparent 74%, #e8edf4 75%, transparent 76%),
    #f7f9fc;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#chartValues {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

#chartValues span {
  flex: 1;
  min-width: 3px;
  max-width: 18px;
  border-radius: 4px 4px 0 0;
  background: #4f86c6;
}

footer {
  text-align: center;
  color: #68758a;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 10px;
}

code {
  background: #eef1f5;
  padding: 2px 5px;
  border-radius: 4px;
}

@media (max-width: 650px) {
  .indicators,
  .stats {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }
}
