:root {
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Added a nice, subtle, colorful gradient */
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.dashboard {
    max-width: 1000px;
    width: 100%;
}

/* header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: #1e3a8a;
} */
 header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: nowrap; /* Prevents the button from dropping down */
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.refresh-btn {
    background-color: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}

.grid {
    display: grid;
    /* This creates exactly 5 columns of equal width */
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; /* Slightly reduced gap to help them fit */
    margin-bottom: 30px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card.active {
    border-color: var(--accent);
    background-color: #ffffff;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
}

.temperature {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: flex-start;
    color: var(--text-main);
}

.unit {
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 8px;
    margin-left: 4px;
    color: var(--text-muted);
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 15px;
}

.chart-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.time-controls {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.05);
    padding: 5px;
    border-radius: 10px;
}

.time-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.time-btn:hover {
    color: var(--text-main);
}

.time-btn.active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}