* {
    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: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.weather-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.location-info {
    text-align: center;
    margin-bottom: 30px;
}

.location-info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.location-info h2 i {
    color: #667eea;
    margin-right: 10px;
}

.location-info p {
    color: #666;
    font-size: 1.1rem;
}

.weather-main {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.temperature {
    font-size: 4rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 10px;
}

.weather-description {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    color: #666;
}

.weather-description i {
    font-size: 2rem;
    color: #f39c12;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    transition: transform 0.2s;
}

.detail-item:hover {
    transform: translateY(-2px);
}

.detail-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.detail-item span {
    flex: 1;
    color: #666;
}

.detail-item strong {
    color: #333;
    font-size: 1.1rem;
}

.update-time {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.error-message {
    text-align: center;
    padding: 40px 0;
    color: #e74c3c;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.retry-btn:hover {
    background: #5a6fd8;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-btn:hover {
    background: #5a6fd8;
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: auto;
    padding-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .weather-card {
        padding: 20px;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
}

/* 天气图标动画 */
.weather-description i {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 卡片进入动画 */
.weather-content {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 