/* ========== 性能与冲突修复（替代 tpl_style，避免大量 404 背景图请求） ========== */
html,
body {
  text-align: left;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

#wrapper,
.container {
  text-align: left;
}

.top-nav .container,
.navbar > .container,
.site-ads > .container,
#wrapper > .container.container-minheight {
  width: 100%;
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

.site-ads {
  margin: 0;
  padding: 0;
  text-align: left;
}

.site-ad-item {
  width: 100%;
  margin: 0 0 8px;
}

.site-ad-item:last-child {
  margin-bottom: 12px;
}

.site-ad-item a {
  display: block;
  line-height: 0;
  overflow: hidden;
}

/* ========== 顶栏滚动公告（通栏背景 + 版心内容，文字从右滚入） ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1031;
  width: 100%;
  height: 36px;
  line-height: 36px;
  background: #111;
  border-bottom: 1px solid #222;
}

.top-nav .container {
  display: flex;
  align-items: center;
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
}

.notice-bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  overflow: hidden;
  gap: 8px;
}

.notice-label {
  flex-shrink: 0;
  background: #ff8800;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 1px;
}

.notice-marquee {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

.notice-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: notice-scroll 28s linear infinite;
}

.notice-item {
  display: inline;
  padding-right: 60px;
  color: #aaa;
  font-size: 12px;
  line-height: 36px;
}

.notice-marquee:hover .notice-track {
  animation-play-state: paused;
}

@keyframes notice-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== 主导航 ========== */
.navbar.navbar-inverse.navbar-fixed-top {
  top: 36px !important;
  min-height: 66px;
  margin-bottom: 0;
}

.navbar-brand {
  height: 66px;
  display: flex;
  align-items: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.navbar-brand img {
  height: 42px;
  width: auto;
  max-width: 150px;
  display: block;
}

.navbar-brand-text {
  color: #ff8800;
  font-size: 20px;
  font-weight: 700;
  line-height: 66px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-inverse .navbar-nav > li > a {
  font-size: 15px;
  padding-top: 23px !important;
  padding-bottom: 23px !important;
  line-height: 20px;
}

.navbar-toggle {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

/* 去掉二级导航后，修正顶部留白 */
body {
  padding-top: 108px !important;
}

/* ========== 首页广告（全站 header 内展示） ========== */
.ad_img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 页脚链接 ========== */
.footer-row-links a + a::before {
  content: " | ";
  color: #666;
  pointer-events: none;
}

.footer-icp {
  color: #777;
  font-size: 12px;
  margin-top: 4px;
}

/* ========== 搜索框（独立组件，避免 Bootstrap input-group 冲突） ========== */
#search_form {
  margin: 12px auto 8px;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  box-sizing: border-box;
}

.site-search {
  display: flex;
  align-items: stretch;
  max-width: 600px;
  width: 100%;
  height: 40px;
  border: 1px solid #888;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  box-sizing: border-box;
}

.site-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: none;
  outline: none;
  background: transparent;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.site-search-input::placeholder {
  color: #999;
}

.site-search-actions {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  border-left: 1px solid #ccc;
}

.site-search-type {
  width: auto;
  max-width: 110px;
  min-width: 88px;
  height: 100%;
  padding: 0 22px 0 8px;
  border: none;
  outline: none;
  background-color: #eee;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.site-search-btn {
  flex-shrink: 0;
  width: 44px;
  height: 100%;
  padding: 0;
  border: none;
  border-left: 1px solid #cc6d00;
  border-radius: 0;
  background: #ff8800;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.site-search-btn:hover,
.site-search-btn:focus {
  background: #e67a00;
  outline: none;
}

.site-search-btn .fa {
  font-size: 15px;
  line-height: 1;
}

.form-control {
  height: 36px;
}

/* ========== 热搜 ========== */
.hot-search,
.container > p:not(.footer-row p) {
  color: #999;
  font-size: 13px;
  line-height: 1.9;
  margin: 6px 0 12px;
}

.hot-search a,
.container.container-minheight > p a {
  color: #ff8800;
  text-decoration: none;
  margin-right: 10px;
  white-space: nowrap;
}

.hot-search a:hover,
.container.container-minheight > p a:hover {
  color: #ffc266;
  text-decoration: underline;
}

/* ========== 区块标题 ========== */
.login_register_header {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: 700;
  border-radius: 0;
}

.well-filters > .pull-left > h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

/* ========== 视频卡片 ========== */
.videos-text-align {
  font-size: 12px;
  color: #777;
  line-height: 1.55;
}

.videos-text-align .well-sm {
  margin-bottom: 15px;
  padding: 8px !important;
  border-radius: 4px;
}

.videos-text-align a {
  text-decoration: none;
  color: inherit;
}

.videos-text-align a:hover .video-title {
  color: #ff8800;
}

.video-title {
  color: #ff8800;
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-top: 6px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.title-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-overlay {
  min-height: 120px;
  border-radius: 3px;
  background: #000;
}

.thumb-overlay .img-responsive {
  width: 100%;
  max-height: 135px;
  object-fit: cover;
}

.videos-text-align span.info:empty {
  display: none;
}

.videos-text-align img[src*="like"],
.videos-text-align img[src*="dislike"] {
  vertical-align: middle;
  margin: 0 1px;
}

/* 分类角标 */
.hd-text-icon {
  top: 5px;
  right: 5px;
  left: auto;
  padding: 1px 5px 0;
  min-width: 28px;
  font-size: 11px;
  white-space: nowrap;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.pagination > li {
  float: none;
  display: block;
}

.pagination > li > a,
.pagination > li > span {
  border-radius: 3px;
}

/* ========== 页脚 ========== */
.footer-container {
  margin-top: 24px;
}

.footer-container .footer-links {
  background: transparent !important;
}

.footer-row p {
  color: #999;
  margin: 8px 0;
  line-height: 1.8;
}

.footer-row a {
  color: #ff8800;
  text-decoration: none;
}

.footer-row a:hover {
  color: #ffc266;
  text-decoration: underline;
}

.footer-row img {
  vertical-align: middle;
  margin-right: 2px;
}

/* ========== 搜索页排序 ========== */
.search-sort-box {
  margin: 8px 0 10px;
  font-size: 13px;
  line-height: 26px;
  color: #999;
}

.search-sort-box a {
  display: inline-block;
  padding: 3px 9px;
  margin: 2px 3px 2px 0;
  border-radius: 3px;
  background: #222;
  color: #ff9900;
  text-decoration: none;
  font-weight: bold;
}

.search-sort-box a:hover {
  background: #333;
  color: #ffc266;
}

.search-sort-box a.active {
  background: #ff9900;
  color: #000;
}

.well-filters {
  margin-bottom: 15px;
}

.search-result-count {
  color: #999;
  font-size: 13px;
  margin: 0 0 12px;
  text-align: left;
}

/* ========== 播放页（暗黑风格） ========== */
.videodetails-yakov {
  background: #161616;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.videodetails-yakov > .login_register_header {
  text-align: left !important;
  margin: 0;
  padding: 10px 14px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  background-color: #ff8800 !important;
  color: #fff !important;
}

.videodetails-yakov > .login_register_header span {
  color: #fff;
}

.videodetails-yakov > .login_register_header img {
  flex-shrink: 0;
  vertical-align: middle;
}

.video-container,
#bofang_box {
  position: relative;
  background: #000 !important;
  padding: 0 !important;
  line-height: normal;
  width: 100%;
  min-height: 360px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-container .MacPlayer,
#bofang_box .MacPlayer {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
  overflow: hidden;
}

.video-container .MacPlayer #buffer,
.video-container .MacPlayer #install,
#bofang_box .MacPlayer #buffer,
#bofang_box .MacPlayer #install {
  display: none !important;
}

.video-container .MacPlayer table,
#bofang_box .MacPlayer table {
  width: 100% !important;
  height: 100% !important;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
}

.video-container .MacPlayer #playleft,
#bofang_box .MacPlayer #playleft {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  vertical-align: top;
}

.video-container .MacPlayer #playleft iframe,
#bofang_box .MacPlayer #playleft iframe,
.video-container .MacPlayer > iframe,
#bofang_box .MacPlayer > iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border: 0;
  display: block;
}

.video-player-placeholder {
  background: #000;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  line-height: 1.5;
}

.video-border {
  margin-bottom: 20px;
}

#useraction {
  margin-top: 0 !important;
  padding: 14px;
  background: #161616;
  border-top: 1px solid #2a2a2a;
}

