
.sticky-bar {
  position: sticky;
  top: 0;              
  background: #f8f9fa;     
  padding: 10px;
}


.flowchart-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  font-weight: 600;
  color: #1976d2;
  letter-spacing: 0.5px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding-bottom: 2px;
}

.live-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc40;
  margin-right: 8px;
  box-shadow: 0 0 6px #2ecc40;
  animation: live-blink 1s infinite alternate;
}

@keyframes live-blink {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}

.lang-toggle {
  background: #e3e3e3;
  color: #1976d2;
  border: 2px solid #1976d2;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(25,118,210,0.08);
  transition: background 0.2s, color 0.2s;
  outline: none;
}
.arrow-toggle {
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
.arrow-line {
  position: absolute;
  width: 28px;
  height: 4px;
  background: #1976d2;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(.4,2,.3,1);
  left: 6px;
}
.arrow-line:nth-child(1) {
  top: 14px;
}
.arrow-line:nth-child(2) {
  top: 22px;
}
.arrow-toggle:not(.open) .arrow-line:nth-child(1) {
  transform: rotate(-45deg) translate(0, 0);
}
.arrow-toggle:not(.open) .arrow-line:nth-child(2) {
  transform: rotate(45deg) translate(0, 0);
}
.arrow-toggle.open .arrow-line:nth-child(1) {
  transform: rotate(45deg) translate(0, 0);
}
.arrow-toggle.open .arrow-line:nth-child(2) {
  transform: rotate(-45deg) translate(0, 0);
}
.lang-on {
  background: #1976d2;
  color: #fff;
  border: 2px solid #1976d2;
}
.lang-off {
  background: #e3e3e3;
  color: #1976d2;
  border: 2px solid #1976d2;
}

.flowchart {
  position: fixed;
  z-index: 99999 !important;
  background: #ffffff;
  border: 2px solid #1976d2;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 6px 18px rgba(25,118,210,0.18);
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: 100%; 
  min-width: 0;
  max-width: 1200px;
}

#flowchart-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 4px 6px;
  transition: transform 160ms ease, background 160ms ease;
}
#flowchart-toggle[aria-expanded="true"] {
  background: #155aab;
}




.flowchart.expanded {
  transition: padding-bottom 240ms ease;
  padding-bottom: 202px; 
  z-index: 100001 !important;
}


.flowchart.expanded .flow-subrow {
  display: block !important;
}

.flow-subrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 140px; 
  width: 100%;
  display: none;
  pointer-events: none; 
}
.flow-subitem {
  position: absolute;
  transform: translateX(-80%);
  pointer-events: auto; 
}
.flow-subitem img { display:block; }


#flow-ev-block img, #flow-h2-block img, #ev-charge-icon, #h2-charge-icon {
  width: 54px !important;
  height: auto !important;
}


#ev-left-battery-icon, #h2-left-storage-icon {
  width: 54px !important;
  height: auto !important;
}


#electrolyzer-to-ev-static-arrow img,
#fuelcell-to-h2-static-arrow img {
  width: 60% !important; 
  height: auto !important;
}


#electrolyzer-to-ev-animated-arrow,
#fuelcell-to-h2-animated-arrow {
  width: auto !important;
  height: 100px !important; 
  max-height: 100px !important;
  object-fit: contain !important;
  transform: rotate(-90deg) !important;
  transform-origin: center center !important;
}


.flow-subitem div > div {
  font-size: 18px !important; 
  margin-top: 4px !important;
  text-align: center !important;
}

/* Embed-mode: when the app runs inside a transparent iframe, remove page background
   so only the app chrome renders inside the host page. Use the .embed-mode class on
   html/body to opt into this behavior. */
html.embed-mode, body.embed-mode {
  background-image: none !important;
  background-color: transparent !important;
  background: transparent !important;
}



#flowchart-panel {
  z-index: 100000 !important;
  position: fixed;
}

.dashboard-modal {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(25,118,210,0.18);
  padding: 32px 24px;
  z-index: 2000;
  margin-left: 5px;
  min-width: 320px;
  max-width: 90vw;
  width: 600px;
  margin-right: 32px;
}

