body {
    font-family: "Poppins", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background-color: #F0F3F8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #FFFFFF;
    padding: 13px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.header2 {
    background-color: #0085CB;
    padding: 2px;
}

.header img {
    height: 40px;
    margin-right: 20px;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.navbar-logo-left-container {
    z-index: 5;
    background-color: rgba(0, 0, 0, 0);
    text-align: left;
    padding: 10px;
    min-width: 300px;
    /* Prevents the logo container from shrinking */
}

.navbar-logo-left-container h1 {
    margin: 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 13px;
    padding: 20px;
    min-width: 800px;
    /* Set a minimum width for the grid */
    min-height: 600px;
    /* Set a minimum height for the grid */
}

.grid-item {
    background-color: #FFFFFF;
    padding: 20px;
    text-align: center;
    min-width: 100px;
    /* Set a minimum width for grid items */
    min-height: 100px;
    /* Set a minimum height for grid items */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-1 {
    grid-column: 1 / 2;
}

.item-2 {
    grid-column: 2 / 4;
}

.item-3 {
    grid-column: 4 / 5;
}

.item-4 {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
}

.item-5,
.item-6 {
    grid-column: 3 / 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 30vh;
    /* Adjust height based on viewport height */
    padding: 20px;
    /* Add padding for better spacing */
}

.chart-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.middle {
    border-bottom: 5px solid #0085CB;
    background-image: url('../assets/images/background-image.png');
    /* Replace with your image path */
    background-size: 100% auto;
    /* Adjust the height while keeping full width */
    background-position: center;
    background-repeat: no-repeat;
    color: black;
    /* Optional: to make text readable on background image */
    /*background-color: #00cc44;*/
}

.image-grid {
    display: flex;
    justify-content: space-around;
    /* Space images evenly */
    align-items: center;
    /* Center align images vertically */
    height: 100%;
    text-align: center;
}

.image-grid img {
    width: 60px;
    /* Set the width of the images */
    height: auto;

}

.image-grid .text {
    font-size: 1.2em;
    font-weight: bold;
}

.image-grid .subtext {
    font-size: 0.9em;
    color: #333;
}

.image-grid .item {
    display: flex;
    flex-direction: column;
    align-items: center;

}

.image-grid .item.s02 img {
    width: 70px;
    /* Make the SO2 Reduction image larger */
}

.title {
    font-size: 14px;
    font-weight: medium;
    text-align: left;
    margin-bottom: 10px;
    color: #142C68;
    display: flex;
    align-items: center;
    position: relative;
    height: 25px;
}

.tooltip-icon {
    margin-left: 5px;
    font-size: 16px;
    cursor: pointer;
    color: #264565;
}

.tooltip-icon img {
    width: 16px;
    height: 16px;
}

.last-updated {
    font-size: 12px;
    color: #666;
    margin-left: auto;
    padding-left: 20px;
}

.flow-images {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 40px;
    /* Adjust this value to bring the images down */
}

.flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px;
}

.flow-item img {
    width: 50px;
    height: auto;
}

.solar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    /* Adjust this value to control spacing */
}

.flow-text {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.status {
    color: green;
    font-size: 14px;
    margin-left: 5px;
}

.update-time {
    font-size: 12px;
    color: #666;
    position: absolute;
    right: 20px;
    top: 13px;
}

.production-consumption-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.production-consumption-item {
    width: 100%;
    margin: 10px 0;
    padding: 0;
    text-align: left;
}

.production-consumption-item .value {
    font-size: 19px;
    font-weight: bold;
    display: flex;
    align-items: center;
    color: #142C68;
}

.production-consumption-item .label {
    font-size: 14px;
    color: #999;
    font-weight: bold;
}

.production-consumption-item .details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.production-consumption-item .details span {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
}

.production-consumption-item .details .circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.circle-production {
    background-color: #00cc44;
    /* Same as 100% bar */
}

.circle-production-other {
    background-color: #38C9D5;
    /* Circle color for 0.01 MWh */
}

.circle-consumption {
    background-color: #3366ff;
    /* Same as 57% bar */
}

.circle-consumption-other {
    background-color: #ff9900;
    /* Same as 43% bar */
}

.production {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.consumption {
    border-bottom: 1px solid #e0e0e0;
}

.progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.progress {
    flex-grow: 1;
    height: 20px;
    background-color: #e0e0e0;
    overflow: hidden;
    display: flex;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    height: 100%;
}

.progress-bar-production {
    background-color: #00cc44;
    width: 100%;
}

.progress-bar-consumption {
    background-color: #3366ff;
    width: 66%;
}

.progress-bar-consumption-other {
    background-color: #ff9900;
    width: 34%;
}

.detail-icon {
    width: 15px;
    height: 15px;
    margin-right: 5px;
}

.weather-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

.temperature {
    font-size: 20px;
    font-weight: bold;
    color: #142C68;
}

.condition {
    font-size: 16px;
}

.temp-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.temp-container div {
    text-align: center;
}

.temp-container h4 {
    font-size: 8px;
    color: #142C68;
    margin: 0;
}

.temp-container .temp {
    font-size: 16px;
    color: #E76F51;
    font-weight: bold;
}

.line {
    position: absolute;
    overflow: hidden;
    /* Ensure the pseudo-element stays within the bounds */
}

.line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(43, 255, 0, 0.5)0%, rgba(43, 255, 0, 0.5) 70%, rgba(0, 255, 255, 0) 100%);
    animation: flow-downward 2s linear infinite;
}

.line.central-home::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(43, 255, 0, 0.5) 0%, rgba(43, 255, 0, 0.5)70%, rgba(0, 255, 255, 0) 100%);
    animation: flow-left 3s linear infinite;
}

