/**
 * 知周数字官网 · 极深蓝暗色主题
 * 在 main.css 之后加载，覆盖原「护眼底色」浅色样式
 */
:root {
  --web-bg-deep: #010818;
  --web-bg: #020d1f;
  --web-surface: #0a1628;
  --web-surface-2: #0f1f38;
  --web-border: #1a3358;
  --web-border-light: rgba(94, 140, 210, 0.28);
  --web-text: #e4ecf7;
  --web-text-muted: #8fa3c4;
  --web-text-dim: #5c7294;
  --web-accent: #5eb3ff;
  --web-accent-hover: #8ccaff;
  --web-brand: #7ec8ff;
  --web-price: #fbbf24;
  --web-success: #3b82f6;
  --web-tab-active: #2563eb;
}

html {
  color-scheme: dark;
}

body {
  color: var(--web-text) !important;
  background-color: var(--web-bg-deep) !important;
  background-image:
    radial-gradient(ellipse 100% 55% at 50% -8%, rgba(30, 64, 120, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(12, 35, 80, 0.35) 0%, transparent 48%),
    linear-gradient(180deg, var(--web-bg-deep) 0%, #00040c 100%) !important;
  background-attachment: fixed;
}

a {
  color: var(--web-accent);
}

a:hover,
a:focus {
  color: var(--web-accent-hover);
}

.col-gray {
  color: var(--web-text-muted) !important;
}

.col-red {
  color: var(--web-brand) !important;
}

.bg-white,
.bg-lgray,
.panel-primary > .panel-heading,
.contact .contactType .common,
#footer,
#copyright,
.newsList,
.newsDetail,
.teamDetail,
.caseList .tab1 #myTab li.active a,
.caseList #myTabContent .caseItem,
.caseList .tab1 ul li a,
.technicalTeam .team,
.contact .contactType,
.companyHonors .honnor,
.modal-content,
.dropdown-menu,
.navbar-style .nav .dropdown-menu li a,
#service .window-pop,
.intro-block,
.bd-gray {
  background-color: var(--web-surface) !important;
  color: var(--web-text);
}

body,
.caseList {
  background-color: transparent !important;
}

#innerHeader {
  background: rgba(6, 14, 32, 0.94) !important;
  border-bottom: 1px solid var(--web-border) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 5000 !important;
}

#innerHeader .navbar-style,
#innerHeader .navbar,
#innerHeader .container {
  position: relative;
  z-index: 5001;
}

#innerHeader .navbar-style .nav > li {
  position: relative;
  z-index: 5002;
}

#innerHeader .navbar-style .nav > li.open,
#innerHeader .navbar-style .nav > li:hover {
  z-index: 5010;
}

#innerHeader .dropdown-menu,
.nav.nav-digitalFactory > .dropdown-menu,
.nav.nav-thirdLevel > .dropdown-menu {
  z-index: 5020 !important;
  position: absolute !important;
}

.nav.nav-thirdLevel > a {
  color: var(--web-text-muted) !important;
}

#innerHeader.fixed {
  background: rgba(6, 14, 32, 0.98) !important;
  box-shadow: 0 4px 24px rgba(0, 8, 24, 0.5) !important;
}

#innerHeader .navbar-style .nav > li > a {
  color: var(--web-text) !important;
}

#innerHeader .navbar-style .nav > li.active a,
#innerHeader .navbar-style .nav > li > a:hover {
  color: var(--web-brand) !important;
}

.navbar-style .nav .open > a,
.navbar-style .nav li > a:focus {
  color: var(--web-accent) !important;
  background: transparent !important;
}

.dropdown-menu {
  border: 1px solid var(--web-border) !important;
  box-shadow: 0 12px 32px rgba(0, 8, 24, 0.55) !important;
}

.dropdown-menu > li > a {
  color: var(--web-text-muted) !important;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.tianken ul li a:hover {
  background: var(--web-surface-2) !important;
  color: var(--web-accent) !important;
}

.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background: rgba(37, 99, 235, 0.25) !important;
  color: var(--web-accent) !important;
}

.intro-block p,
.intro-block a,
.caseList p,
.caseList h3,
.caseList h5,
h1, h2, h3, h4, h5 {
  color: var(--web-text);
}

.intro-muted {
  color: var(--web-text-muted) !important;
}