.how-it-works-panel ul li {
  margin-bottom: 5px;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    background-color: #232324;
    background-image: url("https://protonik-gmbh.com/wp-content/uploads/2024/02/Protonik_Logo_weiss-hoch-web1000.png");
    background-repeat: no-repeat; 
    background-position: center;   
    background-attachment: fixed;
    background-size: 40%; 
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: #212427;
}

#graph-selector2 {
    border: 50%;
  }



.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    width: 100%;
}


.dropdown-container{
    display: none;

}
.usecase-container{
    display:block;
}
#myChart, #myChart2, #batteryChart, #hydrogenChart {
    width: 100%;
    max-width: 1165px;
    height: auto;
    max-height: 300px;
    margin-bottom: 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.ema-legend {
    color: rgb(255, 0, 0);
    font-weight: bold;
}

.chart-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.ema-config {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    flex-wrap: wrap;
}



.ema-config label {
    font-weight: 500;
    color: #333;
}

.ema-config input[type="range"] {
    width: 40px;
    margin: 0 5px;
}

.ema-config span {
    font-weight: bold;
    color: #007bff;
    min-width: 20px;
}

.ema-config button:hover {
    background-color: #0056b3;
}

.ema-info {
    width: 100%;
    margin-top: 8px;
    color: #666;
    font-style: italic;
}

.ema-info small {
    line-height: 1.4;
}

.data-limitation {
    width: 100%;
    margin-top: 8px;
    color: #d63384;
    font-style: italic;
    border-left: 3px solid #d63384;
    padding-left: 8px;
}

.data-limitation small {
    line-height: 1.4;
}

.peak-off-peak-legend {
    width: 100%;
    margin-top: 8px;
    color: #333;
    font-style: italic;
    border-left: 3px solid #28a745;
    padding-left: 8px;
}

.peak-off-peak-legend small {
    line-height: 1.4;
}

.indicator-controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.indicator-controls h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.indicator-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.indicator-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 5px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.indicator-checkbox:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.indicator-checkbox input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.info-button {
    background: none;
    border: none;
    color: #007bff;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.7;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-button:hover {
    opacity: 1;
    background-color: rgba(0, 123, 255, 0.1);
}

.info-button:active {
    background-color: rgba(0, 123, 255, 0.2);
    transform: scale(0.95);
}



.checkbox-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    background-color: #f8f9fa;
  }
  
  .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: #f8f9fa;
  }
  
  .checkbox-group input {
    margin: 5px;
    background-color: #f8f9fa;
  }


h1 {
    text-align: center;
    color: #1b1b1b;
    margin-top: 40px;
    font-size: 36px;
}

h2 {
    text-align: center;
    color: #222222;
    margin-bottom: 20px;
    font-size: 24px;
}


.checkbox-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.checkbox-container label {
    font-size: 16px;
    margin-right: 10px;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 5px;
}


.realism-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 10px;
}

.realism-row input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.realism-row label {
    font-size: 16px;
    color: #212427;
    cursor: pointer;
    margin: 0;
}


footer {
    background-color: #343a40;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}




.chart-container .chart-legend {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    border-radius: 30px;
}

.chart-container .chart-legend div {
    margin: 0 10px;
}

.chart-container .chart-legend div span {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.chart-container .chart-legend div label {
    font-size: 16px;
    color: #495057;
}

#price-container, #co2-container {
    z-index: 1;
    margin-top: 240px;
    margin-left: 20px;
    position: absolute;
    min-height: 50px;
    width: 100%;
    top: 0;
    left: 0;
    overflow: hidden; 
    transition: transform 3s ease-in-out; 
}


#price-container {
    transform: translateX(0); 
}

#co2-container {
    transform: translateX(100%); 
}




.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: green;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    display: none; 
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
    z-index: 1000;
}



.use-case{
    display: block;
    background-color: rgb(243, 243, 243);
    color: rgb(0, 0, 0);
    border: 1px solid #000000;
    padding: 10px 21px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}
