* {
    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 {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-box input:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.search-box button {
    padding: 15px 20px;
    background: #00b894;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-box button:hover {
    background: #00a085;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.location-btn {
    text-align: center;
}

.location-btn button {
    padding: 12px 25px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.location-btn button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.weather-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading {
    text-align: center;
    color: white;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.weather-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-weather {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.location-info h2 {
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 5px;
}

.location-info p {
    color: #636e72;
    font-size: 0.9rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.temperature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.temperature span {
    font-size: 3rem;
    font-weight: bold;
    color: #2d3436;
}

.weather-icon i {
    font-size: 3rem;
    color: #f39c12;
}

.weather-desc p:first-child {
    font-size: 1.2rem;
    color: #2d3436;
    margin-bottom: 5px;
}

.weather-desc p:last-child {
    color: #636e72;
    font-size: 0.9rem;
}

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

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.detail-item i {
    color: #74b9ff;
    width: 20px;
    text-align: center;
}

.detail-item span:nth-child(2) {
    flex: 1;
    color: #636e72;
}

.detail-item span:last-child {
    font-weight: bold;
    color: #2d3436;
}

.forecast-section h3 {
    margin-bottom: 20px;
    color: #2d3436;
    text-align: center;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.forecast-item {
    text-align: center;
    padding: 20px 10px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.forecast-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.forecast-item .day {
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 10px;
}

.forecast-item .forecast-icon {
    font-size: 2rem;
    color: #f39c12;
    margin: 10px 0;
}

.forecast-item .temp-range {
    color: #636e72;
    font-size: 0.9rem;
}

.forecast-item .high-temp {
    font-weight: bold;
    color: #2d3436;
}

.error-message {
    text-align: center;
    color: white;
    background: rgba(231, 76, 60, 0.9);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .current-weather {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .weather-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-box input,
    .search-box button {
        width: 100%;
    }
    
    .forecast-container {
        grid-template-columns: 1fr;
    }
}