* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    transition: background 0.5s ease;
    padding: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    color: white;
    padding: 2.5em;
    border-radius: 25px;
    width: 100%;
    max-width: 450px;
    margin: 1em;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-title {
    text-align: center;
    margin-bottom: 1.5em;
    font-size: 2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.search {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn {
    margin-left: 0.5em;
    border-radius: 50%;
    border: none;
    height: 50px;
    width: 50px;
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

input.searchbar {
    border: none;
    outline: none;
    padding: 0.8em 1.2em;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-family: inherit;
    font-size: 1em;
    flex: 1;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

input.searchbar::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

input.searchbar:focus {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.02);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.search-btn:active {
    transform: scale(0.95);
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    padding: 0.8em;
    border-radius: 10px;
    margin-top: 1em;
    text-align: center;
    display: none;
    font-size: 0.9em;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

h1.temp {
    margin: 0;
    margin-bottom: 0.3em;
    font-size: 3.5em;
    font-weight: 700;
}

h2.city {
    font-size: 1.8em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.flex {
    display: flex;
    align-items: center;
    margin-bottom: 1.5em;
}

.icon {
    width: 80px;
    height: 80px;
}

.description {
    text-transform: capitalize;
    margin-left: 10px;
    font-size: 1.3em;
    font-weight: 500;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item {
    text-align: center;
}

.detail-label {
    font-size: 0.85em;
    opacity: 0.8;
    margin-bottom: 0.5em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.humidity, .wind, .feels-like {
    font-size: 1.2em;
    font-weight: 600;
}

.weather.loading {
    visibility: visible;
    max-height: none;
    position: relative;
}

.weather.loading .welcome-message {
    display: block;
}

.weather.loading.fetching {
    visibility: hidden;
    max-height: 20px;
}

.weather.loading.fetching:after {
    visibility: visible;
    content: "Loading...";
    color: white;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    animation: pulse 1.5s ease-in-out infinite;
}

.welcome-message {
    text-align: center;
    padding: 2em 0;
}

.welcome-message h2 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

.welcome-message p {
    font-size: 1em;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .card {
        padding: 1.5em;
    }
    
    .app-title {
        font-size: 1.5em;
    }
    
    h1.temp {
        font-size: 2.5em;
    }
    
    .details {
        grid-template-columns: 1fr;
        gap: 0.8em;
    }
    
    .forecast-cards {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4em;
    }
    
    .forecast-card {
        padding: 0.8em 0.2em;
    }
    
    .forecast-date {
        font-size: 0.7em;
    }
    
    .forecast-icon {
        width: 35px;
        height: 35px;
    }
    
    .forecast-temps {
        font-size: 0.85em;
    }
}

.sun-times {
    display: flex;
    justify-content: space-around;
    margin: 1.5em 0;
    padding: 1em;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.sun-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.sun-time {
    font-size: 1.2em;
    font-weight: 600;
}

.forecast-container {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.forecast-title {
    font-size: 1.3em;
    margin-bottom: 1em;
    text-align: center;
    font-weight: 600;
}

.forecast-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6em;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1em 0.3em;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.forecast-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.forecast-date {
    font-size: 0.8em;
    margin-bottom: 0.3em;
    font-weight: 600;
    opacity: 0.9;
}

.forecast-icon {
    width: 45px;
    height: 45px;
    margin: 0.2em auto;
    display: block;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
    margin-top: 0.3em;
    font-size: 0.95em;
}

.temp-max {
    font-weight: 700;
    font-size: 1.1em;
}

.temp-min {
    opacity: 0.6;
    font-size: 1em;
}