/* 页面级样式覆盖 - 确保良好的对比度和可读性 */

/* ===== 全局文字颜色修正 ===== */
body {
  color: #111827 !important;
  background-color: #f9fafb !important;
}

/* ===== 英雄区文字颜色例外 ===== */
.hero-area {
  color: #ffffff !important;
}

.hero-area h1,
.hero-area h1 a,
.hero-area .hero-title,
.hero-area .hero-title a {
  color: #ffffff !important;
  text-decoration: none !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
  /* 覆盖透明文字效果 */
  -webkit-text-fill-color: #ffffff !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  background: none !important;
  /* 确保链接可点击 */
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* 强制覆盖所有可能的样式冲突 */
.hero-area * {
  color: inherit !important;
}

/* ===== 卡片样式统一 ===== */
.card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.card-header {
  background-color: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.card-body {
  background-color: #ffffff !important;
  color: #111827 !important;
}

.card-title {
  color: #111827 !important;
  font-weight: 600 !important;
}

.card-text {
  color: #4b5563 !important;
}

/* ===== 工具卡片特殊处理 ===== */
.tool-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.tool-card .card-title {
  color: #111827 !important;
}

.tool-card .card-text {
  color: #4b5563 !important;
}

/* ===== IP资源卡片 ===== */
.ip-resource-card,
.ip-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.ip-resource-card .card-title,
.ip-card .card-title {
  color: #111827 !important;
}

.ip-resource-card .card-text,
.ip-card .card-text {
  color: #4b5563 !important;
}

/* ===== 跨境线路卡片 ===== */
.line-card,
.cross-border-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.line-card .card-title,
.cross-border-card .card-title {
  color: #111827 !important;
}

.line-card .card-text,
.cross-border-card .card-text {
  color: #4b5563 !important;
}

/* ===== 文章卡片 ===== */
.article-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.article-card .card-title {
  color: #111827 !important;
}

.article-card .card-text {
  color: #4b5563 !important;
}

/* ===== 产品卡片 ===== */
.product-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.product-card .card-title {
  color: #111827 !important;
}

.product-card .card-text {
  color: #4b5563 !important;
}

/* ===== 厂商卡片 ===== */
.vendor-card {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.vendor-card .card-title {
  color: #111827 !important;
}

.vendor-card .card-text {
  color: #4b5563 !important;
}

/* ===== 表格样式 ===== */
.table {
  background-color: #ffffff !important;
  color: #111827 !important;
}

.table th {
  background-color: #f9fafb !important;
  color: #111827 !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.table td {
  color: #4b5563 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f9fafb !important;
}

/* ===== 按钮样式 ===== */
.btn-primary {
  background-color: #4f46e5 !important;
  border-color: #4f46e5 !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background-color: #3730a3 !important;
  border-color: #3730a3 !important;
  color: #ffffff !important;
}

.btn-secondary {
  background-color: #6b7280 !important;
  border-color: #6b7280 !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background-color: #4b5563 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  color: #4f46e5 !important;
  border-color: #4f46e5 !important;
  background-color: transparent !important;
}

.btn-outline-primary:hover {
  background-color: #4f46e5 !important;
  border-color: #4f46e5 !important;
  color: #ffffff !important;
}

/* ===== 徽章样式 ===== */
.badge {
  font-weight: 500 !important;
}

.badge.bg-primary {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

.badge.bg-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

.badge.bg-warning {
  background-color: #f59e0b !important;
  color: #111827 !important;
}

.badge.bg-danger {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

.badge.bg-info {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

.badge.bg-secondary {
  background-color: #6b7280 !important;
  color: #ffffff !important;
}

/* ===== 分页样式 ===== */
.pagination .page-link {
  color: #4b5563 !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

.pagination .page-link:hover {
  color: #4f46e5 !important;
  background-color: #f9fafb !important;
  border-color: #4f46e5 !important;
}

.pagination .page-item.active .page-link {
  background-color: #4f46e5 !important;
  border-color: #4f46e5 !important;
  color: #ffffff !important;
}

.pagination .page-item.disabled .page-link {
  color: #9ca3af !important;
  background-color: #ffffff !important;
  border-color: #e5e7eb !important;
}

/* ===== 表单样式 ===== */
.form-control {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

.form-control:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
  background-color: #ffffff !important;
  color: #111827 !important;
}

.form-select {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

.form-select:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
  background-color: #ffffff !important;
  color: #111827 !important;
}

/* ===== 文字颜色类 ===== */
.text-muted {
  color: #6b7280 !important;
}

.text-secondary {
  color: #4b5563 !important;
}

.text-dark {
  color: #111827 !important;
}

.text-primary {
  color: #4f46e5 !important;
}

/* ===== 背景色类 ===== */
.bg-light {
  background-color: #f9fafb !important;
}

.bg-white {
  background-color: #ffffff !important;
}

.bg-secondary {
  background-color: #6b7280 !important;
}

/* ===== 链接样式 ===== */
a {
  color: #4f46e5 !important;
  text-decoration: none !important;
}

a:hover {
  color: #3730a3 !important;
  text-decoration: underline !important;
}

.card-title a {
  color: #111827 !important;
  text-decoration: none !important;
}

.card-title a:hover {
  color: #4f46e5 !important;
  text-decoration: none !important;
}

/* ===== 特殊区域样式 ===== */
.filter-section {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.hero-stats {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #111827 !important;
}

.stat-value {
  color: #111827 !important;
}

.stat-label {
  color: #4b5563 !important;
}
