/* Custom Weather Icons CSS - Icons8 Integration */
.weather-icon {
    display: inline-block;
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
    transition: all 0.3s ease;
    width: 3rem;
    height: 3rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.weather-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.5));
}

/* Weather Icon Mappings - Icons8 */
.icon-sunny,
.icon-clear {
    background-image: url('https://img.icons8.com/fluency/96/sun.png');
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.4));
}

.icon-partly-cloudy {
    background-image: url('https://img.icons8.com/fluency/96/partly-cloudy-day.png');
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.4));
}

.icon-cloudy,
.icon-overcast {
    background-image: url('https://img.icons8.com/fluency/96/cloud.png');
    filter: drop-shadow(0 0 10px rgba(156, 163, 175, 0.4));
}

.icon-rain,
.icon-drizzle {
    background-image: url('https://img.icons8.com/fluency/96/rain.png');
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.4));
}

.icon-thunderstorm {
    background-image: url('https://img.icons8.com/fluency/96/storm.png');
    filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.4));
}

.icon-snow,
.icon-sleet,
.icon-hail {
    background-image: url('https://img.icons8.com/fluency/96/snow.png');
    filter: drop-shadow(0 0 10px rgba(219, 234, 254, 0.4));
}

.icon-mist,
.icon-fog {
    background-image: url('https://img.icons8.com/fluency/96/fog-day.png');
    filter: drop-shadow(0 0 10px rgba(156, 163, 175, 0.4));
}

.icon-wind {
    background-image: url('https://img.icons8.com/fluency/96/wind.png');
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.4));
}

.icon-night-clear {
    background-image: url('https://img.icons8.com/fluency/96/moon-and-stars.png');
    filter: drop-shadow(0 0 10px rgba(147, 197, 253, 0.4));
}

.icon-night-partly-cloudy {
    background-image: url('https://img.icons8.com/fluency/96/partly-cloudy-night.png');
    filter: drop-shadow(0 0 10px rgba(147, 197, 253, 0.4));
}

/* Detail Card Icons - Icons8 */
.detail-icon.humidity {
    background-image: url('https://img.icons8.com/fluency/48/humidity.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.detail-icon.wind {
    background-image: url('https://img.icons8.com/fluency/48/wind.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
}

.detail-icon.visibility {
    background-image: url('https://img.icons8.com/fluency/48/visible.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(156, 163, 175, 0.3));
}

.detail-icon.pressure {
    background-image: url('https://img.icons8.com/fluency/48/barometer.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
}

.detail-icon.cloud-cover {
    background-image: url('https://img.icons8.com/fluency/48/cloud.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(156, 163, 175, 0.3));
}

.detail-icon.wind-direction {
    background-image: url('https://img.icons8.com/fluency/48/compass.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
}

/* Header Icons - Icons8 */
.search-icon svg {
    display: none;
}

.search-icon::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('https://img.icons8.com/fluency-systems-regular/24/search.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1) opacity(0.6);
}

.location-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.location-btn-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('https://img.icons8.com/fluency-systems-regular/24/marker.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
}

.search-btn svg {
    display: none;
}

.search-btn::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-image: url('https://img.icons8.com/fluency-systems-regular/24/chevron-right.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
}

/* Landing Page Feature Icons - Icons8 */
.feature-icon.earth {
    background-image: url('https://img.icons8.com/pastel-glyph/64/FFFFFF/earth-planet.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-icon.location {
    background-image: url('https://img.icons8.com/pastel-glyph/64/FFFFFF/marker--v2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.feature-icon.forecast {
    background-image: url('https://img.icons8.com/glyph-neue/64/FFFFFF/chance-of-storm.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* CTA Button Icon */
.cta-button svg {
    display: none;
}

.cta-button::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('https://img.icons8.com/fluency-systems-regular/24/chevron-right.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
    transition: transform 0.3s ease;
}

.cta-button:hover::after {
    transform: translateX(3px);
}

/* Animated weather effects */
@keyframes float-weather {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.weather-icon {
    animation: float-weather 3s ease-in-out infinite;
}

/* Loading animation for icons */
.weather-icon.loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .weather-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 2.5rem;
    }
    
    .detail-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .search-icon::before {
        width: 18px;
        height: 18px;
    }
    
    .location-btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .search-btn::before {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .weather-icon {
        width: 2rem;
        height: 2rem;
        font-size: 2rem;
    }
    
    .detail-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
    }
    
    .search-icon::before {
        width: 16px;
        height: 16px;
    }
    
    .location-btn-icon {
        width: 16px;
        height: 16px;
    }
    
    .search-btn::before {
        width: 12px;
        height: 12px;
    }
    
    .cta-button::after {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .feature-icon {
        width: 32px;
        height: 32px;
    }
    
    .search-icon::before {
        width: 14px;
        height: 14px;
    }
    
    .location-btn-icon {
        width: 14px;
        height: 14px;
    }
    
    .search-btn::before {
        width: 10px;
        height: 10px;
    }
    
    .cta-button::after {
        width: 16px;
        height: 16px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .search-icon::before,
    .location-btn-icon::before,
    .search-btn::before,
    .feature-icon,
    .weather-icon,
    .detail-icon,
    .cta-button::after {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Fallback for older browsers */
@supports not (background-image: url('https://img.icons8.com/fluency/48/earth-planet.png')) {
    .feature-icon.earth::before {
        content: '🌍';
        font-size: 24px;
    }
    
    .feature-icon.location::before {
        content: '📍';
        font-size: 24px;
    }
    
    .feature-icon.forecast::before {
        content: '🔮';
        font-size: 24px;
    }
}