#useraction .boxPart {
  justify-content: flex-start !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 12px 0 !important;
}

#useraction .boxPart.play-stats {
  padding-bottom: 10px;
  border-bottom: none;
}

#useraction .boxPart.play-stats .play-vote-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

#useraction .play-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  padding: 4px 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #222;
  color: #ccc;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}

#useraction .play-vote-btn:hover {
  border-color: #ff8800;
  color: #fff;
  text-decoration: none;
}

#useraction .play-vote-btn .fa {
  flex-shrink: 0;
  font-size: 14px;
  color: #ff8800;
}

#useraction .play-vote-btn .digg_num {
  flex-shrink: 0;
  min-width: 1.5em;
  color: #ff8800;
  font-weight: 700;
  text-align: left;
}

#useraction .play-vote-btn.disabled {
  opacity: 0.6;
  pointer-events: none;
}

#useraction .boxPart.play-stats .info {
  color: #999;
  font-size: 13px;
  white-space: nowrap;
}

#useraction .video-info-span {
  color: #ff8800 !important;
  font-weight: 700;
}

#useraction .floatmenu {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
}

#useraction .floatmenu a {
  color: #ff8800;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid #444;
  border-radius: 3px;
  background: #222;
  font-size: 13px;
  white-space: nowrap;
}

