/* 币圈新闻网模版 — 参考 biquans.com.cn 布局重写 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body, div, span, h1, h2, h3, h4, p, a, ul, li, img, nav, header, section, aside, article, footer {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 14px;
  font-weight: inherit;
  vertical-align: baseline;
}

body {
  font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", SimSun, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

ul, ol, li {
  list-style: none;
}

a {
  text-decoration: none;
  color: #666;
  outline: none;
}

a:hover {
  color: #00a4ff;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
  border: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.pull-left { float: left; }
.pull-right { float: right; }

.p40 { padding-top: 40px; padding-bottom: 40px; }
.p30 { padding-top: 30px; padding-bottom: 30px; }
.mb50 { margin-bottom: 50px; }
.mb40 { margin-bottom: 40px; }
.mb30 { margin-bottom: 30px; }
.mb20 { margin-bottom: 20px; }
.mb10 { margin-bottom: 10px; }
.mt20 { margin-top: 20px; }

/* Header */
#header {
  position: relative;
  background-color: rgba(64, 63, 60, 0.92);
}

#header .container,
#header .header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  gap: 12px;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  order: 3;
  flex-shrink: 0;
}

.header-logo {
  order: 1;
  max-width: 42%;
  flex-shrink: 0;
}

.header-menu {
  order: 2;
  margin-left: auto;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
  border-color: #00a4ff;
  color: #00a4ff;
}

.lang-toggle-icon {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
}

.lang-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

.lang-overlay[hidden],
.lang-panel[hidden] {
  display: none !important;
}

.lang-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 48px));
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lang-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #eef2f6;
}

.lang-panel-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.lang-panel-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.lang-search {
  margin: 12px 18px 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.lang-search:focus {
  border-color: #00a4ff;
}

.lang-list {
  padding: 8px 12px 16px;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.lang-option {
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f7f9fc;
  color: #333;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover {
  border-color: #cfe9ff;
  color: #00a4ff;
}

.lang-option.is-active {
  background: #eaf6ff;
  border-color: #00a4ff;
  color: #00a4ff;
  font-weight: 600;
}

.lang-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #999;
  padding: 20px 0;
  font-size: 14px;
}

html[dir="rtl"] .header-menu {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .lang-option {
  text-align: right;
}

html[dir="rtl"] .con-title a.more {
  right: auto;
  left: 0;
}

html[dir="rtl"] .new-list li {
  padding-left: 0;
  padding-right: 16px;
}

html[dir="rtl"] .new-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .content {
  padding-right: 0;
  padding-left: 50px;
  border-right: 0;
  border-left: 1px solid #e1e8f0;
}

html[dir="rtl"] .side-col {
  padding-left: 0;
  padding-right: 10px;
}

.header-logo h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.logo-url {
  display: flex;
  align-items: center;
  line-height: 65px;
  gap: 10px;
}

.logo-url img {
  vertical-align: middle;
  max-height: 50px;
  width: auto;
  display: inline-block;
}

.logo-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 65px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00a4ff, #0077cc);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.header-menu > ul {
  display: flex;
  align-items: center;
}

.header-menu > ul > li {
  position: relative;
}

.header-menu > ul > li > a {
  display: inline-block;
  padding: 0 20px;
  color: #fff;
  line-height: 65px;
  font-size: 14px;
  white-space: nowrap;
}

.header-menu > ul > li.current > a,
.header-menu > ul > li > a:hover {
  color: #00a4ff;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 9px;
  transition: 0.2s;
}

.nav-toggle span { top: 19px; }
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  left: 0;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

/* Layout */
.layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.main-col {
  flex: 1 1 75%;
  min-width: 0;
  width: 75%;
}

.side-col {
  flex: 0 0 25%;
  width: 25%;
  padding-left: 10px;
}

.content {
  padding-right: 50px;
  border-right: 1px solid #e1e8f0;
  min-height: 600px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
}

.news-box {
  min-width: 0;
}

.con-title {
  margin-bottom: 20px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e4e9f0;
  position: relative;
}

.con-title h3,
.con-title h3 a {
  line-height: 1;
  font-size: 18px;
  color: #666;
  font-weight: 700;
}

.con-title a.more {
  position: absolute;
  right: 0;
  top: 2px;
  line-height: 16px;
  color: #00a4ff;
  font-size: 14px;
}

.new-list {
  overflow: hidden;
}

.new-list li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 16px;
  box-sizing: border-box;
}

.new-list li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  margin-top: -2px;
  width: 5px;
  height: 5px;
  background-color: #00a4ff;
  border-radius: 50%;
  overflow: hidden;
}