.intro-link {
  color: var(--web-accent) !important;
}

.intro-link:hover {
  color: var(--web-accent-hover) !important;
}

#ca439-section .ca439-embed-wrap {
  border: 1px solid var(--web-border) !important;
  background: var(--web-bg-deep) !important;
  padding: 10px;
}

#swamp-stats-box,
.caseList [style*="border:1px solid #ccc"],
.caseList [style*="border: 1px solid #ccc"] {
  border-color: var(--web-border) !important;
  background: var(--web-surface) !important;
  color: var(--web-text-muted);
}

.caseList .tab ul li {
  border-color: var(--web-border) !important;
  background: var(--web-surface-2);
}

.caseList .tab ul a {
  color: var(--web-text-muted) !important;
}

.caseList .tab #myTab li.active,
.caseList .tab a:hover,
.caseList .tab a:focus {
  background: var(--web-tab-active) !important;
  border-color: var(--web-tab-active) !important;
}

.caseList .tab #myTab li.active a {
  color: #fff !important;
}

.caseList #myTabContent .caseItem {
  border: 1px solid var(--web-border) !important;
  box-shadow: 0 4px 20px rgba(0, 8, 24, 0.4) !important;
}

.caseList #myTabContent .caseItem h5 {
  color: var(--web-text) !important;
}

.caseList #myTabContent .caseItem:hover {
  border-color: var(--web-border-light) !important;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.2) !important;
}

/* 产品详情 / 弹窗 UEditor 富文本：后台白灰底 + 浅色字在暗色主题下不可读 */
.caseList #myTabContent #p_content {
  background: var(--web-surface) !important;
  border: 1px solid var(--web-border);
  border-radius: 8px;
  padding: 24px 28px;
  color: #e4ecf7 !important;
  line-height: 1.75;
}

.modal-body#p_content {
  color: #e4ecf7 !important;
  line-height: 1.75;
}

#p_content div,
#p_content p,
#p_content span,
#p_content section,
#p_content li,
#p_content font,
#p_content label {
  background-color: transparent !important;
  color: #e4ecf7 !important;
}

#p_content h1,
#p_content h2,
#p_content h3,
#p_content h4,
#p_content h5,
#p_content h6 {
  color: #f0f6ff !important;
}

#p_content strong,
#p_content b {
  color: #9ecfff !important;
}

#p_content a {
  color: var(--web-accent) !important;
}

#p_content a:hover,
#p_content a:focus {
  color: var(--web-accent-hover) !important;
}

#p_content table {
  background-color: transparent !important;
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
}

#p_content table td,
#p_content table th {
  background-color: transparent !important;
  border: 1px solid var(--web-border) !important;
  color: #e4ecf7 !important;
  padding: 8px 12px;
}

#p_content table th {
  color: #f0f6ff !important;
  font-weight: 700;
}

#p_content tr,
#p_content tbody,
#p_content thead,
#p_content tfoot {
  background-color: transparent !important;
}

#p_content img {
  max-width: 100%;
  height: auto;
}

#p_content .maptitle {
  color: #f0a060 !important;
}

#p_content .mapcontent {
  color: #c8d8ef !important;
}