#city-select{
    background-color: rgb(243, 243, 243);
    color: rgb(0, 0, 0);
    border: 1px solid #000000;
    padding: 10px 21px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.button {
    background-color: #111111;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}


.button:hover {
    background-color: #777a78;
}

.start:hover {
    background-color: #f0f0f0;
}

.regular {
    background-color: rgb(221, 221, 221); 
    color: rgb(0, 0, 0);

}

.buy {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sell {
    background-color: #ff3b19; 
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.start {
    background-color: #cccccc;
    color: rgb(0, 0, 0);
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="range"] {
    display: inline;
    width: 50%;
    margin-bottom: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
    transform: scale(1.3);
}

input[type="range"]::-moz-range-thumb {
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
input[type="range"]:active::-moz-range-thumb,
input[type="range"]:focus::-moz-range-thumb {
    transform: scale(1.3);
}

input[type="range"]::-ms-thumb {
    transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}
input[type="range"]:active::-ms-thumb,
input[type="range"]:focus::-ms-thumb {
    transform: scale(1.3);
}

label {
    display: block; 
    margin-bottom: 5px;
}

.eco-system-container {
    padding: 2px;
    margin: 10px;
    display: flex;
    justify-content: space-between; 
    gap: 20px; 
    margin-top: 40px;
}

.eco-item {
    flex: 1; 
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.eco-item h3 {
    text-align: center;
    color: #2c3e50;
}



.flow-item {
    display: flex;
    margin-top: 10px;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.flow-item img {
    width: 54px; 
    height: auto;
    margin-top: 50px;
}



#corner-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 100;
    max-height: 90vh;
}


#toggle-widget, #toggle-widget-expanded.toggle-widget {
    width: 30px;
    height: 30px;
    background-color: #000000;
    color: white;
    margin: 3px;
    font-size: 18px;
    text-align: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;

}


#corner-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  height: 100%;
  min-height: 0;
  transition: height 0.3s ease;
  overflow-y: auto;
  box-sizing: border-box;
}


#code-minimized {
    background-color: #f8f9fa;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 3010;
}

#code-expanded {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-width: 1200px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  max-height: 660px;
  height: 100%;
  display: flex;
  flex-direction: column;
}


#battery-gauge-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #00ff00;
    border-radius: 50%;
    border: 2px solid #000000;
}
#battery-gauge-container {
    position: relative;
    width: 100px; 
    height: 100px;
    border-radius: 50%; 
    background-color: #51ff00;
    border: 2px solid #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#battery-gauge-level {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#battery-gauge-image {
    position: absolute;
    width: 50%;
    height: 50%;
    padding-top: 18%;
    padding-left: 24%;
    object-fit: contain;
    z-index: 2;
}

#battery-gauge-label {
    position: absolute;
    bottom: 10px;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    color: #333;
    text-align: center;
    z-index: 3;
}

#battery-gauge-percentage {
    display: inline-block;
}

#hydrogen-gauge-container {
    position: relative;
    width: 100px; 
    height: 100px;
    border-radius: 50%; 
    background-color: #51ff00;
    border: 2px solid #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#hydrogen-gauge-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #00ff00;
    border-radius: 50%;
    border: 2px solid #000000;
}

#hydrogen-gauge-level {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#hydrogen-gauge-image {
    position: absolute;
    width: 50%;
    height: 50%;
    padding-top: 18%;
    padding-left: 30%;
    object-fit: contain;
    z-index: 2;
}

#hydrogen-gauge-label {
    position: absolute;
    bottom: 10px;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    color: #333;
    text-align: center;
    z-index: 3;
}

#hydrogen-gauge-percentage {
    display: inline-block;
}

.gauge-container {
    display: flex;
    justify-content: center;
    gap: 20px; 
    margin-top: 20px;
}

.gauge-text {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    height: auto;
    overflow-y: auto;
}

#corner-content {
    background-color: #f8f9fa;

}




#pv-charging-arrow,
#electrolyzer-charging-arrow,
#fuelcell-charging-arrow,
#electrolyzer-output-charging-arrow,
#hydrogen-to-fuelcell-charging-arrow,
#fuelcell-to-charging-charging-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#pv-static-arrow,
#electrolyzer-static-arrow,
#fuelcell-static-arrow,
#electrolyzer-output-static-arrow,
#hydrogen-to-fuelcell-static-arrow,
#fuelcell-to-charging-static-arrow {
    width: 60%;
    height: auto;
}