#useraction .floatmenu a:hover {
  background: #2a2a2a;
  border-color: #ff8800;
}

#videodetails-content {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  color: #aaa !important;
  font-size: 13px !important;
  line-height: 1.7;
  word-break: break-word;
}

#videodetails-content a {
  color: #ff8800;
  text-decoration: none;
}

#videodetails-content a:hover {
  text-decoration: underline;
}

.comment-divider {
  margin: 0 !important;
  padding: 8px 14px 16px !important;
  background: #161616 !important;
  border-top: 1px solid #2a2a2a;
}

.videodetails-yakov .comment-item {
  padding: 14px 0;
  border-bottom: 1px solid #2a2a2a;
}

.videodetails-yakov .comment-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.videodetails-yakov .comment-meta {
  line-height: 1.4;
}

.videodetails-yakov .comment-author {
  color: #ff8800 !important;
  font-size: 13px;
  font-weight: 600;
}

.videodetails-yakov .comment-time {
  color: #666 !important;
  font-size: 12px;
  margin-left: 6px;
}

.videodetails-yakov .comment-text {
  color: #bbb !important;
  font-size: 13px;
  line-height: 1.65;
  margin-top: 8px;
  word-break: break-word;
}

.comment-divider table {
  width: 100%;
  border-collapse: collapse;
}

.comment-divider td {
  padding: 12px 0 !important;
  border-bottom: 1px solid #2a2a2a !important;
  text-align: left !important;
  background: transparent !important;
}

.comment-divider tr:last-child td {
  border-bottom: none !important;
}

.comment-divider .comment-body {
  color: #bbb !important;
}

.comment-divider .text-muted {
  color: #666 !important;
  font-size: 12px;
}

/* ========== 播放页评论区（页面底部） ========== */
.play-comment-section {
  margin-top: 16px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
}

.play-comment-title {
  margin: 0 !important;
  padding: 10px 14px !important;
  text-align: left !important;
}

