:root { 
    --primary:#4361ee;
    --secondary:#3f37c9;
    --dark:#1e1e24;
    --light:#f8f9fa;
    --danger:#ef233c;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #a8edea,#fed6e3);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

.weather-app {
    max-width: 800px;
    margin:0 auto;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.search-container {
    display: flex;
    padding: 20px;
    background: rgba(255,255,255,0.3);
}

#city-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: rgba(255,255,255,0);
}

button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    margin-left: 10px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.weather-display {
    padding: 20px;
}

.current-weather {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.weather-main {
    flex: 1;
}

.location {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.date {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
}

.temperature {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.conditions {
    font-size: 1.2rem;
    color: #555;
}

.weather-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

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

.detail {
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.detail i {
    margin-left: 10px;
    color: var(--primary);
}

.forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(100px, 1fr));
    gap: 15px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.forecast-day {
    font-weight: 600;
    margin-bottom: 5px;
}

.forecast-icon img {
    width: 50px;
    height: 50px;
    margin: 5px 0;
}

.forecast-temp {
    display: flex;
    justify-content: space-around;
}

.forecast-high {
    color: var(--danger);
    font-weight: 600;
}

.forecast-low {
    color: var(--primary);
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    display: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600) {
    .current-weather {
        flex-direction: column;
        text-align: center;
    }

.weather-icon {
    margin-top: 20px;
}

.temperature {
    font-size: 2.5rem;
}
}