body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

header, footer {
    text-align: center;
    padding: 10px 0;
    background-color: #333;
    color: #fff;
}

header h1 {
    color: #FFFFFF; 
}

main > section {
    background: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #333;
}

.appliance-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.appliance-item {
    cursor: pointer;
    text-align: center;
    width: 120px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: transform 0.2s, border-color 0.2s;
}

.appliance-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 5px;
}

.appliance-item.selected {
    border-color: #4CAF50; 
    transform: scale(1.05);
}

.appliance-time-controls {
    margin-bottom: 20px; 
    padding: 15px;      
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9; 
}

.appliance-time-controls h3 {
    margin-top: 0; 
    margin-bottom: 15px;
    font-size: 1.2em; 
    color: #444; 
}

.time-slot-controls { 
    margin-bottom: 10px;
}

.time-slot-controls h4 { 
    margin-bottom: 10px;
    font-size: 1.0em; 
    color: #333;
}

.control-row { 
    display: flex;
    align-items: center;
    margin-bottom: 10px; 
}

.label-group {
    display: flex;
    align-items: center;
    min-width: 180px;    
    margin-right: 10px;
}

.label-group label {
    margin-right: 8px; 
    font-weight: bold; 
}

.time-value, .duration-value { 
    font-weight: normal;
    min-width: 50px; 
    text-align: left;
}

.input-wrapper { 
    flex-grow: 1;
    display: flex;
    position: relative; 
}

.input-wrapper input[type="range"],
.input-wrapper select {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

#initial-load-curve-chart-container, #updated-load-curve-chart-container {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    height: 400px; 
}

#cost-comparison-chart-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    height: 600px; 
}

.time-slot-controls hr { 
    margin-top: 15px;
    margin-bottom: 15px;
    border: 0;
    border-top: 1px solid #eee;
}

.appliance-count-control {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e9e9e9; 
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px; 
}
.appliance-count-control label {
    font-weight: bold;
    margin-right: 5px;
}
.appliance-count-control input[type="number"] {
    width: 60px;
    padding: 5px;
}

.initial-slot-reference {
    font-size: 0.85em; 
    color: #555;      
    margin-top: 8px;  
    margin-bottom: 5px; 
    padding-left: 10px; 
    border-left: 2px solid #ccc; 
}
.initial-slot-reference em {
    font-style: italic;
}

.initial-start-tick {
    position: absolute;
    width: 3px;  
    height: 14px; 
    background-color: #FF8C00; 
    top: 50%;

    transform: translate(-50%, -50%);
    z-index: 0; 
    pointer-events: none; 
    display: none; 
}