/* 常见 UEditor inline 背景：统一透明，消除斑马纹 */
#p_content [style*="background-color:#fff"],
#p_content [style*="background-color: #fff"],
#p_content [style*="background-color:#FFF"],
#p_content [style*="background-color: #FFF"],
#p_content [style*="background-color:#ffffff"],
#p_content [style*="background-color: #ffffff"],
#p_content [style*="background:#fff"],
#p_content [style*="background: #fff"],
#p_content [style*="background:#FFF"],
#p_content [style*="background: #FFF"],
#p_content [style*="background:#ffffff"],
#p_content [style*="background: #ffffff"],
#p_content [style*="background-color:#f5f5f5"],
#p_content [style*="background-color: #f5f5f5"],
#p_content [style*="background:#f5f5f5"],
#p_content [style*="background: #f5f5f5"],
#p_content [style*="background-color:#f0f0f0"],
#p_content [style*="background-color: #f0f0f0"],
#p_content [style*="background:#f0f0f0"],
#p_content [style*="background: #f0f0f0"],
#p_content [style*="background-color:#eee"],
#p_content [style*="background-color: #eee"],
#p_content [style*="background:#eee"],
#p_content [style*="background: #eee"],
#p_content [style*="background-color:#fafafa"],
#p_content [style*="background-color: #fafafa"],
#p_content [style*="background:#fafafa"],
#p_content [style*="background: #fafafa"],
#p_content [style*="background-color:#e6f3e3"],
#p_content [style*="background-color: #e6f3e3"],
#p_content [style*="background:#e6f3e3"],
#p_content [style*="background: #e6f3e3"],
#p_content [style*="background-color:#e3f2fd"],
#p_content [style*="background-color: #e3f2fd"],
#p_content [style*="background:#e3f2fd"],
#p_content [style*="background: #e3f2fd"],
#p_content [style*="background-color:rgb(255"],
#p_content [style*="background-color: rgb(255"],
#p_content [style*="background:rgb(255"],
#p_content [style*="background: rgb(255"],
#p_content [style*="background-color:#0"],
#p_content [style*="background-color: #0"],
#p_content [style*="background:#0"],
#p_content [style*="background: #0"],
#p_content [style*="background-color:#1"],
#p_content [style*="background-color: #1"],
#p_content [style*="background:#1"],
#p_content [style*="background: #1"],
#p_content [style*="background-color:#2"],
#p_content [style*="background-color: #2"],
#p_content [style*="background:#2"],
#p_content [style*="background: #2"] {
  background-color: transparent !important;
  background: transparent !important;
  background-image: none !important;
  color: #e4ecf7 !important;
}

#p_content [bgcolor] {
  background-color: transparent !important;
  color: #e4ecf7 !important;
}

#p_content [color] {
  color: #e4ecf7 !important;
}

/* 兜底：剥除所有 inline 背景，仅保留容器纯色底 */
#p_content *:not(img):not(svg):not(video):not(circle):not(path):not(line):not(rect):not(ellipse) {
  background-color: transparent !important;
  background-image: none !important;
}

/* 新闻详情正文（同为 UEditor 输出） */
.newsDetail .per_txt_detail,
.newsDetail #content {
  color: #e4ecf7 !important;
  line-height: 1.75;
}

.newsDetail .per_txt_detail div,
.newsDetail .per_txt_detail p,
.newsDetail .per_txt_detail span,
.newsDetail .per_txt_detail li,
.newsDetail .per_txt_detail font,
.newsDetail #content div,
.newsDetail #content p,
.newsDetail #content span,
.newsDetail #content li,
.newsDetail #content font {
  background-color: transparent !important;
  color: #e4ecf7 !important;
}

.newsDetail .per_txt_detail a,
.newsDetail #content a {
  color: var(--web-accent) !important;
}

.newsDetail .per_txt_detail table td,
.newsDetail .per_txt_detail table th,
.newsDetail #content table td,
.newsDetail #content table th {
  background-color: transparent !important;
  border-color: var(--web-border) !important;
  color: #e4ecf7 !important;
}

.newsDetail .per_txt_detail *:not(img):not(svg):not(video),
.newsDetail #content *:not(img):not(svg):not(video) {
  background-color: transparent !important;
  background-image: none !important;
}

#service a {
  color: var(--web-text) !important;
}

#service .window-pop {
  background: rgba(10, 22, 40, 0.92) !important;
  color: var(--web-text) !important;
  border-top: 1px solid var(--web-border);
}

.newsList .news-home-item {
  background: #0f1f38 !important;
  border: 1px solid #2a4a78 !important;
  color: #f0f6ff !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.newsList .news-home-item:hover {
  border-color: var(--web-accent) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28) !important;
  text-decoration: none;
}

.newsList .news-home-pic-wrap {
  background: #0a1628 !important;
  border-bottom: 1px solid var(--web-border);
}

.newsList .news-home-title {
  color: #f0f6ff !important;
  background: #132a4a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  padding: 12px 14px !important;
  min-height: 48px;
}

.newsList h3.fontw-bold,
.newsList > .pd-10 > .container > h3 {
  color: #f0f6ff !important;
  font-size: 20px !important;
}

.newsList .newsItem .newsTxt h4,
.newsList .newsItem .newsTxt p,
.newsList .newsItem .newsTxt span {
  color: #e4ecf7 !important;
}

.newsList .newsItem {
  background: #0f1f38 !important;
  border: 1px solid #2a4a78 !important;
  box-shadow: 0 4px 16px rgba(0, 8, 24, 0.35) !important;
}

