body {
    font-family: 'Courier New', monospace;
    background: #333333;
    color: #fff;
    margin: 0;
    padding: 20px;
}

h3 {
    margin: 0 0 8px 0 !important;
}

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



header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.user-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-selector.sticky {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.0);
    padding: 10px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.user-btn {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
}

.status-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #FFD700;
}

.value {
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
}

.loading {
    color: #ccc;
}

.error {
    color: #ff6b6b;
}

.success {
    color: #4CAF50;
}

.data-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.data-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.data-group h3 {
    margin: 0 0 8px 0 !important;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 3px;
}

.data-item {
    margin: 8px 0;
    font-family: monospace;
    font-size: 1rem;
    color: #333;
}

.data-item span {
    font-weight: bold;
    color: #007bff;
}

@media (max-width: 768px) {
    .data-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .data-group {
        padding: 15px;
    }
}

.chart-container {
    background: transparent;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 5px;
    backdrop-filter: blur(10px);
    border: none;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: nowrap;
}

.chart-header h3 {
    margin: 0;
    color: #FFD700;
    font-size: 1.2rem;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.2);
    color: #FFD700;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-arrow:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.info-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #FFD700;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    margin-left: 10px;
}

.info-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.info-icon {
    position: relative;
}

.tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-top: 10px;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.9);
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip h4 {
    margin: 0 0 10px 0;
    color: #FFD700;
    font-size: 1rem;
}

.tooltip p {
    margin: 5px 0;
    color: #fff;
}

/* Energy Flow Diagram */
.energy-flow-section {
    margin-bottom: 30px;
}

/* Hide Current System Data section */
.data-list-section {
    display: none;
}

.energy-flow-container {
    background: transparent;
    border-radius: 15px;
    padding: 25px 15px 15px 15px;
    position: relative;
    width: 374px !important;
    min-width: 374px !important;
    max-width: 374px !important;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    min-height: 220px;
    overflow-x: hidden;
    box-sizing: border-box;
    text-align: center;
}

.energy-flow-container .left {
    font-family: monospace;
    display: inline-block; 
    width: 48%; 
    text-align: left;
    font-size: 1.1rem;
}

.energy-flow-container .right {
    font-family: monospace;
    display: inline-block; 
    width: 48%; 
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 1.1rem;
}

.energy-flow-container .diagram {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    border: none;
    outline: none;
}

.energy-flow-container .diagram rect {
    fill: #333;
    stroke: #fff;
    stroke-width: 1;
}

.energy-flow-container .diagram path[id*="arrow"] {
    fill: #fff;
    stroke: #fff;
    stroke-width: 1;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #FFD700;
    font-size: 1.3rem;
}

.chart-container canvas {
    max-height: 150px;
    width: 100% !important;
    height: auto !important;
    border: none !important;
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

footer p {
    color: #ccc;
    font-size: 0.9rem;
}

.status-message {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 { 
        font-size: 1.8rem; 
        margin-bottom: 15px;
    }
    
    .user-selector {
        gap: 8px;
    }
    
    .user-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .energy-flow-container {
        max-width: 320px;
        padding: 10px;
        min-height: 190px;
        font-size: 0.8rem;
    }
    
    .energy-flow-container .diagram {
        width: 200px;
        height: 200px;
    }
    
    .chart-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .chart-container h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .chart-header h3 {
        font-size: 1rem;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .info-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-left: 8px;
    }
    
    .tooltip {
        font-size: 0.75rem;
        padding: 10px;
        white-space: normal;
        max-width: 250px;
    }
    
    footer {
        padding: 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    header h1 { 
        font-size: 1.5rem; 
    }
    
    .user-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .energy-flow-container {
        max-width: 300px;
        padding: 5px;
        min-height: 180px;
        font-size: 0.75rem;
    }
    
    .energy-flow-container .diagram {
        width: 180px;
        height: 180px;
    }
    
    .chart-container {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .chart-container h3 {
        font-size: 1rem;
    }
    
    .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .tooltip {
        max-width: 200px;
        font-size: 0.7rem;
    }
}



/* Fun Facts Section Styles */
.fun-facts-section {
    margin: 30px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    font-style: italic;
}

.fun-facts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.fact-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.fact-icon {
    font-size: 2rem;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    min-width: 45px;
    text-align: center;
}

.fact-content {
    flex: 1;
    min-width: 0;
}

.fact-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fact-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.fact-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.fact-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Special styling for different fact types */
.fact-card:nth-child(1) .fact-icon {
    color: #FFD700; /* Gold for best day */
}

.fact-card:nth-child(2) .fact-icon {
    color: #4CAF50; /* Green for total export */
}

.fact-card:nth-child(3) .fact-icon {
    color: #2196F3; /* Blue for average */
}

.fact-card:nth-child(4) .fact-icon {
    color: #FF9800; /* Orange for peak power */
}

.fact-card:nth-child(5) .fact-icon {
    color: #9C27B0; /* Purple for best month */
}

.fact-card:nth-child(6) .fact-icon {
    color: #4CAF50; /* Green for CO2 saved */
}

.fact-card:nth-child(7) .fact-icon {
    color: #FF9800; /* Orange for peak hours */
}

.fact-card:nth-child(8) .fact-icon {
    color: #F44336; /* Red for worst day */
}





/* Calendar Styles */
.calendar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0 10px;
    box-sizing: border-box;
}

.calendar-container svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    transform: none !important;
    zoom: 1 !important;
    -webkit-transform: none !important;
    -webkit-zoom: 1 !important;
}

.calendar-container svg rect {
    transform: none !important;
    -webkit-transform: none !important;
}

/* Responsive calendar adjustments */
@media (max-width: 768px) {
    .calendar-container {
        padding: 0 5px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 0 2px;
        gap: 8px;
    }
}

/* Cumulative Yield Chart */
#cumulativeYieldChart {
    max-height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}



.legend-squares {
    display: flex;
    gap: 2px;
}

.legend-square {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsiveness for fun facts */
@media (max-width: 768px) {
    .fun-facts-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .fact-card {
        padding: 15px;
        gap: 12px;
    }
    
    .fact-icon {
        font-size: 1.8rem;
        min-width: 40px;
    }
    
    .fact-value {
        font-size: 1.3rem;
    }
    
    .fact-label {
        font-size: 0.75rem;
    }
}


