/* 燕云十六声攻略网 — 门户清爽版（参考手游门户站布局） */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html {
  background: #f0f0f0;
  text-align: center;
}

body {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  font: 14px/1.6 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #f5f5f5;
}

a {
  color: #333;
  text-decoration: none;
}

a:hover {
  color: #ff6b00 !important;
}

img { border: 0; max-width: 100%; }

ul, ol, p, h1, h2, h3 { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.portal-inner {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* 页头 */
.portal-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.portal-logo {
  font-size: 22px;
  font-weight: 700;
  color: #222 !important;
  letter-spacing: 1px;
}

.portal-logo:hover { color: #ff6b00 !important; }

.portal-logo em {
  font-style: normal;
  color: #ff6b00;
}

.portal-nav ul {
  display: flex;
  gap: 4px;
}

.portal-nav li {
  float: none !important;
  background: none !important;
  line-height: 64px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  border: none !important;
}

.portal-nav li a {
  display: block;
  padding: 0 20px;
  color: #444 !important;
  border-bottom: 3px solid transparent;
  height: 64px;
  line-height: 64px;
}

.portal-nav li a:hover {
  color: #ff6b00 !important;
  text-decoration: none !important;
  background: none !important;
}

.portal-nav li.curr a {
  color: #ff6b00 !important;
  border-bottom-color: #ff6b00;
  background: none !important;
  font-weight: 700;
}

/* 主内容区 */
.portal-main {
  padding: 16px 0 24px;
}

.portal-hero-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-hero {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.portal-hero-pic {
  position: relative;
  background: #1a1a2e;
  min-height: 320px;
}

.portal-hero-pic #ehdplayBox {
  width: 100% !important;
  height: 320px !important;
  margin: 0 !important;
}

.portal-hero-pic #ehdplayBox .ehdoUlplayfont {
  left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  font-size: 18px !important;
}

.portal-hero-pic #ehdplayBox .ehdsmalltitle { width: 100% !important; }

.portal-hero-pic #ehdplayBox .ehdsmalltitle .ehdthistitle {
  background: #ff6b00 !important;
}

.portal-hero-desc {
  padding: 14px 18px;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
  border-top: 1px solid #f0f0f0;
}

.portal-hero-desc strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.portal-hero-desc strong a { color: #222 !important; font-weight: 700; }
.portal-hero-desc strong a:hover { color: #ff6b00 !important; }

.portal-sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* 卡片 */
.portal-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.portal-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.portal-card-hd .icon-hot::before {
  content: "🔥 ";
}

.portal-card-hd .badge-new {
  background: #ff6b00;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 6px;
}

.portal-card-hd .more {
  font-size: 13px;
  font-weight: 400;
  color: #999 !important;
}

.portal-card-hd .more:hover { color: #ff6b00 !important; }

.portal-card-bd { padding: 8px 0; }

/* 热门攻略编号列表 */
.portal-hot-list li {
  padding: 10px 16px 10px 42px;
  position: relative;
  border-bottom: 1px dashed #f0f0f0;
  line-height: 1.5;
  counter-increment: hotrank;
}

.portal-hot-list { counter-reset: hotrank; }

.portal-hot-list li::before {
  content: counter(hotrank);
  position: absolute;
  left: 16px;
  top: 10px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #ccc;
  border-radius: 3px;
}

.portal-hot-list li:nth-child(1)::before { background: #ff4444; }
.portal-hot-list li:nth-child(2)::before { background: #ff7744; }
.portal-hot-list li:nth-child(3)::before { background: #ffaa44; }

.portal-hot-list li a {
  font-size: 14px;
  color: #333 !important;
}

.portal-hot-list li a:hover { color: #ff6b00 !important; }

/* 横向滚动游戏卡 */
.portal-scroll {
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px;
  overflow-x: auto;
}

.portal-scroll table { border: 0; }
.portal-scroll td { padding: 0 6px 0 0; vertical-align: top; }

.portal-scroll img {
  border-radius: 6px;
  display: block;
}

.portal-scroll a {
  display: block;
  font-size: 13px;
  margin-top: 6px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 游戏列表卡 */
.portal-game-list .portal-game-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  align-items: center;
}

.portal-game-item img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.portal-game-info { flex: 1; min-width: 0; }

.portal-game-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-game-info h4 a { color: #333 !important; }

.portal-game-meta {
  font-size: 12px;
  color: #999;
}

.portal-btn-dl {
  display: inline-block;
  padding: 4px 14px;
  background: #ff6b00;
  color: #fff !important;
  border-radius: 4px;
  font-size: 12px;
  flex-shrink: 0;
}

.portal-btn-dl:hover {
  background: #e55d00;
  color: #fff !important;
}

/* 双栏 */
.portal-two-col {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-two-col > .portal-card { flex: 1; min-width: 0; }

/* 攻略/资讯网格 */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 12px 16px 16px;
}

.portal-grid-item {
  background: #fafafa;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .2s;
}

.portal-grid-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.portal-grid-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: #ddd;
}

.portal-grid-item p {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  height: 46px;
  overflow: hidden;
}

.portal-grid-item a { color: #333 !important; }

/* 区块 */
.portal-section { margin-bottom: 16px; }

/* 列表页 */
.portal-page {
  padding: 16px 0 24px;
}

.portal-breadcrumb {
  background: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.portal-breadcrumb a { color: #ff6b00 !important; }

.portal-list-box {
  background: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.portal-list-box ul li {
  padding: 12px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-list-box ul li a {
  font-size: 15px;
  color: #333 !important;
}

.portal-list-box ul li span { color: #999; font-size: 13px; }

.portal-page-layout {
  display: flex;
  gap: 16px;
}

.portal-page-main { flex: 1; min-width: 0; }
.portal-page-side { width: 300px; flex-shrink: 0; }

/* 内容页 */
.portal-article {
  background: #fff;
  border-radius: 6px;
  padding: 24px 32px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.portal-article h1 {
  font-size: 26px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-bottom: 12px;
}

.portal-article-meta {
  font-size: 13px;
  color: #999;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.portal-article #text {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}

.portal-article #text p { margin: 1em 0; }

.portal-article .msgDetail article {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}

.portal-article .msgDetail h3 {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 1.4em 0 .6em;
  padding-left: 10px;
  border-left: 3px solid #ff6b00;
}

.portal-article .msgDetail img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* 正文下相关文章 */
.portal-related-block {
  margin-top: 16px;
}

.portal-card-icon::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #ff6b00;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

.portal-related-list {
  padding: 8px 16px 12px;
}

.portal-related-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.portal-related-item:last-child { border-bottom: none; }

.portal-related-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  background: #ff6b00;
  border-radius: 50%;
}

.portal-related-link {
  font-size: 14px;
  line-height: 1.6;
  color: #333 !important;
}

.portal-related-link:hover { color: #ff6b00 !important; }

/* 侧栏图文卡 invitation */
.portal-inv-list {
  padding: 8px 12px 12px;
}

.portal-inv-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 8px;
  margin-bottom: 4px;
  border-bottom: 1px dashed #f0f0f0;
  transition: background .15s;
}

.portal-inv-card:last-child { border-bottom: none; }

.portal-inv-card:hover {
  background: #fff8f3;
  text-decoration: none !important;
}

.portal-inv-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portal-inv-title {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-inv-card:hover .portal-inv-title { color: #ff6b00; }

.portal-inv-date {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.portal-inv-pic {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  background: #f0f0f0;
}

/* 高级搜索 / 搜索结果 */
.portal-search-page .portal-breadcrumb {
  margin-bottom: 16px;
  font-size: 13px;
  color: #999;
}

.portal-search-adv-grid {
  display: flex;
  gap: 24px;
  padding: 8px 4px 4px;
}

.portal-search-adv-main { flex: 1; min-width: 0; }

.portal-search-adv-side {
  width: 260px;
  flex-shrink: 0;
}

.portal-search-field { margin-bottom: 18px; }

.portal-search-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.portal-search-hint {
  font-weight: 400;
  color: #999;
  font-size: 12px;
}

.portal-search-radios label {
  display: inline-block;
  margin-right: 14px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
}

.portal-search-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #666;
}

.portal-search-keyword-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-search-keyword-row .inputText {
  flex: 1;
  min-width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.portal-search-submit {
  height: 36px;
  padding: 0 20px;
  background: #ff6b00;
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.portal-search-submit:hover { background: #e55f00; }

.portal-search-class {
  width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 4px;
  font-size: 13px;
  line-height: 1.6;
}

.portal-search-order {
  width: 100%;
  height: 32px;
  margin-bottom: 8px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 0 8px;
}

.portal-search-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #eee;
}

.portal-search-adv-link {
  font-size: 13px;
  color: #666 !important;
}

.portal-search-summary {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.portal-search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-search-item {
  padding: 14px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.portal-search-item:last-child { border-bottom: none; }

.portal-search-title {
  font-size: 16px;
  font-weight: 600;
  color: #222 !important;
  line-height: 1.5;
}

.portal-search-title:hover { color: #ff6b00 !important; }

.portal-search-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #777;
}

.portal-search-meta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #aaa;
}

.portal-search-meta a { color: #999 !important; }

/* 页脚 */
.portal-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 20px 0;
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #999;
}

.portal-footer a { color: #666 !important; margin: 0 8px; }

.portal-search {
  background: #fff;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  text-align: center;
}

.portal-search strong { margin-right: 8px; }

.portal-search .inputText {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 240px;
}

.portal-search select {
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 6px;
}

.portal-theme-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: #fff3e6;
  color: #ff6b00;
  border-radius: 3px;
  font-size: 12px;
}

/* 分页 */
.epages { text-align: center; padding: 16px 0; }
.epages a {
  border-color: #eee !important;
  color: #666 !important;
}
.epages a:hover {
  border-color: #ff6b00 !important;
  color: #ff6b00 !important;
}

/* 隐藏帝国默认多余元素 */
.portal-header .top,
body.portal-body > .top,
body.portal-body > table.top { display: none; }

/* phomenewspic 表格转网格 */
.portal-grid-wrap table { width: 100%; border: 0; }
.portal-grid-wrap td {
  padding: 4px;
  vertical-align: top;
  width: 20%;
}

.portal-grid-wrap td a {
  display: block;
  background: #fafafa;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 8px;
}

.portal-grid-wrap td img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.portal-grid-wrap td a:hover img { opacity: .9; }

/* 侧栏百科简表 */
.portal-side-list li {
  padding: 8px 16px;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13px;
}

.portal-side-list li a { color: #555 !important; }

/* ecmsinfo 默认输出适配 */
.portal-card-bd > ul,
.portal-card-bd ul { padding: 0; }

.portal-card-bd li {
  padding: 10px 16px;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 14px;
}

.portal-card-bd li p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

.portal-card-bd li strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.portal-card-bd li strong a { color: #333 !important; }

/* 文字横滑卡 */
.portal-text-scroll ul {
  display: flex;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.portal-text-scroll li {
  flex: 0 0 200px;
  background: linear-gradient(135deg, #fff5eb 0%, #fff 100%);
  border: 1px solid #ffe0c2;
  border-radius: 6px;
  padding: 14px 12px;
  border-bottom: none;
}

.portal-text-scroll li a {
  font-size: 13px;
  line-height: 1.5;
  color: #333 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 标签网格 */
.portal-tag-grid ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 12px 16px 16px;
}

.portal-tag-grid li {
  background: #fafafa;
  border-radius: 6px;
  padding: 12px 10px;
  border: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  line-height: 1.4;
  min-height: 72px;
}

.portal-tag-grid li a { color: #333 !important; }

.portal-tag-grid li:hover {
  border-color: #ff6b00;
  background: #fff8f3;
}

/* 空轮播占位 */
.portal-hero-pic #ehdplayBox .ehdoUlplay:empty + .ehdsmalltitle {
  display: none;
}