* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.weather-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
}

.app-title {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.app-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.search-container {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.city-search-input {
    background: transparent;
    border: none;
    padding: 15px 20px;
    font-size: 1.1rem;
    color: white;
    width: 300px;
    outline: none;
}

.city-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button,
.location-button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.search-button:hover,
.location-button:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.main-weather-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out 0.4s both;
    transition: all 0.3s ease;
}

.main-weather-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.current-location {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.current-date {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.weather-icon-container {
    margin: 20px 0;
    animation: float 3s ease-in-out infinite;
}

.main-weather-icon {
    font-size: 5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.current-temperature {
    font-size: 4rem;
    font-weight: 300;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-description {
    font-size: 1.5rem;
    text-transform: capitalize;
    margin-bottom: 10px;
    font-weight: 400;
}

.feels-like-temp {
    font-size: 1rem;
    opacity: 0.8;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.weather-detail-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.weather-detail-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

.detail-title {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.detail-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.forecast-section {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.forecast-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.forecast-day {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.forecast-icon {
    font-size: 2.5rem;
    margin: 10px 0;
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.forecast-high {
    font-weight: 600;
}

.forecast-low {
    opacity: 0.7;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    display: none;
}

.unit-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.unit-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }

    .city-search-input {
        width: 200px;
    }

    .main-weather-card {
        padding: 20px;
    }

    .current-temperature {
        font-size: 3rem;
    }

    .weather-details-grid {
        grid-template-columns: 1fr;
    }
}
