:root {
  --primary: #2C5282;
  --primary-light: #3182CE;
  --secondary: #38B2AC;
  --secondary-light: #4FD1C5;
  --dark: #1A202C;
  --dark-blue: #002856;
  --light: #F7FAFC;
  --gray: #718096;
  --gray-light: #E2E8F0;
  --success: #38A169;
  --error: #E53E3E;
  --warning: #DD6B20;
  --info: #3182CE;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.generator-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
  padding: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.generator-header {
  background-color: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.generator-icon {
  font-size: 2.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.generator-title-container {
  flex: 1;
}

.generator-title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.generator-subtitle {
  font-size: 1rem;
  opacity: 0.8;
}

.generator-content {
  padding: 2rem;
}

.generator-description {
  margin-bottom: 2rem;
  color: var(--gray);
}

.generator-form {
  display: grid;
  gap: 2rem;
}

.form-section {
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-light);
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem;
  border: 1px solid var(--gray-light);
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
}

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-light);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--success);
}

input:checked + .slider:before {
  transform: translateX(30px);
}

.toggle-label {
  margin-left: 0.5rem;
  font-weight: 600;
}

.generator-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.action-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calculate-btn {
  background-color: var(--primary);
  color: white;
  border: none;
}

.calculate-btn:hover {
  background-color: var(--primary-light);
}

.reset-btn {
  background-color: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-light);
}

.reset-btn:hover {
  background-color: var(--gray-light);
}

.generator-results {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 5px;
  background-color: var(--light);
  display: none;
}

.generator-results.show {
  display: block;
}

.results-title {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-content {
  margin-bottom: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-light);
  padding: 0.7rem 0;
}

.result-label {
  font-weight: 600;
  color: var(--dark);
}

.result-value {
  color: var(--gray);
}

.results-highlight {
  background-color: var(--primary-light);
  color: white;
  padding: 1rem;
  border-radius: 5px;
  font-weight: 600;
  margin: 1.5rem 0;
}

.results-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.share-btn {
  background-color: var(--secondary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.3s ease;
}

.share-btn:hover {
  background-color: var(--secondary-light);
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

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

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.alert-info {
  background-color: rgba(49, 130, 206, 0.1);
  color: var(--info);
}

.alert-warning {
  background-color: rgba(221, 107, 32, 0.1);
  color: var(--warning);
}

.alert-success {
  background-color: rgba(56, 161, 105, 0.1);
  color: var(--success);
}

/* Spinner für Ladevorgänge */
#processingIndicator {
  background-color: rgba(44, 82, 130, 0.05);
  border: 1px solid rgba(44, 82, 130, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
  display: none;
}

#processingIndicator p {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(44, 82, 130, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

/* Verbesserte Modaldarstellung für Angebote */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background-color: var(--primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
}

.modal-form {
  display: grid;
  gap: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  background-color: var(--light);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-cancel {
  background-color: transparent;
  color: var(--gray);
  border: 1px solid var(--gray-light);
}

.modal-cancel:hover {
  background-color: var(--gray-light);
}

.modal-submit {
  background-color: var(--primary);
  color: white;
  border: none;
}

.modal-submit:hover {
  background-color: var(--primary-light);
}

/* Responsible Styles */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .results-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .share-btn {
    width: 100%;
    justify-content: center;
  }
  
  .generator-header {
    flex-direction: column;
    text-align: center;
  }
}

/* Energieeinsparungstabelle */
.savings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.savings-table th,
.savings-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.savings-table th {
  background-color: var(--primary);
  color: white;
}

.savings-table tr:nth-child(even) {
  background-color: var(--light);
}

.savings-table tr:hover {
  background-color: rgba(44, 82, 130, 0.05);
}

.savings-table .high-savings {
  background-color: rgba(56, 161, 105, 0.1);
}

.savings-table .medium-savings {
  background-color: rgba(236, 201, 75, 0.1);
}

.savings-table .low-savings {
  background-color: rgba(237, 137, 54, 0.1);
}

/* Responsive Tabellen */
@media (max-width: 600px) {
  .responsive-table {
    display: block;
    width: 100%;
  }
  
  .responsive-table thead {
    display: none;
  }
  
  .responsive-table tbody, 
  .responsive-table tr {
    display: block;
    width: 100%;
  }
  
  .responsive-table td,
  .responsive-table th {
    display: flex;
    width: 100%;
    text-align: right !important;
    padding: 8px !important;
    border-bottom: 1px solid #ddd;
  }
  
  .responsive-table td:before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
  
  .responsive-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
  }
}

/* Druckspezifische Styles */
@media print {
  body {
    margin: 0;
    padding: 15mm;
    font-size: 12pt;
  }
  
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  .generator-actions, .results-actions {
    display: none !important;
  }
}