#pv-animated-arrow,
#electrolyzer-animated-arrow,
#fuelcell-animated-arrow,
#electrolyzer-output-animated-arrow,
#hydrogen-to-fuelcell-animated-arrow,
#fuelcell-to-charging-animated-arrow {
    height: 100px;
    transform: rotate(-90deg);
}

.wave-loader1 {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    z-index: 1;
}
    
    .wave-loader1:before{
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: #7bff5b;
        border-radius: 45%;
        top: var(--before-top, -15%);
        animation: wave 4s linear infinite;
    }
    
    
    .wave-loader1:after{
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        border-radius: 45%;
        top: var(--after-top, -15%);
        animation: wave 6s linear infinite;
        animation-delay: 2s;
    }

    .wave-loader2 {
        width: 100%;
        height: 100%;
        position: absolute;
        bottom: 0;
        z-index: 1;
    }
        
        .wave-loader2:before{
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #7bff5b;
            border-radius: 45%;
            top: var(--before-top, -15%);
            animation: wave 4s linear infinite;
        }
        
        
        .wave-loader2:after{
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #ffffff;
            border-radius: 45%;
            top: var(--after-top, -15%);
            animation: wave 6s linear infinite;
            animation-delay: 2s;
        }
    
    @keyframes wave{
        0%{
            transform: translateY(0);
        }
        50%{
            transform: translateY(15px);
        }
        100%{
            transform: translateY(360deg);
        }   
    }

    .mode-container {
        display: flex;
        flex-direction: column;
        gap: 0px;

      }
      
      .mode-container h3 {
        margin-right: 5px; 
        margin-bottom: -10px;
      }