.newsList .newsItem:hover {
  border-color: var(--web-accent) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28) !important;
}

.newsList .col-md-12 > a {
  color: inherit !important;
  text-decoration: none !important;
  display: block;
}

.newsList .newsItem .newsTxt {
  padding: 12px 16px 14px 0;
}

.newsList .newsItem .newsTxt h4 {
  color: #f0f6ff !important;
  border-bottom: 2px solid var(--web-accent) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}

.newsList .newsItem .newsTxt p {
  color: #c8d8ef !important;
  line-height: 1.75 !important;
  font-size: 14px !important;
  margin-top: 10px !important;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.newsList .newsItem .newsTxt p strong,
.newsList .newsItem .newsTxt strong {
  color: #9ecfff !important;
  font-weight: 700 !important;
}

/* 后台简介若带 font/span 内联色，统一提亮 */
.newsList .newsItem .newsTxt p *,
.newsList .newsItem .newsTxt font {
  color: #c8d8ef !important;
}

.newsList .newsItem .newsPic {
  background: #0a1628 !important;
}

/* 首页右侧论坛/动态列表框 */
.swamp-stats-panel,
#swamp-stats-box {
  background: #0f1f38 !important;
  color: #e8f0fc !important;
}

#swamp-stats-box a,
#swamp-stats-box font,
#swamp-stats-box td,
#swamp-stats-box span,
#swamp-stats-box div {
  color: #dce8f8 !important;
}

#swamp-stats-box a:hover {
  color: var(--web-accent-hover) !important;
}

/* 首屏视频不遮挡导航下拉 */
.home-hero-video-col,
.home-hero-video-col video {
  position: relative;
  z-index: 1 !important;
}

.caseList:first-of-type,
.caseList:first-of-type .container,
.caseList:first-of-type .row {
  position: relative;
  z-index: 1;
}

.newsList .newsItem,
.newsDetail .perContent,
.teamDetail .perContent {
  border-color: var(--web-border) !important;
  background-color: #0f1f38 !important;
}

.panel-primary {
  border-color: var(--web-border) !important;
}

.panel-primary > .panel-heading {
  color: var(--web-text) !important;
}

#footer .footer-text h3,
#footer .footer-text h4,
#footer .footer-text p {
  color: var(--web-text-muted) !important;
}

#copyright {
  border-top: 1px solid var(--web-border) !important;
}

#copyright p,
#copyright a {
  color: var(--web-text-dim) !important;
}

#copyright a:hover {
  color: var(--web-accent) !important;
}

.modal-content {
  border: 1px solid var(--web-border) !important;
}

.modal-header {
  border-bottom-color: var(--web-border) !important;
}

.modal-footer {
  border-top-color: var(--web-border) !important;
}

.modal-title {
  color: var(--web-text) !important;
}

.form-control {
  background: var(--web-surface-2) !important;
  border-color: var(--web-border) !important;
  color: var(--web-text) !important;
}

.form-control::placeholder {
  color: var(--web-text-dim);
}

input[type='text'],
input[type='password'] {
  border-color: var(--web-border) !important;
  background: var(--web-surface-2) !important;
  color: var(--web-text) !important;
}

input:focus {
  outline-color: var(--web-accent) !important;
}

.btn-danger {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: #3b6fd4 !important;
}

.btn-default {
  background: var(--web-surface-2) !important;
  border-color: var(--web-border) !important;
  color: var(--web-text-muted) !important;
}

.alert-warning {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
  color: var(--web-price) !important;
}

.pager a {
  color: var(--web-accent) !important;
}

.scroll-to-top {
  background: var(--web-tab-active) !important;
  border-color: var(--web-tab-active) !important;
}

.scroll-to-top:hover,
.bd-btn-red:hover {
  background: var(--web-surface-2) !important;
  color: var(--web-accent) !important;
}

body::-webkit-scrollbar-thumb {
  background: rgba(94, 179, 255, 0.25);
}

body::-webkit-scrollbar-track {
  background: rgba(1, 8, 24, 0.6);
}

.sm-line {
  background: var(--web-tab-active) !important;
}

.tiankenContent [style*="background:#e6f3e3"] {
  background: var(--web-surface-2) !important;
}

.visitor-container {
  color: var(--web-text-dim);
}

