* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-color: #ffffff;
    --accent-color: #00f2fe;
}

body {
    min-height: 100 vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    background-attachment: fixed;
    transition: background 1s ease;
    padding: 20px;
}

/* Dynamic Backgrounds */
body.clear-day { background: linear-gradient(135deg, #fceabb 0%, #f8b500 100%); }
body.clear-night { background: linear-gradient(135deg, #2c3e50 0%, #000000 100%); }
body.cloudy { background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%); }
body.rainy { background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%); }
body.snowy { background: linear-gradient(135deg, #e6dada 0%, #274046 100%); }
body.stormy { background: linear-gradient(135deg, #141e30 0%, #243b55 100%); }

.container {
    width: 100%;
    max-width: 450px;
}

.weather-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    text-align: center;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 20px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.search-box i {
    font-size: 1.2rem;
    color: var(--text-color);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 10px;
    color: var(--text-color);
    font-size: 1rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.1);
}

/* Weather Info */
.location-date h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.location-date p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.weather-main {
    margin: 30px 0;
}

.weather-icon img {
    width: 150px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.temp-condition h1 {
    font-size: 4.5rem;
    font-weight: 600;
    margin: 10px 0;
}

.temp-condition p {
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: capitalize;
}

/* Weather Details */
.weather-details {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-item i {
    font-size: 1.8rem;
}

.detail-item .text {
    text-align: left;
}

.detail-item span {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.detail-item p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* States */
.loading, .error-message {
    display: none;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--text-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ff4d4d;
}

/* Responsive */
@media (max-width: 480px) {
    .weather-card {
        padding: 30px 20px;
    }

    .temp-condition h1 {
        font-size: 3.5rem;
    }

    .weather-icon img {
        width: 120px;
    }

    .detail-item i {
        font-size: 1.5rem;
    }
}
