:root { --primary: #9e1b32; --bg: #ffffff; --text: #1a1a1a; --border: #e0e0e0; }
body { font-family: -apple-system, sans-serif; background: #f9f9f9; color: var(--text); display: flex; justify-content: center; margin: 0; }
.app { width: 95%; max-width: 1000px; padding: 20px; box-sizing: border-box; }
h1 { color: var(--primary); text-align: center; }

.search-container { position: relative; width: 100%; }
input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-size: 16px; }

#results { background: white; border: 1px solid var(--border); position: absolute; width: 100%; z-index: 100; max-height: 200px; overflow-y: auto; }
.item { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; }

#details { margin: 20px 0; padding: 20px; background: white; border-radius: 8px; border: 1px solid var(--border); }
.button-group { display: flex; gap: 10px; margin-top: 10px; }
button { flex: 1; background: var(--primary); color: white; border: none; padding: 12px; font-weight: bold; cursor: pointer; border-radius: 4px; }
button.secondary { background: #444; }

/* Grid fix: minmax(0, 1fr) prevents children from expanding the column */
.comparison-grid { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 20px; 
    width: 100%;
}

.model-column { overflow: hidden; } /* Prevents overflow content from resizing the column */

.summary-box { background: white; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid var(--border); margin-bottom: 15px; }
.weather-sub { font-size: 0.8em; color: #666; margin-top: 5px; }

.chart-container { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 10px; height: 200px; margin-bottom: 15px; }

.section-label { display: block; margin-bottom: 5px; }

.hourly-scroller { 
    display: flex; 
    overflow-x: auto; 
    gap: 8px; 
    padding-bottom: 10px; 
    margin-bottom: 15px; 
    width: 100%; /* Important: fit within the 50% column */
    scrollbar-width: thin;
}
.hour-card { min-width: 65px; text-align: center; background: white; padding: 8px; border-radius: 4px; border: 1px solid var(--border); font-size: 11px; flex-shrink: 0; }
.hour-card b { color: var(--primary); display: block; }

h3 { font-size: 14px; border-bottom: 1px solid #ddd; padding-bottom: 5px; }
.small-history { font-size: 12px; }
.history-item { padding: 6px 0; border-bottom: 1px solid #f0f0f0; }

.grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; text-align: center; }
label { font-size: 10px; color: #888; text-transform: uppercase; font-weight: bold; }
.hidden { display: none !important; }

#loading-message {
    margin-top: 15px;
    padding: 15px 20px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}