* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    position: relative;
    min-height: 100vh;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Background Elements */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -2;
}

.weather-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -3;
    transition: all 0.8s ease;
}

/* Weather Background Themes */
.weather-bg.sunny {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #e17055 100%);
}

.weather-bg.cloudy {
    background: linear-gradient(135deg, #ddd6fe 0%, #8b5cf6 50%, #5b21b6 100%);
}

.weather-bg.rainy {
    background: linear-gradient(135deg, #4a9eff 0%, #0078ff 50%, #0052cc 100%);
}

.weather-bg.snowy {
    background: linear-gradient(135deg, #e8f4f8 0%, #b8dce8 50%, #7cc7d8 100%);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.app-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.app-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 0.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1.1rem;
    outline: none;
    font-weight: 400;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn, .location-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.search-btn:hover, .location-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.search-icon, .location-icon {
    font-size: 1.2rem;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    color: white;
    margin: 3rem 0;
}

.loading.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    color: white;
    margin: 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-message.show {
    display: block;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Main Weather Display */
.weather-main {
    display: none;
}

.weather-main.show {
    display: block;
}

/* Current Weather Card */
.current-weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.current-weather-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.location-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.location-pin {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.location-name {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.current-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.weather-icon-container {
    text-align: center;
}

.weather-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.temperature-info {
    text-align: center;
}

.current-temp {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.weather-description {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
    font-weight: 500;
}

.feels-like {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Weather Details Grid */
.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.detail-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

/* Forecast Section */
.forecast-section {
    margin-bottom: 2rem;
}

.forecast-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.forecast-date {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-weight: 500;
}

.forecast-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.forecast-high {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.forecast-low {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
}

.forecast-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: capitalize;
}

/* Hourly Section */
.hourly-section {
    margin-bottom: 2rem;
}

.hourly-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.hourly-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hourly-scroll::-webkit-scrollbar {
    display: none;
}

.hourly-card {
    flex: 0 0 120px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.hourly-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.hourly-time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.hourly-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.hourly-temp {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-title {
        font-size: 2.5rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
    }
    
    .current-weather {
        flex-direction: column;
        gap: 1rem;
    }
    
    .current-temp {
        font-size: 3rem;
    }
    
    .weather-icon {
        font-size: 4rem;
    }
    
    .weather-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-grid {
        grid-template-columns: 1fr;
    }
    
    .location-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0.5rem;
    }
    
    .current-weather-card {
        padding: 1.5rem;
    }
    
    .weather-details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .api-notice {
        padding: 1rem;
        font-size: 0.9rem;
    }
}