.new-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 100%;
  font-size: 16px;
  color: #666;
}

.new-list li a .title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-list li a .date,
.new-list li a span {
  flex: 0 0 auto;
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}

.new-list li a:hover {
  color: #00a4ff;
}

/* Sidebar */
.sidebar aside {
  margin-bottom: 30px;
}

.sidebar aside:last-child {
  margin-bottom: 0;
}

.sidebar h3.widget-title {
  margin-bottom: 12px;
  font-size: 16px;
  color: #666;
  font-weight: 600;
}

.contact-card {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.contact-card img {
  width: 100%;
  height: auto;
  display: block;
}

.sidebar .new-list li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Breadcrumb */
.crumbs {
  color: #bbb;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 14px;
}

.crumbs a {
  color: #bbb;
}

.crumbs a:hover {
  color: #00a4ff;
}

/* Article */
.single-header h1 {
  font-size: 24px;
  line-height: 1.4;
  font-weight: 700;
  color: #333;
}

.single-meta {
  overflow: hidden;
  color: #999;
  padding: 10px 0;
  font-size: 13px;
}

.single-meta .time,
.single-meta .author {
  margin-right: 10px;
  line-height: 36px;
}

.entry-content p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.75;
  color: #666;
  text-align: justify;
  word-break: break-all;
}

.entry-content p strong {
  color: #333;
  font-weight: 700;
}

#nav-single {
  overflow: hidden;
  margin: 20px 0;
}

#nav-single .nav-previous,
#nav-single .nav-next {
  height: 30px;
  line-height: 30px;
  overflow: hidden;
  color: #666;
}

#nav-single .nav-previous { float: left; }
#nav-single .nav-next { float: right; }

.post-tags {
  font-size: 12px;
  color: #999;
}

.post-tags a {
  font-size: 12px;
  color: #999;
  margin-right: 10px;
}

.post-tags a:hover {
  color: #00a4ff;
}

.single-info {
  color: #ac9da2;
  font-size: 12px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e4e9f0;
  line-height: 1.8;
}

.single-xg {
  padding-bottom: 40px;
  border-bottom: 1px solid #e4e9f0;
}

.single-xg .con-title {
  border: none;
}

.category-list li {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e1e8f0;
  overflow: hidden;
}

.category-list li h2 a {
  font-size: 18px;
  color: #333;
  font-weight: 700;
  margin-bottom: 14px;
  display: block;
}

.category-list li:hover h2 a {
  color: #2277da;
}

.category-list li p {
  max-height: 74px;
  line-height: 1.75;
  color: #666;
  text-align: justify;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.category-list .meta {
  margin-top: 10px;
  color: #999;
  font-size: 13px;
}

.pagination {
  margin: 20px auto 0;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  border: 1px solid #eee;
  padding: 10px 20px;
  margin: 0 1px;
  background: #fff;
  color: #666;
}

.pagination .current {
  background: #00a4ff;
  color: #fff;
  border-color: #00a4ff;
}

/* Footer */
#footer {
  background: #2e3033;
}

.footer-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 15px;
  margin-bottom: 10px;
}

.footer-menu ul li a {
  display: inline-block;
  font-size: 12px;
  line-height: 26px;
  color: #ccc;
  white-space: nowrap;
}

.footer-menu ul li a:hover {
  color: #00a4ff;
}

.copyr p {
  color: #ccc;
  font-size: 13px;
}

/* Mobile */
@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .header-logo {
    max-width: calc(100% - 140px);
  }

  #langCurrentLabel {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 65px;
    background: #403f3c;
    z-index: 100;
    padding: 8px 0 16px;
    margin-left: 0;
    order: 4;
    width: 100%;
  }

  .lang-list {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .header-menu {
    margin-right: 0;
  }

  html[dir="rtl"] .content {
    padding-left: 10px;
    border-left: none;
  }

  .header-menu.open {
    display: block;
  }

  .header-menu > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .header-menu > ul > li > a {
    display: block;
    line-height: 44px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .layout {
    flex-direction: column;
  }

  .main-col,
  .side-col {
    width: 100%;
    flex: none;
  }

  .side-col {
    padding-left: 0;
    margin-top: 30px;
  }

  .content {
    padding: 0 10px;
    border-right: none;
    min-height: 0;
  }

  .p40 { padding-top: 20px; padding-bottom: 20px; }
  .p30 { padding-top: 15px; padding-bottom: 15px; }
  .mb50 { margin-bottom: 25px; }

  .new-list li a {
    font-size: 15px;
  }

  .new-list li a .date,
  .new-list li a span {
    display: none;
  }

  .single-header h1 {
    font-size: 20px;
  }
}