.aboutHighDao .indeDevelopment .appContent,
.aboutHighDao .aboutFoot .aboutItem,
.newsDetail .perContent,
.newsDetail .news_detail_title,
.contact .contactType .common,
.contact .contactType .message {
  background-color: var(--web-surface) !important;
  border-color: var(--web-border) !important;
  color: var(--web-text) !important;
}

.aboutHighDao .tab ul li {
  border-color: var(--web-border) !important;
}

.aboutHighDao .tab ul li a {
  color: var(--web-text-muted) !important;
}

.aboutHighDao .tab a:hover,
.aboutHighDao .tab a:focus {
  background: var(--web-tab-active) !important;
  color: #fff !important;
}

.aboutHighDao .breadcrumb h3,
.newsDetail .news_detail_title h4,
.newsDetail .per_txt_detail {
  color: var(--web-text) !important;
}

.breadcrumb {
  background: var(--web-surface-2) !important;
  border-color: var(--web-border) !important;
}

.breadcrumb > li + li:before {
  color: var(--web-text-dim);
}

.breadcrumb a {
  color: var(--web-accent) !important;
}

.innerLogo {
  display: inline-block;
  line-height: 0;
  float: none !important;
  padding: 6px 0;
}

.innerLogo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 170px;
  filter: drop-shadow(0 2px 10px rgba(94, 179, 255, 0.28));
  transition: filter 0.2s ease;
}

.innerLogo:hover img {
  filter: drop-shadow(0 4px 14px rgba(94, 179, 255, 0.38));
}

/* 桌面端：LOGO 与菜单同一行并排 */
@media (min-width: 769px) {
  #innerHeader .navbar > .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }

  #innerHeader .navbar-header {
    flex-shrink: 0;
    float: none;
    margin: 0;
  }

  #innerHeader .navbar-toggle {
    display: none !important;
  }

  #innerHeader .navbar-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    flex: 1 1 auto;
    float: none !important;
    padding: 0;
  }

  #innerHeader .navbar-nav {
    float: none !important;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
  }

  #innerHeader .navbar-nav > li {
    float: none;
    padding: 4px 0;
  }

  #innerHeader .navbar-style .nav > li > a {
    padding: 0 10px;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
  }
}

/* 移动版：恢复 Bootstrap 折叠导航 */
@media (max-width: 768px) {
  #innerHeader .navbar > .container {
    display: block;
    position: relative;
  }

  #innerHeader .navbar-header {
    position: relative;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0;
    float: none;
  }

  #innerHeader .innerLogo {
    float: left;
    padding: 8px 0;
    max-width: calc(100% - 56px);
  }

  #innerHeader .innerLogo img {
    height: 36px;
    max-width: 150px;
  }

  #innerHeader .navbar-toggle {
    display: block;
    float: right;
    position: relative;
    right: auto;
    top: auto;
    margin: 10px 0 10px 8px;
    padding: 7px 10px;
    border: 1px solid var(--web-border) !important;
    border-radius: 4px;
    background: var(--web-surface-2);
  }

  #innerHeader .navbar-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px 0;
    background-color: var(--web-accent) !important;
    border-radius: 1px;
  }

  #innerHeader .navbar-collapse {
    clear: both;
    float: none !important;
    flex: none;
    padding: 0;
    border-top: 1px solid var(--web-border);
    margin-top: 4px;
    max-height: none;
  }

  #innerHeader .navbar-collapse.in,
  #innerHeader .navbar-collapse.collapsing {
    overflow: visible;
  }

  #innerHeader .navbar-nav {
    display: block;
    float: none !important;
    margin: 0;
    width: 100%;
  }

  #innerHeader .navbar-nav > li {
    display: block;
    float: none;
    padding: 0;
    border-bottom: 1px solid var(--web-border);
  }

  #innerHeader .navbar-nav > li:last-child {
    border-bottom: none;
  }

  #innerHeader .navbar-style .nav > li > a {
    display: block;
    padding: 12px 15px;
    font-size: 15px;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
  }

  #innerHeader .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    display: none;
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--web-bg-deep) !important;
  }

  #innerHeader .navbar-nav li.open > .dropdown-menu {
    display: block !important;
  }

  #innerHeader .navbar-nav .dropdown-menu > li > a {
    padding: 10px 15px 10px 28px;
    white-space: normal;
  }
}