.trade-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.trade-input {
  width: 80px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-left: 8px;
  font-size: 1em;
  background: #f9f9f9;
  transition: border 0.2s;
}
.trade-input:focus {
  border: 1.5px solid #007bff;
  outline: none;
  background: #fff;
}
.trade-label {
  margin-left: 14px;
  font-size: 0.98em;
  color: #333;
  font-weight: 500;
}
.trade-row button {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.trade-increment {
  margin-left: 4px;
  padding: 5px 12px;
  font-size: 1em;
  border: none;
  border-radius: 5px;
  background: linear-gradient(90deg, #4f8cff 0%, #1e62d0 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30, 98, 208, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.trade-increment:hover {
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 2px 8px rgba(30, 98, 208, 0.16);
  transform: translateY(-2px) scale(1.05);
}
.trade-reset {
  margin-left: 4px;
  padding: 5px 10px;
  font-size: 1em;
  border: 2px solid #444;
  border-radius: 5px;
  background: #444;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s, border 0.18s;
}
.trade-reset:hover {
  background: #222;
  border: 2px solid #111;
  color: #fff;
  transform: translateY(-2px) scale(1.08);
}
.trade-market-price {
  margin-left: 16px;
  font-size: 0.97em;
  color: #444;
  background: #eef3fa;
  border-radius: 5px;
  padding: 3px 10px;
  font-weight: 500;
}
.start-btn {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  margin-bottom: 5px;
  background: linear-gradient(90deg, #43a047 0%, #388e3c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(67, 160, 71, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.start-btn:hover {
  background: linear-gradient(90deg, #2e7d32 0%, #1b5e20 100%);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.16);
  transform: translateY(-2px) scale(1.05);
}
.stop-btn {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #e53935 0%, #b71c1c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(229, 57, 53, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.stop-btn:hover {
  background: linear-gradient(90deg, #b71c1c 0%, #7f0000 100%);
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.16);
  transform: translateY(-2px) scale(1.05);
}
.reset-btn {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(255, 152, 0, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.reset-btn:hover {
  background: linear-gradient(90deg, #f57c00 0%, #e65100 100%);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.16);
  transform: translateY(-2px) scale(1.05);
}
.button.buy, .buy {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #43a047 0%, #388e3c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(67, 160, 71, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.button.buy:hover, .buy:hover {
  background: linear-gradient(90deg, #2e7d32 0%, #1b5e20 100%);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.16);
  transform: translateY(-2px) scale(1.05);
}
.button.sell, .sell {
  min-width: 70px;
  font-size: 1em;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #e53935 0%, #b71c1c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(229, 57, 53, 0.08);
  font-weight: 600;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.button.sell:hover, .sell:hover {
  background: linear-gradient(90deg, #b71c1c 0%, #7f0000 100%);
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.16);
  transform: translateY(-2px) scale(1.05);
}
#simulation-state {
  margin-top: 0.5em;
  margin-bottom: 0.2em;
  font-size: 1.08em;
  font-weight: 500;
  color: #1e40af;
}
.mode-container {
  margin-bottom: 0.5em;
}

.flashing-border {
  animation: flashing-border-red 1s infinite alternate;
  box-shadow: 0 0 10px 3px #e5393577;
}
@keyframes flashing-border-red {
  0% { box-shadow: 0 0 10px 3px #e5393577; }
  100% { box-shadow: 0 0 18px 6px #ff174499; }
}

.flashing-border-green {
  animation: flashing-border-green 1s infinite alternate;
  box-shadow: 0 0 10px 3px #43a04777;
}
@keyframes flashing-border-green {
  0% { box-shadow: 0 0 10px 3px #43a04777; }
  100% { box-shadow: 0 0 18px 6px #00e67699; }
}



.money-highlight {
  display: inline-block;
  font-size: 1.25em;
  font-weight: 700;
  background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  padding: 6px 18px;
  border-radius: 10px;
  margin: 8px 0 12px 0;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
  letter-spacing: 0.02em;
}


.money-pop {
  animation: money-pop-anim 0.7s cubic-bezier(0.4,1.4,0.4,1) 1;
}
@keyframes money-pop-anim {
  0% {
    background: #fffde7;
    color: #ff9800;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 152, 0, 0.0);
  }
  30% {
    background: #fffde7;
    color: #ff9800;
    transform: scale(1.18);
    box-shadow: 0 0 16px 4px #ff980088;
  }
  60% {
    background: #e8f5e9;
    color: #1b5e20;
    transform: scale(1.08);
    box-shadow: 0 0 8px 2px #43a04755;
  }
  100% {
    background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1b5e20;
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
  }
}

.notification-buy, .notification-sell {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(90deg, #43a047 0%, #388e3c 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1.03em;
  font-weight: 700;
  box-shadow: 0 6px 32px rgba(67, 160, 71, 0.18), 0 1.5px 4px rgba(67, 160, 71, 0.10);
  opacity: 0;
  z-index: 1000;
  animation: notification-fade 3s cubic-bezier(0.4,1.4,0.4,1);
  pointer-events: none;
}
.notification-sell {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(90deg, #e53935 0%, #b71c1c 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1.03em;
  font-weight: 700;
  box-shadow: 0 6px 32px rgba(229, 57, 53, 0.18), 0 1.5px 4px rgba(229, 57, 53, 0.10);
  opacity: 0;
  z-index: 1000;
  animation: notification-fade 3s cubic-bezier(0.4,1.4,0.4,1);
  pointer-events: none;
}
@keyframes notification-fade {
  0% { opacity: 0; transform: translateY(30px) scale(0.97); }
  10% { opacity: 1; transform: translateY(0) scale(1.04); }
  80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(30px) scale(0.97); }
}


@media (max-width: 1080px) {
#code-expanded{
  min-height: 1600px !important;
  max-width: 1050px !important;
  
}
.flowchart{
  width: 98% !important;
}
}
@media (max-width: 700px) {
  .notification-buy, .notification-sell {
    font-size: 0.95em !important;
    padding: 10px 12px !important;
  }
}



#battery-level.level-highlight {
  font-size: 1.25em;
  font-weight: 700;
  background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  padding: 4px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
  letter-spacing: 0.01em;
  display: inline-block;
  margin-left: 6px;
}
#hydrogen-level.hydrogen-highlight {
  font-size: 1.25em;
  font-weight: 700;
  background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
  color: #01579b;
  padding: 4px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.08);
  letter-spacing: 0.01em;
  display: inline-block;
  margin-left: 6px;
}
@media (max-width: 700px) {
  #battery-level.level-highlight, #hydrogen-level.hydrogen-highlight {
    font-size: 1.08em;
    padding: 3px 8px;
    border-radius: 7px;

  }
}


.pv-sun-highlight {
  background: #eaffea;
  color: #333;
  font-weight: bold;
  border-radius: 5px;
  padding: 2px 8px;
  box-shadow: 0 0 4.8px 1.2px #4be04b;
  transition: background 0.3s, box-shadow 0.3s;
}

#sun .pv-sun-highlight:first-child {
  margin-top: 5px;
  display: inline-block;
}
#sun .pv-sun-highlight + .pv-sun-highlight {
  margin-top: 10px;
  display: inline-block;
}

.pretty-header, h2.pretty-header {
  background: #031223 !important;
  color: #fff !important;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(33, 150, 243, 0.10);
  padding: 14px 0 14px 0;
  margin-bottom: 24px;
  font-size: 1.7em;
  letter-spacing: 0.01em;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 8px rgba(33, 150, 243, 0.10);
}

@media (max-width: 700px) {
  .eco-system-container {
    padding: 4px 0 4px 0 !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow: visible !important;
  }
  .eco-item {
    padding: 8px 6px 8px 6px !important;
    margin-bottom: 8px !important;
    font-size: 0.98em !important;
  }
  .trade-panel {
    flex-direction: column !important;
    padding: 6px 2px !important;
    font-size: 0.98em !important;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.06) !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
  }
  .flowchart {
    min-width: 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding-bottom: 0 !important;
    margin-bottom: 10px !important;
    max-height: none !important;
    touch-action: pan-y !important;
  }
}

@media (max-width: 700px) {
  .graph-row {
    flex-direction: column !important;
    gap: 18px !important;
    align-items: stretch !important;
  }
}


@media (max-width: 700px) {
  .flowchart {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

.level-highlight,
.hydrogen-highlight {
  display: inline-block;
  min-width: 48px;
  max-width: 120px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1em;
  padding: 6px 18px;
}

#battery-storage-percentage.level-highlight {
  background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  margin: 0 auto;
}

#hydrogen-storage-percentage.hydrogen-highlight {
  background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
  color: #1565c0;
    margin: 0 auto;
}

.electrolyzer-controls button,
.fuelcell-controls button {
  margin-right: 10px;
}
.electrolyzer-controls button:last-child,
.fuelcell-controls button:last-child {
  margin-right: 0;
}
.lang-btn {
  background: transparent;
  color: #1976d2;
  border: 1.5px solid #1976d2;
  border-radius: 6px;
  padding: 4px 14px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.lang-btn.lang-btn-on {
  background: #1976d2;
  color: #fff;
  border: 1.5px solid #1976d2;
}
.lang-btn.lang-btn-off {
  background: transparent;
  color: #1976d2;
  border: 1.5px solid #1976d2;
}
.lang-btn:hover {
  background: #1976d2;
  color: #fff;
}

#flowchart-container {
  margin-bottom: 8px;
  max-width: 1200px;
  width: 100%;
  display: none;
}

#flowchart-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

}



@media (max-width: 700px) {

.dashboard-modal{
  width: 20%;
}
  #toggle-widget, #toggle-widget-expanded.toggle-widget {
    width: 30px;
    height: 30px;
    background-color: #000000;
    color: white;
    margin: 3px;
    font-size: 18px;
    text-align: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;

}
  .flowchart {
    display: none !important;
  }
  .flowchart::-webkit-scrollbar {
    display: none;
  }
  .flowchart .flow-item, #pv-charging-arrow, #electrolyzer-charging-arrow, #fuelcell-charging-arrow, #electrolyzer-output-charging-arrow, #hydrogen-to-fuelcell-charging-arrow, #fuelcell-to-charging-charging-arrow {
    margin-bottom: 0px;
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 10px;
    padding-top: 0px;
    padding-bottom: 0px;
    min-width: 0;
    gap: 0px !important;
  }
  .flowchart .flow-item, #pv-charging-arrow, #electrolyzer-charging-arrow, #fuelcell-charging-arrow, #electrolyzer-output-charging-arrow, #hydrogen-to-fuelcell-charging-arrow, #fuelcell-to-charging-charging-arrow {
    width: 100%;
    margin-bottom: 0px;
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding-top: 3px;
    padding-bottom: 3px;
    min-width: 0;
  }
  .flowchart .flow-item:last-child, #fuelcell-charging-arrow:last-child {
    margin-bottom: 0;
  }
  .flowchart img, .flowchart .flow-item img {
    max-height: 72px;
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto 4px auto;
  }
  .eco-system-container {
    padding: 8px 2vw 8px 2vw;
    flex-direction: column;
    gap: 12px;
  }
  .eco-item {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(30, 98, 208, 0.07);
    padding: 16px 12px 12px 12px;
    margin-bottom: 14px;
  }
  .trade-row {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .trade-input, .trade-increment, .trade-reset {
    margin: 0 auto;
    width: 100%;
    max-width: 180px;
  }
  .trade-market-price {
    margin-left: 0px;
    margin-top: 0px;
    display: block;
    text-align: left;
    padding: 0px 0px !important;
  }
  #button-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .start-btn, .stop-btn, .reset-btn, .button.buy, .button.sell, .trade-row button {
    width: 100%;
    margin: 0 auto;
  }
  canvas {
    max-width: 100vw;
    width: 100%;
    min-width: 0;
    display: block;
    margin-bottom: 18px;
    box-sizing: border-box;
  }
  #corner-content{
    min-width: 0;
    overflow-x: auto;
  }
  #code-expanded{
    height: 600px !important;
  }
  #code-minimized{

        min-width: 0;
    overflow-x: auto;
        padding-bottom: 1250px;
  }


  .flowchart{
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 1250px;

  }
}
@media (max-width: 700px) {
  .sticky-bar .sticky-bar-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
    height: auto !important;
  }
  #documentation-btn{
    margin-right: 20px;
    margin-top: 10px;
  }
  .sticky-bar-buttons .lang-toggle,
  .sticky-bar-buttons {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 180px !important;
    margin: 0 !important;
    margin-bottom: 4px !important;
    text-align: right !important;
    border-radius: 8px !important;
    font-size: 1em !important;
    box-sizing: border-box;
  }
  .sticky-bar-buttons #documentation-btn {
    margin-bottom: 0 !important;
  }
}
@media (max-width: 700px) {
  #sticky-battery-gauge,
  #sticky-hydrogen-gauge,
  #sticky-thermal-gauge {
    margin-right: 0 !important;
    padding: 0 !important;
    width: 85px !important;
    min-width: 0 !important;
    max-width: 110px !important;
    align-items: center !important;
  }
  #sticky-battery-gauge-svg,
  #sticky-hydrogen-gauge-svg,
  #sticky-thermal-gauge-svg {
    width: 90px !important;
    height: 48px !important;
    min-width: 0 !important;
    max-width: 100px !important;
    display: block;
  }
  #sticky-battery-gauge-percentage,
  #sticky-hydrogen-gauge-percentage,
  #sticky-thermal-gauge-percentage {
    font-size: 13px !important;
    margin-top: 0 !important;
  }
  #sticky-battery-gauge img,
  #sticky-hydrogen-gauge img,
  #sticky-thermal-gauge img {
    width: 28px !important;
    height: 28px !important;
    margin-top: -20px !important;
    object-fit: contain;
  }
  #sticky-battery-gauge > div,
  #sticky-hydrogen-gauge > div,
  #sticky-thermal-gauge > div {
    margin-top: 0 !important;
    font-size: 13px !important;
  }
}
@media (max-width: 768px) {

  .sticky-bar-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: stretch;
    justify-content: space-evenly;
    align-items: baseline;
    gap: 1px !important;
    margin-left: 15px;
  }
    .ema-config {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ema-config input[type="range"] {
        width: 150px;
    }
}
@media (max-width: 768px) {
    .indicator-checkboxes {
        flex-direction: column;
        gap: 10px;
    }

    
    .indicator-checkbox {
        width: 100%;
        justify-content: flex-start;
    }
}

