* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.weather-card {
    padding: 30px;
}

.location-section {
    margin-bottom: 30px;
}

.location-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#cityInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#cityInput:focus {
    border-color: #74b9ff;
    box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.1);
}

#searchBtn, #locationBtn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#searchBtn:hover, #locationBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.4);
}

#locationBtn {
    width: 100%;
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

#locationBtn:hover {
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
}

.weather-info {
    text-align: center;
}

.loading {
    padding: 40px;
    font-size: 18px;
    color: #666;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.city-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 20px;
}

.main-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.temperature {
    font-size: 4rem;
    font-weight: 300;
    color: #2d3436;
    display: flex;
    align-items: flex-start;
}

.unit {
    font-size: 2rem;
    margin-top: 10px;
    color: #636e72;
}

.weather-icon img {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.weather-desc {
    font-size: 1.4rem;
    color: #636e72;
    font-weight: 500;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    background: rgba(116, 185, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(116, 185, 255, 0.2);
    transform: translateY(-2px);
}

.detail-item .label {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-item .value {
    font-size: 1.2rem;
    color: #2d3436;
    font-weight: 600;
}

.error-message {
    padding: 30px;
    color: #e17055;
    font-size: 16px;
    background: rgba(225, 112, 85, 0.1);
    border-radius: 15px;
    margin: 20px 0;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #636e72;
    font-size: 0.9rem;
}

.update-time {
    margin-top: 5px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .weather-card {
        padding: 20px;
    }
    
    .main-weather {
        flex-direction: column;
        gap: 15px;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .location-input {
        flex-direction: column;
    }
    
    #searchBtn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
}