* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

/* Layout compacte */
.container-compact {
    max-width: 800px;
    margin: 0 auto;
}

.estacions-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
}

/* Targeta d'estació compacta */
.estacio-card-compact {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Nom estació */
.nom-estacio {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Temperatura actual DESTACADA */
.temp-actual-destacada {
    font-size: 4em;
    font-weight: bold;
    color: #333;
    text-align: center;
    line-height: 1;
    margin: 10px 0;
}

/* Humitat actual */
.humitat-actual {
    font-size: 1.5em;
    text-align: center;
    color: #4ecdc4;
    margin-bottom: 15px;
}

/* Extrems compactes */
.extrems-compacte {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
}

.extrem {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9em;
}

.extrem .label {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.extrem .valor {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.extrem .data {
    color: #999;
    font-size: 0.75em;
    margin-top: 2px;
}

/* Pluja compacta */
.pluja-compacta {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.pluja-titol {
    font-size: 1em;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 8px;
}

/* Pluja avui DESTACADA (quan hi ha pluja) */
.pluja-avui-destacada {
    font-size: 3em;
    font-weight: bold;
    color: #1976d2;
    text-align: center;
    line-height: 1;
    margin: 10px 0 15px 0;
}

.pluja-valors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85em;
    color: #333;
}

.pluja-valors span {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.pluja-valors strong {
    color: #1976d2;
}

.pluja-consecutiva {
    margin-top: 8px;
    font-size: 0.9em;
    color: #1976d2;
    padding: 8px;
    background: white;
    border-radius: 4px;
    text-align: center;
}

.pluja-consecutiva strong {
    color: #0d47a1;
}

.pluja-intensitat {
    margin-top: 8px;
    font-size: 0.8em;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid #bbdefb;
}

.data-petita {
    color: #999;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Temperatura extrems períodes */
.temp-extrems-periodes {
    background: #fff8e1;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.periode {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9em;
}

.periode-nom {
    color: #666;
    font-weight: bold;
    min-width: 80px;
}

.periode-valors {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.temp-max {
    color: #d32f2f;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.temp-min {
    color: #1976d2;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.temps-petita {
    color: #999;
    font-size: 0.7em;
    font-weight: normal;
    margin-top: 2px;
}

.separador {
    color: #999;
    margin: 0 5px;
}

/* Última actualització */
.actualitzacio-petita {
    text-align: center;
    font-size: 0.75em;
    color: #999;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .estacions-grid-compact {
        grid-template-columns: 1fr;
    }

    .temp-actual-destacada {
        font-size: 3.5em;
    }

    .nom-estacio {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .estacio-card-compact {
        padding: 15px;
    }

    .temp-actual-destacada {
        font-size: 3em;
    }

    .pluja-valors {
        font-size: 0.8em;
    }
}
