:root {
    --color-bg-base: #111827; 
    --color-container-blur: rgba(255, 255, 255, 0.05);
    --color-text-main: #f3f4f6;
    --color-text-secondary: #9ca3af; 
    --color-aqi-good: #10b981; 
    --color-aqi-mod: #f59e0b; 
    --color-aqi-sens: #f87171; 
    --color-aqi-unhealth: #ef4444; 
    --transition-standard: 0.3s ease-in-out;
    --animation-slow: 15s linear infinite;
}


body {
    font-family: 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden; 
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 30% 30%, var(--color-aqi-good), transparent 70%),
                radial-gradient(circle at 70% 70%, var(--color-bg-base), transparent 80%),
                linear-gradient(135deg, #1f2937, #111827);
    filter: blur(100px) opacity(0.3); 
    z-index: -2;
    transition: background-color var(--transition-standard);
}

body::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundShift var(--animation-slow);
    z-index: -1;
    opacity: 0.5;
}

.container {
    background: var(--color-container-blur);
    backdrop-filter: blur(15px); 
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 
                inset 0 0 15px rgba(255,255,255,0.05); 
    text-align: center;
    max-width: 500px;
    width: 90%;
    transition: transform 0.5s ease;
    animation: fadeInContainer 1s ease-out;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

p {
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    justify-content: center;
}

input {
    padding: 12px 15px;
    flex-grow: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 8px;
    transition: var(--transition-standard);
}

input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

button {
    padding: 12px 20px;
    background-color: rgba(255,255,255, 0.05);
    color: white;
    font-weight: bold;
    border: 1px solid rgba(255,255,255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-standard);
}

button:hover {
    background-color: rgba(255,255,255, 0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
    transform: translateY(-1px);
}
.aqi-circle {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: 900;
    margin: 1.5rem auto;
    color: white;
    transition: all 0.5s ease-out;
   
    background: radial-gradient(circle at 40% 40%, rgba(255,255,255,0.2), transparent 70%),
                radial-gradient(circle at 70% 70%, var(--color-aqi-good), transparent 80%),
                #111827;
    border: 3px solid transparent;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6), 
                inset 0 0 20px rgba(255,255,255,0.05);
}
.aqi-circle.good-pulse { box-shadow: 0 15px 45px rgba(16, 185, 129, 0.4), inset 0 0 20px rgba(255,255,255,0.05); }
.aqi-circle.mod-pulse { box-shadow: 0 15px 45px rgba(245, 158, 11, 0.4), inset 0 0 20px rgba(255,255,255,0.05); }
.aqi-circle.unhealth-pulse { box-shadow: 0 15px 45px rgba(248, 113, 113, 0.4), inset 0 0 20px rgba(255,255,255,0.05); }


.aqi-circle::before {
    content: '';
    position: absolute;
    top: -5%; left: -5%; width: 110%; height: 110%;
    background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 70%);
    border-radius: 50%;
    animation: orbGlow 4s linear infinite;
    z-index: -1;
}

#cityName {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#aqiStatus {
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-top: 0;
    padding: 4px 12px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: inline-block;
}

.hidden { display: none; }

.error {
    color: #f87171;
    margin-top: 2rem;
    font-size: 0.9rem;
    padding: 10px;
    background-color: rgba(248, 113, 113, 0.1);
    border-radius: 8px;
}

@keyframes fadeInContainer {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes orbGlow {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.05); opacity: 0.4; }
}

@keyframes backgroundShift {
    from { transform: translate(0, 0); }
    to { transform: translate(-50px, -50px); }
}
