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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0d1117 0%, #1a1f2e 100%);
    color: #e0e6ed;
    min-height: 100vh;
    padding-bottom: 20px;
}

.container {
    max-width: 430px;
    margin: 0 auto;
    padding: 16px;
}

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #30363d;
    margin-bottom: 24px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #58a6ff 0%, #79c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.city-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #30363d;
    border-radius: 8px;
    background: #161b22;
    color: #e0e6ed;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.city-input:focus {
    border-color: #58a6ff;
}

.city-input::placeholder {
    color: #8b949e;
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #58a6ff 0%, #1f6feb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 80px;
    touch-action: manipulation;
}

.search-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.4);
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #30363d;
    border-top-color: #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    font-size: 16px;
    color: #8b949e;
}

/* 错误提示 */
.error {
    background: #da3633;
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* 天气信息 */
.weather-info {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 2px solid #30363d;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.city-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #79c0ff;
}

.current-weather {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #30363d;
}

.temperature {
    display: flex;
    align-items: flex-start;
}

.temp-value {
    font-size: 56px;
    font-weight: 700;
    color: #58a6ff;
    line-height: 1;
}

.temp-unit {
    font-size: 24px;
    margin-top: 8px;
    color: #8b949e;
}

.weather-desc {
    flex: 1;
}

.desc-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #e0e6ed;
}

.feels-like {
    font-size: 14px;
    color: #8b949e;
}

/* 天气详情 */
.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    background: #0d1117;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #30363d;
}

.detail-label {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: #79c0ff;
}

/* 预报 */
.forecast {
    margin-top: 24px;
}

.forecast h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #e0e6ed;
}

.forecast-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.forecast-item {
    flex-shrink: 0;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    min-width: 100px;
}

.forecast-time {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 8px;
}

.forecast-temp {
    font-size: 18px;
    font-weight: 600;
    color: #79c0ff;
    margin-bottom: 4px;
}

.forecast-desc {
    font-size: 12px;
    color: #8b949e;
}

/* 快速查询 */
.quick-cities {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 2px solid #30363d;
    border-radius: 12px;
    padding: 20px;
}

.quick-cities h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #e0e6ed;
}

.city-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-btn {
    padding: 12px 16px;
    background: #0d1117;
    color: #79c0ff;
    border: 2px solid #30363d;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
}

.quick-btn:active {
    background: #30363d;
    border-color: #58a6ff;
    transform: scale(0.98);
}

/* 响应式 */
@media (max-width: 375px) {
    .container {
        padding: 12px;
    }

    header h1 {
        font-size: 24px;
    }

    .temp-value {
        font-size: 48px;
    }

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

    .city-buttons {
        grid-template-columns: 1fr;
    }
}