.line.central-home {
    top: 103%;
    left: 13%;
    width: 150px;
    height: 10px;
}

.line.grid-central {
    top: 103%;
    left: 28%;
    width: 150px;
    height: 10px;
}

.line.grid-central::before {
    background: linear-gradient(90deg, rgba(255, 125, 0, 0.5) 0%, rgba(255, 125, 0, 0.5) 70%, rgba(0, 255, 255, 0) 100%);
    animation: flow-left 2s linear infinite;
}

.line.panel-central {
    top: 95%;
    left: 24.5%;
    height: 40px;
    width: 20px;
}

.line.panel-central::before {
    background: linear-gradient(180deg, rgba(43, 255, 0, 0.5) 0%, rgba(43, 255, 0, 0.5) 65%, rgba(0, 255, 255, 0) 100%);
    animation: flow-downward 2s linear infinite;
}

@keyframes flow-horizontal {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes flow-downward {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@keyframes flow-vertical {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateY(-100%);
    }
}

@keyframes flow-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {

    .line.central-home {
        top: 115%;
        left: 14.5%;
        width: 70px;
        height: 10px;
    }

    .line.grid-central {
        top: 115%;
        left: 29%;
        width: 70px;
        height: 10px;
    }

    .line.panel-central {
        top: 107.5%;
        left: 23.9%;
        height: 40px;
        width: 20px;
    }
}

/* Responsive adjustments */
@media (max-width: 500px) {

    .line.central-home {
        top: 129%;
        left: 18%;
        width: 50px;
        height: 10px;
    }

    .line.grid-central {
        top: 115%;
        left: 29%;
        width: 70px;
        height: 10px;
    }

    .line.panel-central {
        top: 107.5%;
        left: 23.9%;
        height: 40px;
        width: 20px;
    }
}

.power {
    margin-top: 100px;
}

.footer {
    background-color: #FFFFFF;
    padding: 12px 20px;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 14px;
    color: #666;
    border-top: red 3px solid;
}

.footer img {
    height: 35px;
}

/* Style for the time display */
.time-display {
    font-size: 18px;
    color: #0085CB;
    font-family: 'Courier New', monospace;
    width: 200px;
    /* Set a fixed width to prevent resizing */
    text-align: right;
}

.time-display {
    font-size: 18px;
    color: #142C68;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}