/* Base Styles */
body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Content Container */
.content-wrapper {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

/* Typography */
h1 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #1a365d;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* Status Message */
.status-message {
    padding: 12px 15px;
    margin: 10px 0 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #f1f5f9;
    color: #334155;
    border-left: 4px solid #64748b;
}

.status-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.status-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #16a34a;
}

/* Summary Cards */
.summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 3px solid #3182ce;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.summary-card:nth-child(1) {
    border-top-color: #3182ce; /* Blue */
}

.summary-card:nth-child(2) {
    border-top-color: #e53e3e; /* Red */
}

.summary-card:nth-child(3) {
    border-top-color: #38a169; /* Green */
}

.summary-card:nth-child(4) {
    border-top-color: #4a5568; /* Gray */
}

.summary-card h2 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: #4a5568;
    font-weight: 500;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.2;
}

.summary-card .unit {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 5px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Controls Section */
.controls {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.zoom-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.range-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.range-control {
    display: flex;
    flex-direction: column;
}

.range-control label {
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.range-control input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9rem;
    color: #2d3748;
    transition: border-color 0.2s ease;
}

.range-control input:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Buttons */
button {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

button:hover {
    background-color: #2c5282;
}

#apply-ranges {
    background-color: #38a169;
}

#apply-ranges:hover {
    background-color: #2f855a;
}

#refresh-now {
    background-color: #805ad5;
}

#refresh-now:hover {
    background-color: #6b46c1;
}

/* Last Update */
.last-update {
    font-size: 0.85rem;
    color: #718096;
    text-align: right;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 15px;
}

.refresh-countdown {
    display: inline-block;
    margin-left: 8px;
    font-weight: 500;
    color: #4a5568;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .range-controls {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .summary {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .zoom-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    button {
        width: 100%;
    }
    
    .range-controls {
        grid-template-columns: 1fr;
    }
    
    .last-update {
        text-align: left;
    }
}