* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #10151c;
    color: #f4f7fa;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 5%;
    background: #18212b;
    border-bottom: 1px solid #303b47;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

header p {
    margin: 4px 0 0;
    color: #9ba9b7;
}

.live-indicator {
    font-weight: bold;
    letter-spacing: 1px;
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border-radius: 50%;
    background: #35d073;
    box-shadow: 0 0 8px #35d073;
}

main {
    width: min(1200px, 92%);
    margin: 30px auto;
}

.hero {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    padding: 26px;
    background: #18212b;
    border: 1px solid #303b47;
    border-radius: 14px;
}

.temperature {
    border-right: 1px solid #303b47;
}

.label {
    display: block;
    color: #9ba9b7;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.big-value {
    font-size: 4.5rem;
    font-weight: bold;
    line-height: 1;
}

.big-value .unit {
    font-size: 2rem;
    color: #aab7c4;
}

.status {
    margin-top: 12px;
    color: #7fdd9f;
    font-size: 0.9rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-stat strong {
    font-size: 1.8rem;
}

.hero-stat small {
    color: #9ba9b7;
    margin-top: 6px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.card {
    background: #18212b;
    border: 1px solid #303b47;
    border-radius: 14px;
    padding: 22px;
    min-height: 170px;
}

.card h2 {
    margin: 0 0 18px;
    font-size: 1rem;
    color: #aebbc8;
    font-weight: normal;
}

.card-value {
    font-size: 2.7rem;
    font-weight: bold;
}

.card-unit {
    font-size: 1.2rem;
    color: #9ba9b7;
}

.card p {
    color: #8f9dab;
    font-size: 0.9rem;
}

.lightning-card .card-value {
    font-size: 3.2rem;
}

.sensor-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #28333e;
    font-size: 0.9rem;
}

.sensor-row:last-child {
    border-bottom: none;
}

.sensor-row strong {
    color: #7fdd9f;
}

footer {
    display: flex;
    justify-content: space-between;
    width: min(1200px, 92%);
    margin: 25px auto;
    padding: 20px 0;
    color: #71808f;
    font-size: 0.85rem;
}

.stale {
    color: #ffb74d !important;
}

.offline {
    color: #ff6262 !important;
}

@media (max-width: 850px) {

    .hero {
        grid-template-columns: 1fr 1fr;
    }

    .temperature {
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 1px solid #303b47;
        padding-bottom: 20px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 550px) {

    header {
        padding: 18px 4%;
    }

    header h1 {
        font-size: 1.4rem;
    }

    main {
        width: 94%;
        margin-top: 18px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .temperature {
        grid-column: auto;
    }

    .big-value {
        font-size: 4rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
        gap: 8px;
    }
}
