.gauge-container {
    position: relative;
    width: 600px;
    height: 100px;
    margin: 30px auto;
}
.air-pollution-title {
    text-align: center;
    margin: 16px auto 20px auto;
    font-size: 27px;
    display: flex;
    justify-content: center;
    line-height: 25px;
}
.air-pollution-page {
    display: flex;
    justify-content: center;
    margin: 25px auto 0px auto;
    align-items: center;
    text-align: center;
}
.gauge {
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, green 0%, green 10%, yellow 30%, orange 50%, red 70%, darkred 100%);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.scale {
    position: absolute;
    top: -17px;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    flex-direction: row-reverse;
}

.scale div {
    position: relative;
    width: 0px;
    height: 9px;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    text-align: center;
}
.scale div:first-child span {
    left: -2px;
}
.scale div span {
    position: absolute;
    top: -11px;
    left: -7px;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.5);
}

.needle {
    position: absolute;
    top: -10px;
    left: 0;
    width: 4px;
    height: 60px;
    background: black;
    border-radius: 2px;
    transition: left 1s ease-in-out, top 1s ease-in-out;
}

.aqi-value {
    position: absolute;
    top: -35px;
    left: 0;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: bold;
    color: black;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s, left 1s ease-in-out, top 1s ease-in-out;
}

.labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 10px;
    line-height: 18px;
    flex-direction: row-reverse;
}

.labels span {
    width: 58%;
    text-align: center;
    direction: ltr;
}

@media (max-width: 480px) {
    .gauge-container {
        width: 88px;
        height: 600px;
        display: flex;
        margin: 35px auto;
        flex-direction: row-reverse;
    }

    .gauge {
        width: 20px;
        height: 100%;
        background: linear-gradient(to top, green 0%, green 10%, yellow 30%, orange 50%, red 70%, darkred 100%);
    }

    .scale {
        padding: 13px 6px;
        top: 0;
        left: -23px;
        height: 100%;
        width: 24px;
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .scale div {
        width: 9px;
        height: 0px;
        border-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.2);
    }

    .scale div span {
        position: absolute;
        top: -7px;
        left: -18px;
        font-size: 8px;
        color: rgba(0, 0, 0, 0.5);
    }

    .needle {
        left: 8px;
        top: 0;
        width: 60px;
        height: 4px;
    }

    .aqi-value {
        left: -50px;
        top: 0;
        transform: translateY(-50%);
    }

    .labels {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        margin-top: 0;
        justify-content: space-around;
    }

    .labels span {
        text-align: center;
        margin-bottom: 10px;
        line-height: 1.8;
        font-size: 10px;
        word-wrap: break-word;
    }
}