/* UV指数查询组件样式 */
.uv-index-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 搜索区域 */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
    background-color: #72ECEA;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.search-box {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-disclaimer {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

.search-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
    font-weight: 600;
}

.search-button:hover {
    background: #2563eb;
}

/* 主搜索结果区域 */
.main-result {
    max-width: 600px;
    margin: 0 auto 40px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: background-color 0.3s ease;
}

.main-result.level-low { background-color: #d1fae5; }
.main-result.level-moderate { background-color: #fef3c7; }
.main-result.level-high { background-color: #ffedd5; }
.main-result.level-very-high { background-color: #fee2e2; }
.main-result.level-extreme { background-color: #ede9fe; }

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.uv-index-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.uv-value {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.uv-level {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.uv-advice {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 25px;
    text-align: left;
}

.check-another {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
}

.check-another:hover {
    text-decoration: underline;
}

.update-time {
    font-size: 14px;
    color: #718096;
    margin-top: 20px;
}

/* 主要城市网格 */
.major-cities {
    margin-bottom: 40px;
}

.major-cities-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .cities-grid {
        grid-template-columns: 1fr;
    }
}

.city-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.city-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.city-card-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 5px;
}

.city-card-country {
    font-size: 14px;
    color: #666;
}

.city-card-value {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息 */
.error-message {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px 20px;
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #dc2626;
    text-align: center;
}

/* UV指数颜色 */
.level-low { background: #10b981; color: #064e3b; }
.level-moderate { background: #fbbf24; color: #92400e; }
.level-high { background: #f97316; color: #9a3412; }
.level-very-high { background: #ef4444; color: #7f1d1d; }
.level-extreme { background: #7c3aed; color: #4c1d95; }

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
    }

    .search-title,
    .major-cities-title {
        color: #e5e5e5;
    }

    .main-result,
    .city-card {
        background: #2d2d2d;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .city-info h2,
    .city-card-info h3 {
        color: #e5e5e5;
    }

    .country-name,
    .city-card-country {
        color: #a0a0a0;
    }

    .uv-advice {
        color: #d1d5db;
    }

    .update-time {
        color: #9ca3af;
    }

    .search-input {
        background: #2d2d2d;
        border-color: #404040;
        color: #e5e5e5;
    }

    .search-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }
} 