.consumer-columns {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.consumer-level {
  font-size: 1.25em;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 8px;
  letter-spacing: 0.01em;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  max-width: 160px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

#consumer-ev-level{
  background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
}

#consumer-h2-level{
  background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
  color: #01579b;
}
#consumer-panel-left {
  flex: 0 0 260px;
  min-width: 160px;
  
}
#consumer-panel-right {
  flex: 1 1 auto;
}
@media (max-width: 700px) {
  .consumer-columns {
    flex-direction: column;
  }
  #consumer-panel-left {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  #consumer-panel-right {
    width: 100%;
  }
}

@media (max-width: 768px) {

    body {
        font-size: 16px;
        overflow-y: auto;
    }

    .chart-container {
        margin: 10px;
    }

    #myChart, #myChart2, #batteryChart, #hydrogenChart {
        max-height: 300px;
        height: 20vh;
    }

    .checkbox-container {
       display: none;
    }

    .button {
        flex: 0 2 100%;
        max-width: 30%;
        font-size: 15px !important;
    }

    .start{
        flex: 0 2 100%;
        max-width: 30%;
        padding: 10px 10px!important;
        font-size: 15px !important;;
    }
    .stop{
        flex: 0 2 100%;
        max-width: 30%;
        font-size: 15px !important;
    }

    #corner-widget {
        bottom: 10px;
        right: 10px;
        width: 90%; 
        max-height: 70vh !important; 
    }
    #code-minimized{
        max-height: 30vh !important;
    }
    #corner-content {
      
        padding: 5px; 
}

