/* Weather App CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.app-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Search Container */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.search-box {
    display: flex;
    margin-bottom: 15px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#cityInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background: white;
}

#searchBtn {
    background: #74b9ff;
    border: none;
    padding: 15px 20px;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

#searchBtn:hover {
    background: #0984e3;
}

.location-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #00cec9, #00b894);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading and Error States */
.loading, .error-message {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.loading i {
    font-size: 2rem;
    color: #74b9ff;
    margin-bottom: 10px;
}

.error-message {
    background: rgba(255, 99, 99, 0.1);
    border: 1px solid rgba(255, 99, 99, 0.3);
}

.error-message i {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 10px;
}

/* Weather Card */
.weather-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.location-info h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #2d3436;
}

.location-info p {
    color: #636e72;
    margin-bottom: 3px;
}

.weather-icon img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.main-weather {
    text-align: center;
    margin-bottom: 30px;
}

.temperature {
    font-size: 4rem;
    font-weight: bold;
    color: #74b9ff;
    margin-bottom: 10px;
}

.temp-unit {
    font-size: 2rem;
    color: #636e72;
}

.weather-description p:first-child {
    font-size: 1.3rem;
    color: #2d3436;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.weather-description p:last-child {
    color: #636e72;
    font-size: 1rem;
}

/* Weather Details Grid */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    background: rgba(116, 185, 255, 0.15);
}

.detail-item i {
    font-size: 1.2rem;
    color: #74b9ff;
    margin-right: 12px;
    width: 20px;
}

.detail-item span:nth-child(2) {
    flex: 1;
    color: #636e72;
    font-size: 0.9rem;
}

.detail-item span:last-child {
    font-weight: bold;
    color: #2d3436;
}

/* Forecast Card */
.forecast-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.forecast-card h3 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.forecast-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.forecast-item:hover {
    transform: translateY(-5px);
    background: rgba(116, 185, 255, 0.15);
}

.forecast-day {
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.forecast-icon img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.forecast-high {
    font-weight: bold;
    color: #e17055;
}

.forecast-low {
    color: #74b9ff;
}

/* Recent Searches */
.recent-searches {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.recent-searches h3 {
    color: #2d3436;
    margin-bottom: 15px;
}

.recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-item {
    padding: 8px 15px;
    background: rgba(116, 185, 255, 0.1);
    border: 1px solid rgba(116, 185, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.recent-item:hover {
    background: rgba(116, 185, 255, 0.2);
    transform: translateY(-1px);
}

/* Footer */
.app-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .weather-header {
        flex-direction: column;
        text-align: center;
    }
    
    .location-info {
        margin-bottom: 20px;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .detail-item {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 15px;
    }
    
    #cityInput {
        border-radius: 15px 15px 0 0;
    }
    
    #searchBtn {
        border-radius: 0 0 15px 15px;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.8rem;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    }
    
    .weather-card, .forecast-card, .recent-searches, .search-container {
        background: rgba(45, 52, 54, 0.95);
        color: #ddd;
    }
    
    .location-info h2, .forecast-card h3, .recent-searches h3 {
        color: #ddd;
    }
    
    .detail-item {
        background: rgba(116, 185, 255, 0.2);
    }
    
    .welcome-message {
        background: rgba(45, 52, 54, 0.95);
        color: #ddd;
    }
}

/* Welcome Message */
.welcome-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.welcome-content h2 {
    color: #2d3436;
    font-size: 2rem;
    margin-bottom: 15px;
}

.welcome-content p {
    color: #636e72;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.weather-icon-large {
    font-size: 4rem;
    color: #74b9ff;
    margin-bottom: 20px;
    display: block;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 10px;
    min-width: 120px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-3px);
}

.feature i {
    font-size: 1.5rem;
    color: #74b9ff;
}

.feature span {
    font-size: 0.9rem;
    color: #2d3436;
    font-weight: 500;
}

/* Responsive design for welcome message */
@media (max-width: 768px) {
    .welcome-message {
        padding: 30px 20px;
    }
    
    .welcome-features {
        gap: 15px;
    }
    
    .feature {
        min-width: 100px;
        padding: 12px;
    }
    
    .welcome-content h2 {
        font-size: 1.7rem;
    }
    
    .welcome-content p {
        font-size: 1rem;
    }
}
