@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #2e1a4c, #1b1433);
}

#card {
    background: #8957D1;
    background: linear-gradient(145deg, rgba(137, 87, 209, 1) 0%, rgba(55, 50, 167, 1) 52%);
    height: 550px;
    width: 400px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    box-shadow: 20px 20px 60px #6b4f9c, -20px -20px 60px #a77ce0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    border: none;
}

#card:hover {
    transform: translateY(-5px);
    box-shadow: 25px 25px 70px #6b4f9c, -25px -25px 70px #a77ce0;
}

#card input {
    outline: none;
    width: 80%;
    border-radius: 50px;
    height: 50px;
    margin-top: 60px;
    border: none;
    padding: 0 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#card input:focus {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#card input::placeholder {
    color: rgba(137, 87, 209, 0.7);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px;
}

#weather-icon {
    height: 80px;
    width: 80px;
    margin-top: 40px;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

#weather-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

#temperature {
    font-size: 4em;
    color: #ffffff;
    font-weight: 700;
    margin-top: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

#temperature:hover {
    color: #f0f0f0;
}

#weather-info {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.9);
}

#condition {
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#location-name {
    font-size: 1em;
    font-weight: 400;
    opacity: 0.8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 480px) {
    #card {
        width: 350px;
        height: 500px;
        margin: 20px;
    }
    
    #temperature {
        font-size: 3.2em;
    }
    
    #card input {
        width: 85%;
        height: 45px;
        margin-top: 50px;
    }
    
    #weather-icon {
        height: 70px;
        width: 70px;
        margin-top: 35px;
    }
}

/* Loading Animation */
.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Input Focus Animation */
#card input:focus {
    animation: inputGlow 0.5s ease-in-out;
}

@keyframes inputGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(137, 87, 209, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(137, 87, 209, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(137, 87, 209, 0);
    }
}