* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.demo-banner {
    background: rgba(255, 193, 7, 0.95);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.update-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#update-time {
    color: #666;
    font-size: 0.9rem;
}

.refresh-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

section h3 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

/* 当前天气 */
.weather-card.current {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.weather-icon {
    font-size: 6rem;
    line-height: 1;
}

.weather-info {
    flex: 1;
    min-width: 250px;
}

.temperature {
    font-size: 4rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.description {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 20px;
}

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

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.detail-item .label {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-item .value {
    display: block;
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 未来7天预报 */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

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

.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.forecast-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.forecast-icon {
    font-size: 3rem;
    margin: 10px 0;
}

.forecast-temp {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.forecast-desc {
    font-size: 0.9rem;
    color: #666;
}

/* 24小时预报 */
.hourly-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.hourly-scroll::-webkit-scrollbar {
    height: 8px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.hourly-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    min-width: 100px;
    flex-shrink: 0;
}

.hourly-time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.hourly-icon {
    font-size: 2rem;
    margin: 10px 0;
}

.hourly-temp {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
}

footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .weather-card.current {
        flex-direction: column;
        text-align: center;
    }

    .weather-icon {
        font-size: 5rem;
    }

    .temperature {
        font-size: 3rem;
    }

    .description {
        font-size: 1.2rem;
    }

    .details {
        grid-template-columns: repeat(2, 1fr);
    }

    .forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}
