* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.weather-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.rain-drop {
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.8), transparent);
    border-radius: 2px;
    animation: rain 1s infinite linear;
}

@keyframes rain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.snow-flake {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: snow 8s infinite linear;
}

@keyframes snow {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.main-content {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.search-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1.1rem;
    border-radius: 50px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.weather-display {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.weather-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.main-weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-weather-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.weather-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

#clock {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-top: 5px;
}

.temperature {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.weather-description {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-transform: capitalize;
}

.location-name {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.details-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.detail-item:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.detail-item:hover::before {
    left: 100%;
}

.detail-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.forecast-section {
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
}

.forecast-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.error {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .weather-display {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    .main-weather-card,
    .details-card {
        padding: 2rem;
    }
    .temperature {
        font-size: 3rem;
    }
    .header h1 {
        font-size: 2rem;
    }
}


/* Weather-specific animations */

.sunny-bg {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #dc2626 100%);
}

.rainy-bg {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #312e81 100%);
}

.cloudy-bg {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
}

.snowy-bg {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
}