/* Keep navbar item with id="forecast" unaffected */
nav #forecast{
    display: block;
    background: transparent;
    height: auto;
    width: auto;
}

/* Actual forecast section layout */
body > #forecast{
    display: none;
    background:
        radial-gradient(circle at 88% 6%, rgba(147, 197, 253, 0.12), transparent 38%),
        radial-gradient(circle at 12% 92%, rgba(96, 165, 250, 0.08), transparent 34%),
        linear-gradient(135deg, #0B1221 0%, #16213E 100%);
    min-height: 100vh;
    width: 100%;
}

#forecast-background{
    background: rgba(11, 18, 33, 0.58);
    backdrop-filter: blur(15px);
    box-sizing: border-box;
    width: min(1200px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    border-radius: 12px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 34px 36px 30px;
}

#forecast-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#forecast-back-btn{
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #f8fbff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#forecast-back-btn:hover{
    background: rgba(255, 255, 255, 0.2);
}

#forecast-city{
    color: #dbeafe;
    font-size: 15px;
    font-weight: 600;
}

#forecast-background h1{
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, #ffffff 0%, #e2ecff 48%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 18px rgba(96, 165, 250, 0.22);
}

.card{
    background: linear-gradient(152deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.23);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 18px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#aqi-card{
    padding: 20px 24px;
    margin-bottom: 18px;
    border-top: 2px solid rgba(125, 211, 252, 0.62);
}

#aqi-card h2{
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

#aqi-value{
    font-size: 22px;
    font-weight: 700;
    color: #e2ecff;
}

#forecast-top{
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 16px;
}

#aqi-card,
#atmosphere-card{
    height: 100%;
}

#atmosphere-card{
    padding: 20px 24px;
    border-top: 2px solid rgba(125, 211, 252, 0.62);
}

#atmosphere-card h2{
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.atmosphere-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-info{
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-info h3{
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #eff6ff;
}

.mini-info p{
    font-size: 18px;
    font-weight: 700;
    color: #dbeafe;
}

#gas-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 24px;
    align-items: stretch;
}

.gas-card{
    position: relative;
    overflow: hidden;
    background: linear-gradient(152deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    color: white;
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28);
    padding: 16px 18px;
    min-height: 108px;
    border-left: 4px solid rgba(147, 197, 253, 0.84);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gas-card h3{
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.28;
    color: #f8fbff;
}

.gas-card p{
    font-size: 18px;
    font-weight: 700;
    color: #dbeafe;
    line-height: 1.3;
    word-break: break-word;
}

.gas-card::before{
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    top: -34px;
    right: -34px;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.2), transparent 72%);
    pointer-events: none;
}

.gas-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
    border-left-color: #bfdbfe;
}

@media (max-width: 1100px){
    #forecast-top{
        grid-template-columns: 1fr;
    }

    #gas-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px){
    #gas-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px){
    #forecast-background{
        padding: 24px 16px 20px;
        border-radius: 0;
    }

    #forecast-header{
        flex-direction: column;
        align-items: flex-start;
    }

    #forecast-background h1{
        font-size: 30px;
    }

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

    #gas-grid{
        grid-template-columns: 1fr;
    }
}
