* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            #1E3C72 0%,
            #2A5298 25%,
            #4A90E2 50%,
            #5BA3F5 75%,
            #87CEEB 100%);
    background-size: 500% 500%;
    animation: gradientShift 20s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Sun Animation */
.sun {
    position: fixed;
    top: 10%;
    right: 15%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8),
        0 0 100px rgba(255, 215, 0, 0.4),
        0 0 150px rgba(255, 215, 0, 0.2);
    animation: sunPulse 4s ease-in-out infinite;
    z-index: -1;
}

.sun::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    border-radius: 50%;
    animation: sunRotate 8s linear infinite;
}

@keyframes sunPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes sunRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Cloud Animations */
.cloud {
    position: fixed;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5));
    border-radius: 100px;
    z-index: -1;
    animation: cloudFloat 20s infinite linear;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
    border-radius: 100px;
}

.cloud1 {
    width: 80px;
    height: 40px;
    top: 20%;
    left: -100px;
    animation-duration: 25s;
}

.cloud1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud1::after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud2 {
    width: 100px;
    height: 50px;
    top: 35%;
    left: -120px;
    animation-duration: 30s;
    animation-delay: -10s;
}

.cloud2::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 15px;
}

.cloud2::after {
    width: 70px;
    height: 50px;
    top: -20px;
    right: 15px;
}

.cloud3 {
    width: 70px;
    height: 35px;
    top: 60%;
    left: -90px;
    animation-duration: 35s;
    animation-delay: -20s;
}

.cloud3::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 10px;
}

.cloud3::after {
    width: 50px;
    height: 35px;
    top: -15px;
    right: 10px;
}

@keyframes cloudFloat {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: -10s;
}

.shape:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 70%;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-30px) rotate(120deg);
    }

    66% {
        transform: translateY(20px) rotate(240deg);
    }

    100% {
        transform: translateY(0px) rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

.header h1 {
    font-size: 3.5em;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -2px;
}

.header p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.search-container {
    margin-bottom: 30px;
    animation: slideUp 1s ease-out 0.2s both;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    border-radius: 50px;
    padding: 15px 25px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.search-box:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(30, 60, 114, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-input {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 18px;
    width: 300px;
    padding: 5px 15px;
    font-weight: 300;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.6);
    background: linear-gradient(135deg, #357ABD, #2A5298);
}

.weather-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.25),
            rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(30px);
    border-radius: 30px;
    padding: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 30px 100px rgba(30, 60, 114, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 50px rgba(135, 206, 235, 0.1);
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: scaleIn 0.8s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.weather-card:hover::before {
    left: 100%;
}

.location {
    font-size: 2.5em;
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.temperature {
    font-size: 5em;
    color: white;
    font-weight: 200;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.weather-icon {
    font-size: 6em;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.weather-description {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 300;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.3),
            rgba(135, 206, 235, 0.2));
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.detail-item:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4),
            rgba(135, 206, 235, 0.3));
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(30, 60, 114, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.detail-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.detail-value {
    font-size: 1.4em;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading {
    display: none;
    text-align: center;
    color: white;
    font-size: 1.2em;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
    }

    .search-input {
        width: 200px;
    }

    .temperature {
        font-size: 3.5em;
    }

    .weather-icon {
        font-size: 4em;
    }

    .main-weather {
        flex-direction: column;
        gap: 15px;
    }

    .weather-card {
        padding: 25px;
    }
}