.dropdown-container{
    display: block;
    text-align: center;
    margin-top: 10px;
    border-radius: 30px;
    margin-bottom: 10px;
}


.dropdown-container select {
    width: 80%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    text-align: center;
    margin-top: 10px;
    border-radius: 30px;
}

.eco-item {
    flex: 1; 
    padding: 10px !important;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px !important;
}

.eco-system-container {
    display: block !important;
    gap: 20px !important; 
    margin-top: -30px !important;
}


.button-container {
    display: block;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}


.flowchart {
    display: flex;
    flex: 0 2 100%;
    align-items: center;
    flex-direction: column;
    align-content: stretch;
    justify-content: space-evenly;
    gap: 5px !important;
    margin: 4px 0 !important;
}




#pv-static-arrow,
#electrolyzer-static-arrow,
#fuelcell-static-arrow,
#electrolyzer-output-static-arrow,
#hydrogen-to-fuelcell-static-arrow,
#fuelcell-to-charging-static-arrow {
  width: 120px !important;
  height: 40px !important;
  max-height: 40px !important;
  min-height: 40px !important;
  object-fit: contain !important;
  transform: none !important;
}

#pv-animated-arrow,
#electrolyzer-animated-arrow,
#fuelcell-animated-arrow,
#electrolyzer-output-animated-arrow,
#hydrogen-to-fuelcell-animated-arrow,
#fuelcell-to-charging-animated-arrow {
  width: 120px !important;
  height: 40px !important;
  max-height: 40px !important;
  min-height: 40px !important;
  object-fit: contain !important;
  transform: none !important;
}

.use-case{
    width: 80%;
    margin-left: 30px;
    font-size: 16px;
    border: 1px solid #ccc !important;
    text-align: center;
    margin-top: 10px;
    border-radius: 30px !important;
}

.notification {
    position: fixed;
    bottom: 20px !important;
    right: 22px !important;
    background-color: green; 
    color: white;
    padding: 15px 110px !important;
    border-radius: 10px !important;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    display: none; 
    opacity: 0; 
    transition: opacity 1s ease-in-out;
    z-index: 1000;
}



}

@media (max-width: 700px) {
  .money-highlight {
    font-size: 1.1em;
    padding: 6px 10px;
    border-radius: 8px;
  }
}