/* 大众化亲民设计 - 温和友好的视觉风格 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* SEO优化样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* 结构化数据友好的标题样式 */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* 关键词友好的样式 */
.keyword-highlight {
    background: linear-gradient(120deg, #ffebee 0%, #fce4ec 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* 页面加载性能优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 可访问性优化 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 统一的渐变背景样式 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
}

.bg-gradient-primary h4, 
.bg-gradient-primary h5,
.bg-gradient-primary small,
.bg-gradient-primary .text-light,
.bg-gradient-primary .text-white,
.bg-gradient-primary * {
    color: white !important;
}

/* 特别修复标题栏白字问题 */
.card-header.bg-gradient-primary,
.card-header.bg-gradient-primary h4,
.card-header.bg-gradient-primary h5,
.card-header.bg-gradient-primary i {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #42A5F5 0%, #1976D2 100%) !important;
}

/* 卡片样式 - 简约友好 */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: white;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border-color: #d32f2f;
}

/* 按钮样式 - 更温和友好 */
.btn {
    border-radius: 20px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #8e0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-outline-primary {
    border: 2px solid #d32f2f;
    color: #d32f2f;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #d32f2f;
    color: white;
    transform: translateY(-2px);
}

/* 表格样式 - 清晰易读 */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: white;
    margin-bottom: 2rem;
}

.table th {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
    font-size: 15px;
}

.table td {
    vertical-align: middle;
    padding: 15px;
    border-color: #f1f3f4;
    font-size: 14px;
}

.table-hover tbody tr:hover {
    background-color: #f8fffe;
    transition: background-color 0.2s ease;
}

/* 分数显示优化 */
.score-good { color: #d32f2f; font-weight: bold; }
.score-medium { color: #FF9800; font-weight: bold; }
.score-poor { color: #f44336; font-weight: bold; }

/* 进度条样式 */
.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* 自定义样式，不干扰Bootstrap布局 */
.progress-tracker {
    margin-top: 20px;
}

.progress-item {
    margin-bottom: 15px;
}

.progress-item span {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

/* 确保卡片正常显示 */
.card {
    margin-bottom: 20px;
}

/* 导航样式 - 清晰友好 */
.navbar {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: white !important;
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: bold;
    color: #d32f2f !important;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 20px;
    margin: 0 5px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.navbar-nav .nav-link:hover {
    color: #d32f2f !important;
    background-color: #ffebee;
}

/* 表单样式增强 - 提升用户体验 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border-radius: 12px;
    border: 2px solid #ffebee;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-size: 16px;
    background: #fafafa;
}

.form-control:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.25);
    background: white;
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: #ef5350;
    background: white;
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.search-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.search-suggestion-item:hover {
    background-color: #f8f9fa;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

/* Jumbotron样式 - 温和友好 */
.jumbotron {
    border-radius: 20px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    box-shadow: 0 8px 32px rgba(211, 47, 47, 0.3);
    padding: 3rem 2rem;
}

/* 图标颜色 - 统一红色主题 */
.text-primary i, .fa-database { color: #d32f2f !important; }
.text-success i, .fa-chart-line { color: #d32f2f !important; }
.text-info i, .fa-calculator { color: #1976D2 !important; }
.text-warning i, .fa-users { color: #FF9800 !important; }

/* 功能图标优化 */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.feature-icon.analysis { background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%); color: #d32f2f; }
.feature-icon.valuation { background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%); color: #1976D2; }
.feature-icon.accessible { background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%); color: #F57C00; }

/* 进度条样式 - 友好的红色主题 */
.progress {
    height: 12px;
    border-radius: 10px;
    background-color: #ffebee;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transition: width 0.6s ease;
}

/* 警告框样式 - 温和色彩 */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
}

.alert-success { background: #ffebee; color: #d32f2f; }
.alert-danger { background: #ffebee; color: #d32f2f; }
.alert-info { background: #e3f2fd; color: #1976d2; }
.alert-warning { background: #fff3e0; color: #f57c00; }

/* 徽章样式 */
.badge {
    font-size: 0.8em;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 500;
}

.badge-danger {
    background-color: #d32f2f;
    color: white;
}

/* 通俗易懂的提示框 */
.user-tip {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    color: #d32f2f;
}

.user-tip .tip-title {
    font-weight: bold;
    color: #b71c1c;
    margin-bottom: 0.5rem;
}

/* 简化的数据展示 */
.data-highlight {
    background: linear-gradient(135deg, #fff 0%, #fffafa 100%);
    border: 2px solid #d32f2f;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

.data-highlight .value {
    font-size: 2rem;
    font-weight: bold;
    color: #d32f2f;
    display: block;
}

.data-highlight .label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 { font-size: 2rem; }
    .card-body { padding: 1.5rem; }
    .btn-lg { padding: 10px 25px; font-size: 1rem; }
    .jumbotron { padding: 2rem 1rem; }
    .feature-icon { width: 60px; height: 60px; font-size: 1.5rem; }
}

/* 动画效果 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeInUp 0.6s ease-out; }

/* 图片样式 */
.img-fluid {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 确保布局稳定 */
div { position: static !important; top: auto !important; }

/* 确保图表容器可见 */
#industry-comparison-chart,
#financial-trends-chart {
    min-height: 400px !important;
    background-color: #ffffff !important;
}

/* 增大图表字体 */
.plotly .main-svg {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif !important;
    font-size: 18px !important;
}
