/* Modernes Design */
body, h1, h2, p, form, input, select, button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f2efe9;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.main-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
}

.container {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
}

#waermebedarf-container {
  flex: 2;
  max-width: 650px;
}

.side-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  align-items: center;
}

#heizkosten-container, #regelung-container {
  flex: 1;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: #00baf2;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #00baf2;
}

.form-group input[type="range"] {
  width: 100%;
  margin-top: 10px;
  background: #3fb498;
}

.form-group select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: 1px solid #d1d1d1;
  border-radius: 5px;
  background-color: #f9f9f9;
  font-size: 16px;
}

.form-group span {
  display: inline-block;
  min-width: 50px;
  text-align: right;
  font-weight: normal;
  color: #333;
}

button {
  display: block;
  width: 100%;
  padding: 15px;
  background-color: #00baf2;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #009ec3;
}

.button-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.button-group button {
  width: 50%;
}

.result-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.result-item {
  flex: 1;
  padding: 15px;
  background-color: #00baf2;
  color: #fff;
  border: none;
  border-radius: 5px;
  text-align: center;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ergebnis {
  margin-top: 30px;
  text-align: center;
}

.inline-group {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.inline-group .form-group {
  flex: 1;
}

.inline-group .form-group input[type="range"] {
  width: 90%;
}

.inline-group .form-group select {
  width: 100%;
}

/* Media Queries for responsiveness */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
    align-items: center;
  }

  #waermebedarf-container, #heizkosten-container, #regelung-container {
    max-width: 100%;
  }

  .side-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #heizkosten-container, #regelung-container {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .side-container {
    flex-direction: column;
    align-items: center;
  }

  #heizkosten-container, #regelung-container {
    max-width: 100%;
  }

  .inline-group {
    flex-direction: column;
  }

  .inline-group .form-group input[type="range"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  button {
    font-size: 16px;
  }

  .result-item {
    font-size: 16px;
  }

  h1 {
    font-size: 20px;
  }
}