.comment-form-box {
  padding: 14px;
  border-bottom: 1px solid #2a2a2a;
  background: #1a1a1a;
}

.comment-textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #222;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}

.comment-textarea::placeholder {
  color: #777;
}

.comment-textarea:focus {
  border-color: #ff8800;
}

.comment-submit-btn {
  margin-top: 10px;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  background: #ff8800;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.comment-submit-btn:hover {
  background: #e67a00;
}

.play-comment-section .comment-divider {
  margin: 0 !important;
  padding: 4px 14px 14px !important;
  border-top: none;
}

.play-comment-section .comment-item {
  padding: 14px 0;
  border-bottom: 1px solid #2a2a2a;
}

.play-comment-section .comment-item:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.play-comment-section .comment-author {
  color: #ff8800 !important;
  font-size: 13px;
  font-weight: 600;
}

.play-comment-section .comment-time {
  color: #666 !important;
  font-size: 12px;
  margin-left: 6px;
}

.play-comment-section .comment-text {
  color: #bbb !important;
  font-size: 13px;
  line-height: 1.65;
  margin-top: 8px;
  word-break: break-word;
}

.left-side-videos {
  margin-top: 0;
}

.left-side-videos .login_register_header {
  margin-bottom: 10px;
}

/* ========== 通用优化 ========== */
.hot-search {
  text-align: center;
}

.well-filters {
  border-radius: 4px;
}

.footer-row {
  text-align: center;
}

.footer-row p {
  text-align: center;
}

/* ========== 响应式 ========== */
@media (max-width: 991px) {
  body {
    padding-top: 98px !important;
  }

  .navbar.navbar-inverse.navbar-fixed-top {
    min-height: 62px;
  }

  .navbar-brand {
    height: 62px;
  }

  .navbar-brand img {
    height: 38px;
  }

  .navbar-brand-text {
    font-size: 18px;
    line-height: 62px;
  }

  .navbar-inverse .navbar-nav > li > a {
    padding-top: 21px !important;
    padding-bottom: 21px !important;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 92px !important;
  }

  .navbar.navbar-inverse.navbar-fixed-top {
    min-height: 56px;
  }

  .navbar-brand {
    height: 56px;
  }

  .navbar-brand img {
    height: 34px;
  }

  .navbar-brand-text {
    font-size: 16px;
    line-height: 56px;
    max-width: 120px;
  }

  .navbar-toggle {
    margin-top: 11px !important;
    margin-bottom: 11px !important;
  }

  .navbar-inverse .navbar-nav > li > a {
    font-size: 16px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  #search_form {
    margin: 10px auto 6px;
  }

  .site-search {
    display: block;
    height: auto;
    border-color: #444;
    border-radius: 8px;
    background: #1a1a1a;
    overflow: hidden;
  }

  .site-search-input {
    display: block;
    width: 100%;
    height: 42px;
    flex: none;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0 14px;
    border: none;
    border-bottom: 1px solid #333;
    border-radius: 0;
    background: #222;
    color: #eee;
    box-sizing: border-box;
  }

  .site-search-input::placeholder {
    color: #888;
  }

  .site-search-actions {
    display: flex;
    width: 100%;
    height: 40px;
    border-left: none;
  }

  .site-search-type {
    flex: 1;
    max-width: none;
    min-width: 0;
    padding: 0 28px 0 12px;
    background-color: #1a1a1a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    color: #ccc;
    border-right: 1px solid #333;
    font-size: 13px;
  }

  .site-search-btn {
    width: 48px;
    height: 40px;
    border-left: 1px solid #333;
    background: #ff8800;
  }

  .site-search-btn:hover,
  .site-search-btn:focus {
    background: #e67a00;
  }

  .hot-search {
    padding: 0 12px;
    font-size: 12px;
    line-height: 2;
  }

  .play-comment-section {
    margin-top: 16px;
  }

  #useraction .boxPart {
    gap: 8px 12px;
  }

  #useraction .floatmenu a {
    padding: 4px 10px;
    font-size: 12px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
}
