:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f9f9f9;
    --text-color: #333;
    --shadow-color: rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
input::placeholder {
    color: #aaa;
    font-size: 14px;
}
input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}


.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow-color);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in-out;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-in-out;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 1s ease-in-out;
}

.prediction-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
    width: 100%;
    max-width: 800px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f5f5f5;
    font-size: 1rem;
    color: #444;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn i {
    margin-right: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.result-section {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
    display: none;
}

.result-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
    padding: 2rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

.aqi-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.aqi-description {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.scale-container {
    width: 100%;
    height: 20px;
    background: linear-gradient(to right, 
        #00e400, /* Good */
        #ffff00, /* Moderate */
        #ff7e00, /* Unhealthy for Sensitive Groups */
        #ff0000, /* Unhealthy */
        #99004c, /* Very Unhealthy */
        #7e0023  /* Hazardous */
    );
    border-radius: 10px;
    margin: 1.5rem 0;
    position: relative;
}

.scale-marker {
    position: absolute;
    width: 12px;
    height: 24px;
    background-color: white;
    border: 2px solid #333;
    border-radius: 3px;
    top: -2px;
    transform: translateX(-50%);
    transition: left 1s ease;
    left: 20%; /* This will be set by JS */
}

.recommendation-section {
    margin-top: 2rem;
    text-align: left;
}

.recommendation-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.info-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
    width: 100%;
    max-width: 800px;
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.info-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pollutant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.pollutant-card {
    background-color: #f0f8ff;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.pollutant-card:hover {
    transform: translateY(-5px);
}

.pollutant-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

footer {
    background-color: #333;
    color: #fff;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.footer-links a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    margin-bottom: 1.5rem;
}

.social-icons a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .prediction-card {
        padding: 1.5rem;
    }
    .location-input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background-color: #f5f5f5;
        font-size: 1rem;
        color: #444;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }
    
    .location-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        outline: none;
    }
    
    .location-input::placeholder {
        color: #999;
    }
}
.aqi-values p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.aqi-values .aqi-value {
    font-weight: bold;
    color: var(--primary-color);
}
